From: "Andi Kleen" <ak@suse.de>
To: torvalds@osdl.org
Cc: discuss@x86-64.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [3/4] i386: Fix overflow in e820_all_mapped
Date: Fri, 28 Apr 2006 07:28:46 +0200 [thread overview]
Message-ID: <4451A80E.mailNZX1XN4A8@suse.de> (raw)
The 32bit version of e820_all_mapped() needs to use u64 to avoid
overflows on PAE systems. Pointed out by Jan Beulich
Signed-off-by: Andi Kleen <ak@suse.de>
---
arch/i386/kernel/setup.c | 2 +-
include/asm-i386/e820.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
Index: linux/arch/i386/kernel/setup.c
===================================================================
--- linux.orig/arch/i386/kernel/setup.c
+++ linux/arch/i386/kernel/setup.c
@@ -970,7 +970,7 @@ efi_memory_present_wrapper(unsigned long
* not-overlapping, which is the case
*/
int __init
-e820_all_mapped(unsigned long start, unsigned long end, unsigned type)
+e820_all_mapped(u64 start, u64 end, unsigned type)
{
int i;
for (i = 0; i < e820.nr_map; i++) {
Index: linux/include/asm-i386/e820.h
===================================================================
--- linux.orig/include/asm-i386/e820.h
+++ linux/include/asm-i386/e820.h
@@ -36,8 +36,7 @@ struct e820map {
extern struct e820map e820;
-extern int e820_all_mapped(unsigned long start, unsigned long end,
- unsigned type);
+extern int e820_all_mapped(u64 start, u64 end, unsigned type);
#endif/*!__ASSEMBLY__*/
next reply other threads:[~2006-04-28 5:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-28 5:28 Andi Kleen [this message]
2006-04-28 5:39 ` [PATCH] [3/4] i386: Fix overflow in e820_all_mapped Linus Torvalds
2006-04-28 6:08 ` Andi Kleen
2006-04-28 14:52 ` Linus Torvalds
2006-04-28 7:07 ` [discuss] " Jan Beulich
2006-04-28 7:34 ` Arjan van de Ven
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=4451A80E.mailNZX1XN4A8@suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=discuss@x86-64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox