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:	Mon, 05 Aug 2013 15:57:44 -0400
From:	Jason Baron <jbaron@...mai.com>
To:	Marek Polacek <polacek@...hat.com>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>, gcc <gcc@....gnu.org>,
	Ingo Molnar <mingo@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Daney <ddaney.cavm@...il.com>,
	Behan Webster <behanw@...verseincode.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Herbert Xu <herbert@...dor.hengli.com.au>, rth@...ddle.net
Subject: Re: [RFC] gcc feature request: Moving blocks into sections

On 08/05/2013 03:40 PM, Marek Polacek wrote:
> On Mon, Aug 05, 2013 at 11:34:55AM -0700, Linus Torvalds wrote:
>> On Mon, Aug 5, 2013 at 11:24 AM, Linus Torvalds
>> <torvalds@...ux-foundation.org> wrote:
>>> Ugh. I can see the attraction of your section thing for that case, I
>>> just get the feeling that we should be able to do better somehow.
>> Hmm.. Quite frankly, Steven, for your use case I think you actually
>> want the C goto *labels* associated with a section. Which sounds like
>> it might be a cleaner syntax than making it about the basic block
>> anyway.
> FWIW, we also support hot/cold attributes for labels, thus e.g.
>
>    if (bar ())
>      goto A;
>    /* ... */
> A: __attribute__((cold))
>    /* ... */
>
> I don't know whether that might be useful for what you want or not though...
>
> 	Marek
>

It certainly would be.

That was how I wanted to the 'static_key' stuff to work, but 
unfortunately the last time I tried it, it didn't move the text 
out-of-line any further than it was already doing. Would that be 
expected? The change for us, if it worked would be quite simple. 
Something like:

--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -21,7 +21,7 @@ static __always_inline bool arch_static_branch(struct 
static_key *key)
                 ".popsection \n\t"
                 : :  "i" (key) : : l_yes);
         return false;
-l_yes:
+l_yes: __attribute__((cold))
         return true;
  }




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