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] [day] [month] [year] [list]
Date:	Sat, 26 Mar 2016 20:06:13 +0100
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	David Rientjes <rientjes@...gle.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH 2/2] include/linux: apply __malloc attribute

On Thu, Mar 24 2016, Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Thu, 24 Mar 2016 00:42:32 +0100 Rasmus Villemoes <linux@...musvillemoes.dk> wrote:
>
>> Attach the malloc attribute to a few allocation functions. This helps
>> gcc generate better code by telling it that the return value doesn't
>> alias any existing pointers (which is even more valuable given the
>> pessimizations implied by -fno-strict-aliasing).
>> 
> Shaves 6 bytes off my 1MB i386 defconfig vmlinux.  Winner!

Well, the full bloat-o-meter summary is

add/remove: 0/0 grow/shrink: 72/155 up/down: 1165/-1674 (-509)

which sure still isn't much, but this isn't (just) about saving a few
bytes, but more about allowing gcc to generate better code; sometimes by
not having to reload, but also by enabling it to reorder instructions
(e.g. hoisting a load above a store) - the simple example was chosen
because it was very easy to see the relationship between the source and
the generated code.

Anyway, thanks for picking them up.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ