[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120328190211.4ac8a653.akpm@linux-foundation.org>
Date: Wed, 28 Mar 2012 19:02:11 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dave Jones <davej@...hat.com>
Cc: Joe Perches <joe@...ches.com>, Dave Chinner <david@...morbit.com>,
viro@...iv.linux.org.uk,
Linux Kernel <linux-kernel@...r.kernel.org>,
David Rientjes <rientjes@...gle.com>
Subject: Re: suppress page allocation failure warnings from sys_listxattr
On Wed, 28 Mar 2012 21:50:59 -0400 Dave Jones <davej@...hat.com> wrote:
> On Wed, Mar 28, 2012 at 06:46:02PM -0700, Andrew Morton wrote:
>
> > Could. There was some discussion last year and implementations were
> > tossed around.
> >
> > I'm a bit apprehensive - kernel code is supposed to be robust, and
> > large allocations are not robust and vmalloc() is crappy.
>
> Can you expand on crappy ?
It's expensive on a per-call basis and can end up failing due to
internal fragmentation of vmalloc()'s virtually-addressed arena. I
don't think I've ever seen a report of anyone getting a vmalloc()
failure due to the fragmentation issue, so it's largely theoretical.
But of course, the more we use it (especially for long-lived
allocations), the greater the risk becomes. Mainly to 32-bit machines,
I assume.
> Also, what happens if something allocates
> and sits on a bunch of vmalloc'd memory ? would we start seeing oom kills ?
vmalloc() would fail.
> (thinking of the context of my fuzzing tool where a bunch of instances could
> feasibly call these syscalls and not sit on huge amounts per thread, but
> collectively... I'm wondering if it could be provoked into killing
> processes I don't own)
umm, if you wanted to deliberately trigger a vmalloc() failure then I
guess a good approach would be to locate a vmalloc() site which can
persist beyond the syscall (modprobe is a good one!) then exercise it
in a way so that there are no N-byte holes left in the arena, then
trigger an N-byte vmalloc().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists