[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160316105226.GB21259@amd>
Date: Wed, 16 Mar 2016 11:52:26 +0100
From: Pavel Machek <pavel@....cz>
To: Chris Bainbridge <chris.bainbridge@...il.com>
Cc: bp@...en8.de, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/microcode: Change checksum to u32
Hi!
> Checksum should be unsigned 32-bit otherwise the calculation overflows
> resulting in undefined behaviour:
> @@ -49,7 +49,7 @@ int microcode_sanity_check(void *mc, int print_err)
> unsigned long total_size, data_size, ext_table_size;
> struct microcode_header_intel *mc_header = mc;
> struct extended_sigtable *ext_header = NULL;
> - int sum, orig_sum, ext_sigcount = 0, i;
> + u32 sum, orig_sum, ext_sigcount = 0, i;
Ok, but what about i and ext_sigcount?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Powered by blists - more mailing lists