x86/microcode/intel: Drop orig_sum from ext signature checksum
authorBorislav Petkov <bp@suse.de>
Mon, 7 Mar 2016 10:10:04 +0000 (11:10 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 8 Mar 2016 08:08:45 +0000 (09:08 +0100)
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>
arch/x86/kernel/cpu/microcode/intel_lib.c

index 23b1d92342e3b64a8cfdb61953ef893c73e97c89..2ce1a7dc45b730cde0097e77353b9c426f3782b8 100644 (file)
@@ -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");