https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101276
Bug ID: 101276 Summary: [i386] Keylocker output should be cleared when instruction reports runtime error. Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wwwhhhyyy333 at gmail dot com Target Milestone: --- Some keylocker instruction will set ZF when runtime occurs, and the output data should be invalid. Current intrinsic just copy the input data to output regardless of the ZF, like movdqa k2(%rip), %xmm0 aesdec128kl h1(%rip), %xmm0 sete %al movups %xmm0, k1(%rip) It could bring safety issue that return the unencrypted data when runtime error occurs. So the code should be like movdqa k2(%rip), %xmm0 aesdec128kl h1(%rip), %xmm0 je .L4 .L2: sete %al movups %xmm0, k1(%rip) ret .L4: pxor %xmm0, %xmm0 jmp .L2 To clear the output data.