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: <4F4533B0.3060901@zytor.com>
Date:	Wed, 22 Feb 2012 10:28:00 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Richard Henderson <rth@...hat.com>
CC:	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...e.hu>, Jason Baron <jbaron@...hat.com>,
	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

On 02/22/2012 09:14 AM, Richard Henderson wrote:
> On 02/22/12 07:32, Peter Zijlstra wrote:
>> So I clicked the link Jason provided in his 10/10 Documentation patch
>> and stumbled upon:
>>
>>   http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01558.html
>>
>> Where rth suggests that __attribute__((hot,cold)) might work on the
>> destination labels. Trying this my compiler (4.6.1+crap) pukes all over
>> me suggesting this isn't (yet) implemented.
>>
>> Richard, is something like that still on the table?
> 
> It's still a possibility.  I gave Jason a patch for that quite some time
> ago; I don't recall hearing whether it turned out to actually be useful.
> 

Hi Richard,

One issue we also have is with the jmp;jmp problem... which
fundamentally comes from the following issue:

when asm goto() is used without a fallthrough (a __builtin_unreachable()
immediately after it, only possible in gcc 4.6.1+) then gcc assumes that
it can reorder the successor blocks arbitrarily, since it has to "jump
anyway".  This eliminates the very useful optimization of replacing the
jump with a NOP in the common case.

The alternative, having a fallthrough, means that if gcc has to jump
anyway, then you end up with a jump to a jump, even if the first of
those jumps can usually be nullified.

I talked to H.J. about this, and he suggested that we'd do something
like "assume the first label in the asm goto is the preferred
fallthrough."  I never got around to writing up an RFE bugzilla on this,
but do you have any feelings about how useful this would be?

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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