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, 18 Nov 2015 04:43:50 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: net-scm: Macro for special pattern?

On Wed, 2015-11-18 at 08:45 +0100, SF Markus Elfring wrote:
> > You mean this likely() annotation of yours?
> 
> How do you think about to express the software design pattern
> which is applied at the mentioned source code place by a dedicated
> preprocessor macro?

likely()/unlikely() are not always applicable.

In the Ipv6 case I mentioned to you, it all depends if an application
for some reason absolutely wants the sockets to store the extra skb

There are seldom used socket options. _if_/_when_ they are used, a
likely()/unlikely() would give the wrong signal.

likely() should only be used in contexts we know better than branch
predictor/compiler.



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