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>] [day] [month] [year] [list]
Date:	Thu, 31 Mar 2011 17:12:08 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	netdev@...r.kernel.org
Subject: [PATCH 0/7] Initialize flowi4 objects more efficiently.


When you do an initialization of an on-stack object such as:

	struct foo x = { .member1 = bar, .member2 = baz };

GCC will emit a memset of the object, then fill in the parameters you
specify explicitly.

When the majority of the structure is being set explicitly, the memset
is basically unnecessary overhead.  Emitting explicit stores to fill
in the zeros would be much cheaper, as well as avoid the function call
to memset.

Fix this for the cases which initialize most of the flowi4 object.

I therefore left alone cases such as:

	struct flowi4 fl4 = { .daddr = daddr };

Since not only would any gains be minimal, we'd get code bloat and
much of such cases are also in the slow paths.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ