-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hmac] Code coverage exclusions #24692
Comments
This commit removes the coverage exclusions that were introduced as part of the padding cancellation bug lowRISC#23936 that was fixed in the previous commit. New exclusions are added that cover some impossible conditions and branches as identified in lowRISC#24692. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org> Co-authored-by: Martin Velay <mvelay@lowrisc.org>
This commit removes the coverage exclusions that were introduced as part of the padding cancellation bug lowRISC#23936 that was fixed in the previous commit. New exclusions are added that cover some impossible conditions and branches as identified in lowRISC#24692. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org> Co-authored-by: Martin Velay <mvelay@lowrisc.org>
Thanks @martin-velay for putting this together. I've started to review this when reviewing @andrea-caforio 's PR here: #25696
This one is also related to
Please note that the non-existing else here is not referring to the digest size but to the
I don't see an a non-existing I'll need to go through the other exclusions later. |
This can easily be reformulated in the RTL without making anything less clear: end else if ((digest_mode_flag_q == SHA2_384) || (digest_mode_flag_q == SHA2_512)) begin to end else begin // SHA2_384/SHA2_512
I think I agree on that one.
Reformulate RTL to just check for SHA2_256.
I agree on that one.
Reformulate RTL to just check for SHA2_256.
Reformulate RTL to just check for SHA2_256. Remove the default all-zero mux input for LenHi, LenLo. For Pad80 use a default which is equal to the branches above, i.e.: unique case (message_length_i[4:3])
2'b 00: shaf_rdata_o = 64'h 0000_0000_8000_0000;
2'b 01: shaf_rdata_o = {32'h 0000_0000, fifo_rdata_i.data[31:24], 24'h 8000_00};
2'b 10: shaf_rdata_o = {32'h 0000_0000, fifo_rdata_i.data[31:16], 16'h 8000};
2'b 11: shaf_rdata_o = {32'h 0000_0000, fifo_rdata_i.data[31: 8], 8'h 80};
default: shaf_rdata_o = 64'h 0000_0000_8000_0000;
Agreed!
Reformulate RTL to just check for SHA2_256 and MultimodeEn. Actually, I don't understand how this is not covered currently. Is the case 1 || 1 for (digest_mode_flag_q == SHA2_384) || (digest_mode_flag_q == SHA2_512) not covered or which case isn't covered? |
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
Remove obsolete exclusions (see lowRISC#25590) and add two new exclusions regarding uncoverable "missing else" branches (see lowRISC#24692). Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See lowRISC#24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
In light of the V3 signoff, this commits adapts certain RTL parts that induced uncoverable coverage holes. There are two types of changes: 1. Removal of dangling else branches that are impossible to cover. 2. Removal of uncoverable FSM default state assignments. Both changes have no functional impact and are only cosmetic in nature in order to attain the demanded coverage thresholds. See #24692, for a detailed discussion of these changes. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
Description
Some code coverage holes should be added to the exclusion file:
hash_start
orhash_continue
while SHA core is disabled and also while the state machine is in Idle mode. This is outside the specification and won’t be easy to trigger, so we may as well exclude it.The text was updated successfully, but these errors were encountered: