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:	Tue, 8 Sep 2009 20:18:03 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Li Zefan <lizf@...fujitsu.com>
cc:	Dave Hansen <dave@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 3/4 -mm] flex_array: poison free elements

On Wed, 9 Sep 2009, Li Zefan wrote:

> > I'm struggling to find other examples.  Dave, do you know of any 
> > subsystems in the kernel that can readily be converted to using flex 
> > array?
> 
> Actually I'm planing to try to convert to use flex array in
> kernel/trace/ftrace.c, and it needs some change in flex array,
> and I'll have to check if it will have a performance effect
> or not.
> 

That's cool, but it looks like none of those allocations currently would 
ever exceed PAGE_SIZE.  The return stack for each task would be a flex 
array of 50 elements, each element being 40 bytes for a maximum array 
size of 2KB.  The tasklist would allocate a flex array of pointers to 
struct ftrace_ret_stack with a maximum of 32 elements.  On x86_64, that 
has a maximum size of 256 bytes.

So while you would be converting existing kernel code to use the new 
interface, which is great, it doesn't have any advantage over the existing 
implementation.  I was looking for a current use-case that would otherwise 
use vmalloc because the entire array could not fit into a single page.
--
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