From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Sun, 20 Feb 2011 13:09:50 +0000 Subject: Re: [patch -next] x86, microcode, AMD: signedness bug in Message-Id: <20110220130950.GC1898@bicker> List-Id: References: <20110218091716.GA4384@bicker> <20110220130214.GD25700@elte.hu> In-Reply-To: <20110220130214.GD25700@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ingo Molnar Cc: Andreas Herrmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , "maintainer:X86 ARCHITECTURE..." , "open list:AMD MICROCODE UPD..." , open list , kernel-janitors@vger.kernel.org On Sun, Feb 20, 2011 at 02:02:14PM +0100, Ingo Molnar wrote: > > * Dan Carpenter wrote: > > > install_equiv_cpu_table() returns type int. It uses negative error > > codes so using an unsigned type breaks the error handling. > > How did you notice this btw - did GCC throw a warning? > It's a smatch warning. arch/x86/kernel/microcode_amd.c +256 generic_load_microcode(12) warn: unsigned 'offset' is never less than zero. regards, dan carpenter