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-next>] [day] [month] [year] [list]
Message-ID: <4703A44F.9020402@openvz.org>
Date:	Wed, 03 Oct 2007 18:16:47 +0400
From:	Pavel Emelyanov <xemul@...nvz.org>
To:	Andrew Morton <akpm@...l.org>
CC:	Sukadev Bhattiprolu <sukadev@...ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	devel@...nvz.org, Matt Mackall <mpm@...enic.com>
Subject: [PATCH 0/3] Make tasks always have non-zero pids

Some time ago Sukadev noticed that the vmlinux size has
grown 5Kb due to merged pid namespaces. One of the big
problems with it was fat inline functions. The other thing
was noticed by Matt - the checks for task's pid to be not
NULL take place and make the kernel grow due to inlining,
but these checks are not always needed.

In this series I introduce a static pid (dummy), according
to Matt's proposal, which is assigned to tasks during the 
detach_pid and transfer_pid instead of NULL. This pid lives 
in the init pid namespace and has the id = 0, so all the 
task_xid_xnr() calls will still return 0 on a dead task.

Places that get the struct pid from task either get it from
the current (in this case they will never get this dummy),
or use it to compare with some other value (so they will 
work the same for both NULL and dummy pids).

This saves up to 340 bytes for i386 kernel with minimal 
config  and probably more with more users of pids.

Tested on i386 and x86_64 boxes. Tasks still live and die,
namespaces and proc still work.

Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
-
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