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:	Wed, 6 Feb 2008 14:34:57 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] reduce large do_mount stack usage with noinlines

On Wed, 06 Feb 2008 16:13:58 -0600
Eric Sandeen <sandeen@...hat.com> wrote:

> do_mount() uses a whopping 616 bytes of stack on x86_64 in 
> 2.6.24-mm1, largely thanks to gcc inlining the various helper 
> functions.

hm, sizeof(nameidata)=136 and I can see about three of them on the stack. 
Must have missed something.

> noinlining these can slim it down a lot; on my box this patch
> gets it down to 168, which is mostly the struct nameidata nd;
> left on the stack.
> 
> These functions are called only as do_mount() helpers;
> none of them should be in any path that would see a performance
> benefit from inlining...
> 

Does the patch actually help?  I mean, if a() calls b() and both use N
bytes of locals, our worst-case stack usage remains ~2N whether or not b()
was inlined in a()?  In fact, uninlining makes things a little worse due to
callframe stuff.

> -static int do_change_type(struct nameidata *nd, int flag)
> +static noinline int do_change_type(struct nameidata *nd, int flag)

There's no way for the reader to work out why this is here, so I do think
it should be commented somewhere.

--
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