From: Dan Carpenter <error27@gmail.com>
To: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: 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: [patch -next] x86, microcode, AMD: signedness bug in
Date: Fri, 18 Feb 2011 09:17:16 +0000 [thread overview]
Message-ID: <20110218091716.GA4384@bicker> (raw)
install_equiv_cpu_table() returns type int. It uses negative error
codes so using an unsigned type breaks the error handling.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 9fb8405..c561038 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -246,7 +246,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
struct microcode_header_amd *mc_hdr = NULL;
unsigned int mc_size, leftover;
- unsigned long offset;
+ int offset;
const u8 *ucode_ptr = data;
void *new_mc = NULL;
unsigned int new_rev = uci->cpu_sig.rev;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: 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: [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode()
Date: Fri, 18 Feb 2011 12:17:16 +0300 [thread overview]
Message-ID: <20110218091716.GA4384@bicker> (raw)
install_equiv_cpu_table() returns type int. It uses negative error
codes so using an unsigned type breaks the error handling.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 9fb8405..c561038 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -246,7 +246,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
struct microcode_header_amd *mc_hdr = NULL;
unsigned int mc_size, leftover;
- unsigned long offset;
+ int offset;
const u8 *ucode_ptr = data;
void *new_mc = NULL;
unsigned int new_rev = uci->cpu_sig.rev;
next reply other threads:[~2011-02-18 9:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 9:17 Dan Carpenter [this message]
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 ` [patch -next] x86, microcode, AMD: signedness bug in Dan Carpenter
2011-02-20 13:09 ` [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() 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=20110218091716.GA4384@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@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.