All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	"maintainer:X86 ARCHITECTURE..." <x86@kernel.org>,
	"open list:AMD MICROCODE UPD..." <amd64-microcode@amd64.org>,
	open list <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] x86, microcode, AMD: signedness bug in
Date: Sun, 20 Feb 2011 13:09:50 +0000	[thread overview]
Message-ID: <20110220130950.GC1898@bicker> (raw)
In-Reply-To: <20110220130214.GD25700@elte.hu>

On Sun, Feb 20, 2011 at 02:02:14PM +0100, Ingo Molnar wrote:
> 
> * Dan Carpenter <error27@gmail.com> 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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	"maintainer:X86 ARCHITECTURE..." <x86@kernel.org>,
	"open list:AMD MICROCODE UPD..." <amd64-microcode@amd64.org>,
	open list <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode()
Date: Sun, 20 Feb 2011 16:09:50 +0300	[thread overview]
Message-ID: <20110220130950.GC1898@bicker> (raw)
In-Reply-To: <20110220130214.GD25700@elte.hu>

On Sun, Feb 20, 2011 at 02:02:14PM +0100, Ingo Molnar wrote:
> 
> * Dan Carpenter <error27@gmail.com> 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

  reply	other threads:[~2011-02-20 13:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18  9:17 [patch -next] x86, microcode, AMD: signedness bug in Dan Carpenter
2011-02-18  9:17 ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Dan Carpenter
2011-02-18  9:39 ` [patch -next] x86, microcode, AMD: signedness bug in Borislav Petkov
2011-02-18  9:39   ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Borislav Petkov
2011-02-20 13:02 ` [patch -next] x86, microcode, AMD: signedness bug in Ingo Molnar
2011-02-20 13:02   ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Ingo Molnar
2011-02-20 13:09   ` Dan Carpenter [this message]
2011-02-20 13:09     ` Dan Carpenter
2011-02-20 14:14   ` [patch -next] x86, microcode, AMD: signedness bug in Borislav Petkov
2011-02-20 14:14     ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Borislav Petkov
2011-02-20 17:50     ` [patch -next] x86, microcode, AMD: signedness bug in Matthew Wilcox
2011-02-20 17:50       ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Matthew Wilcox
2011-02-20 18:08       ` [patch -next] x86, microcode, AMD: signedness bug in Borislav Petkov
2011-02-20 18:08         ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Borislav Petkov
2011-02-20 18:42         ` [patch -next] x86, microcode, AMD: signedness bug in Matthew Wilcox
2011-02-20 18:42           ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Matthew Wilcox
2011-02-20 19:33           ` [patch -next] x86, microcode, AMD: signedness bug in Borislav Petkov
2011-02-20 19:33             ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Borislav Petkov
2011-02-20 13:07 ` [tip:x86/microcode] x86, microcode, AMD: Fix " tip-bot for Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110220130950.GC1898@bicker \
    --to=error27@gmail.com \
    --cc=amd64-microcode@amd64.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.