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]
Message-ID: <20120224091103.GC814@elte.hu>
Date:	Fri, 24 Feb 2012 10:11:03 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jason Baron <jbaron@...hat.com>
Cc:	Paul Mackerras <paulus@...ba.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Steven Rostedt <rostedt@...dmis.org>, a.p.zijlstra@...llo.nl,
	mathieu.desnoyers@...icios.com, davem@...emloft.net,
	ddaney.cavm@...il.com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups +
 docs


* Jason Baron <jbaron@...hat.com> wrote:

> So, we could get rid of the '&' with something as simple as:
> 
> #define very_unlikely(key) __very_unlikely(&key)
> 
> However, it does seem potentially more error prone, b/c if 
> 'key' is passed to a function, and they we do the 
> very_unlikely() we end up with the address parameter (due to 
> pass by value). That said, it doesn't look like anybody is 
> using very_unlikely() in that manner in the tree, and we could 
> document the usage.
> 
> In any case, I did the conversion, to see what it would look 
> like, if anybody is interested:

I agree that it's still error-prone - it also departs from how 
we typically use C APIs in the kernel. With the static_key_*() 
naming there's no desire to make it work like unlikely() anymore 
and there's no need to pass in the object by value - passing by 
reference is fine.

So I don't think we need this.

Thanks,

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