From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Christoph Lameter <cl@linux.com>
Cc: james_p_freyensee@linux.intel.com, linux-mm@kvack.org,
gregkh@suse.de, hari.k.kanigeri@intel.com,
linux-arch@vger.kernel.org
Subject: Re: [PATCH] kernel buffer overflow kmalloc_slab() fix
Date: Fri, 20 May 2011 16:02:51 +0400 [thread overview]
Message-ID: <1305892971.2571.16.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.DEB.2.00.1105191550001.12530@router.home>
On Thu, 2011-05-19 at 15:51 -0500, Christoph Lameter wrote:
> On Thu, 19 May 2011, james_p_freyensee@linux.intel.com wrote:
>
> > From: J Freyensee <james_p_freyensee@linux.intel.com>
> >
> > Currently, kmalloc_index() can return -1, which can be
> > passed right to the kmalloc_caches[] array, cause a
>
> No kmalloc_index() cannot return -1 for the use case that you are
> considering here. The value passed as a size to
> kmalloc_slab is bounded by 2 * PAGE_SIZE and kmalloc_slab will only return
> -1 for sizes > 4M. So we will have to get machines with page sizes > 2M
> before this can be triggered.
Please don't make x86 centric assumptions like this. I was vaguely
thinking about hugepages in parisc. Like most risc machines, we have
(and have had for over a decade) a vast number of variable size pages
(actually from 4k to 64MB in power of 4 steps) and I think sparc is
similar, so I was wondering what to choose. You'd have been deeply
annoyed if I'd chosen 4MB and had slub fall over (again).
linux-arch cc'd just so everyone else is aware of these limitations when
they implement hugepages.
James
next parent reply other threads:[~2011-05-20 12:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1305834712-27805-2-git-send-email-james_p_freyensee@linux.intel.com>
[not found] ` <alpine.DEB.2.00.1105191550001.12530@router.home>
2011-05-20 12:02 ` James Bottomley [this message]
2011-05-20 14:33 ` [PATCH] kernel buffer overflow kmalloc_slab() fix Christoph Lameter
2011-05-20 14:33 ` Christoph Lameter
2011-05-20 14:42 ` Christoph Lameter
2011-05-20 18:02 ` J Freyensee
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=1305892971.2571.16.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=cl@linux.com \
--cc=gregkh@suse.de \
--cc=hari.k.kanigeri@intel.com \
--cc=james_p_freyensee@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).