From: Tejun Heo <tj@kernel.org>
To: Peter Teoh <htmldeveloper@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"H. Peter Anvin" <hpa@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-mm@kvack.org
Subject: Re: [BUG]memblock: fix overflow of array index
Date: Thu, 26 Apr 2012 08:01:59 -0700 [thread overview]
Message-ID: <20120426150159.GA27486@google.com> (raw)
In-Reply-To: <CAHnt0GWABX8qOVTinmSETUHxq1Y3NhqPOKxnUgcDtyf8wjtg_g@mail.gmail.com>
Hello,
On Thu, Apr 26, 2012 at 08:50:58AM +0800, Peter Teoh wrote:
> Thanks for the reply. Just an educational question: is it possible
> to set one-byte per memblock? And what is the minimum memblock
> size?
1 byte.
> Even if 2G memblock is a huge number, it still seemed like a bug to me
> that there is no check on the maximum number (which is 2G) of this
> variable (assuming signed int). Software can always purposely push
> that number up and the system can panic?
Yeah, if somebody messes the BIOS / firmware to oblivion. I don't
really care at that point tho. memblock is a boot time memory
allocator and it assumes BIOS / firmware isn't completely crazy. It
uses contiguous tables to describe all the blocks, walks them
one-by-one for allocation and even compacts them.
Well before memblock fails from any of the above, the machine would be
failing miserably in firmware / BIOS.
Thanks.
--
tejun
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-04-26 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 8:30 [BUG]memblock: fix overflow of array index Peter Teoh
2012-04-25 22:28 ` Tejun Heo
2012-04-25 22:29 ` H. Peter Anvin
2012-04-25 22:31 ` David Miller
2012-04-25 22:42 ` H. Peter Anvin
2012-04-26 0:50 ` Peter Teoh
2012-04-26 0:54 ` Yinghai Lu
2012-04-26 15:01 ` Tejun Heo [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=20120426150159.GA27486@google.com \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@linux.intel.com \
--cc=htmldeveloper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).