Skip to content

Commit

Permalink
x86/microcode/intel: Drop orig_sum from ext signature checksum
Browse files Browse the repository at this point in the history
It is 0 because for !0 values we would have exited already.

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1457345404-28884-6-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Borislav Petkov authored and Thomas Gleixner committed Mar 8, 2016
1 parent 5b46b5e commit 4ace2e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/kernel/cpu/microcode/intel_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ int microcode_sanity_check(void *mc, int print_err)
for (i = 0; i < ext_sigcount; i++) {
ext_sig = (void *)ext_header + EXT_HEADER_SIZE +
EXT_SIGNATURE_SIZE * i;
sum = orig_sum
- (mc_header->sig + mc_header->pf + mc_header->cksum)
+ (ext_sig->sig + ext_sig->pf + ext_sig->cksum);

sum = (mc_header->sig + mc_header->pf + mc_header->cksum) -
(ext_sig->sig + ext_sig->pf + ext_sig->cksum);
if (sum) {
if (print_err)
pr_err("Bad extended signature checksum, aborting.\n");
Expand Down

0 comments on commit 4ace2e7

Please sign in to comment.