mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	akpm@osdl.org, Andi Kleen <ak@suse.de>,
	linux-kernel@vger.kernel.org, discuss@x86-64.org
Subject: Re: [discuss] Re: [PATCH] [3/4] i386: Fix overflow in e820_all_mapped
Date: Fri, 28 Apr 2006 09:34:02 +0200	[thread overview]
Message-ID: <1146209643.3126.7.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <4451DB47.76E4.0078.0@novell.com>

On Fri, 2006-04-28 at 09:07 +0200, Jan Beulich wrote:
> >>> Linus Torvalds <torvalds@osdl.org> 28.04.06 07:39 >>>
> >
> >
> >On Fri, 28 Apr 2006, Andi Kleen wrote:
> >> 
> >> The 32bit version of e820_all_mapped() needs to use u64 to avoid
> >> overflows on PAE systems.  Pointed out by Jan Beulich
> >
> >I don't think that's true.
> >
> >It can't be called with 64-bit arguments anyway. If the base address 
> >doesn't fit in 32-bit, we'd be screwed in other places, afaik.
> 
> The arguments don't necessarily need to be u64, but (at least some of)
> the calculations inside the function do. Otherwise, a region starting
> below 4G and extending to or beyond 4G would not be considered
> correctly.

since this is use-once __init code I rather keep it simple and safe (eg
use u64) than do complex tricks to make it safe in another way.. and the
4G thing is a real potential problem that's easily fixed with the u64
thing.


      reply	other threads:[~2006-04-28  7:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28  5:28 Andi Kleen
2006-04-28  5:39 ` 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 [this message]

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=1146209643.3126.7.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=jbeulich@novell.com \
    --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

all inboxes | Powered by JetHome®