lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Sep 2009 13:58:41 +0100
From:	Mel Gorman <mel@....ul.ie>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	Frans Pop <elendil@...net.nl>,
	Larry Finger <Larry.Finger@...inger.net>,
	"John W. Linville" <linville@...driver.com>,
	linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
	ipw3945-devel@...ts.sourceforge.net,
	Andrew Morton <akpm@...ux-foundation.org>,
	cl@...ux-foundation.org, Assaf Krauss <assaf.krauss@...el.com>,
	Johannes Berg <johannes@...solutions.net>,
	Mohamed Abbas <mohamed.abbas@...el.com>
Subject: Re: iwlagn: order 2 page allocation failures

On Thu, Sep 10, 2009 at 03:39:36PM +0300, Pekka Enberg wrote:
> Hi Mel,
> 
> On Thu, 2009-09-10 at 13:34 +0100, Mel Gorman wrote:
> > > That's because it's a large allocation that's passed directly to the
> > > page allocator. See kmalloc_large_node(), for example. 
> > 
> > Pants. Is there any chance that could be fixed so that allocation
> > failures within SLUB get consistently reported?
> 
> Did you have something specific in mind? I am not sure it's worth it,
> really.
> 
> The kmalloc_large() function is a static inline in
> include/linux/slub_def.h that gets inlined nicely to a get_order() +
> __get_free_pages() pair in the caller for production configs. I'm not
> sure what we should print either. There's no known "object size" or
> "buffer size" nor do we any of the variable order things or backing
> struct kmem_cache_nodes.
> 

All I had in mind really was to grab the size of the buffer that was
passed into kmalloc such as here;

void *__kmalloc(size_t size, gfp_t flags)
{
        struct kmem_cache *s;
        void *ret;

        if (unlikely(size > SLUB_MAX_SIZE))
                return kmalloc_large(size, flags);

and to have consistent reporting of slub-allocation failures but if you
reckon it's not worth it, I wouldn't push strongly on it.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ