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, 20 Oct 2010 00:27:25 +0200
From:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>
To:	"Steven Rostedt" <rostedt@...dmis.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>,
	"Koki Sanagi" <sanagi.koki@...fujitsu.com>,
	"Peter Zijlstra" <peterz@...radead.org>,
	"Ingo Molnar" <mingo@...e.hu>,
	"Frederic Weisbecker" <fweisbec@...il.com>, nhorman@...driver.com,
	scott.a.mcmillan@...el.com, laijs@...fujitsu.com,
	"LKML" <linux-kernel@...r.kernel.org>, eric.dumazet@...il.com,
	kaneshige.kenji@...fujitsu.com,
	"David Miller" <davem@...emloft.net>, izumi.taku@...fujitsu.com,
	kosaki.motohiro@...fujitsu.com,
	"Heiko Carstens" <heiko.carstens@...ibm.com>,
	"Luck, Tony" <tony.luck@...el.com>
Subject: Re: [PATCH] tracing: Cleanup the convoluted softirq tracepoints

On Wed, October 20, 2010 12:23 am, Steven Rostedt wrote:

>> static __always_inline __pure bool __switch_point(...)
>> {
>> 	asm goto("1: " JUMP_LABEL_INITIAL_NOP
>> 		 /* ... patching stuff */
>> 		: : : : t_jump);
>> 	return false;
>> t_jump:
>> 	return true;
>> }
>>
>> #define SWITCH_POINT(x) unlikely(__switch_point(x))
>>
>> I *suspect* this will resolve the need for hot/cold labels just fine.
>
> Interesting, we could try this.

Due to not actually having a sane key type the above is not easy to
implement, but I tried:

#define _SWITCH_POINT(x)\
({                                                              \
        __label__ jl_enabled;                                   \
        bool ret = true;                                        \
        JUMP_LABEL(x, jl_enabled);                              \
        ret = false;                                            \
jl_enabled:                                                     \
        ret;            })

#define SWITCH_POINT(x) unlikely(_SWITCH_POINT(x))

#define COND_STMT(key, stmt)                                    \
do {                                                            \
        if (SWITCH_POINT(key)) {                                \
                stmt;                                           \
        }                                                       \
} while (0)


and that's still generating these double jumps.

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