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] [day] [month] [year] [list]
Date:   Wed, 28 Mar 2018 15:47:56 -0400 (EDT)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     rostedt <rostedt@...dmis.org>
Cc:     Alexei Starovoitov <ast@...com>,
        "David S. Miller" <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        netdev <netdev@...r.kernel.org>,
        kernel-team <kernel-team@...com>,
        linux-api <linux-api@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v7 bpf-next 06/10] tracepoint: compute num_args at build
 time

----- On Mar 28, 2018, at 3:38 PM, rostedt rostedt@...dmis.org wrote:

> On Wed, 28 Mar 2018 15:32:20 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
> 
>> -#define __DO_TRACE(tp, proto, args, cond, rcucheck)			\
>> +#define __DO_TRACE(name, proto, args, cond, rcucheck)			\
>>  	do {								\
>>  		struct tracepoint_func *it_func_ptr;			\
>>  		void *it_func;						\
>> @@ -140,7 +140,7 @@ extern void syscall_unregfunc(void);
>>  		if (rcucheck)						\
>>  			rcu_irq_enter_irqson();				\
>>  		rcu_read_lock_sched_notrace();				\
>> -		it_func_ptr = rcu_dereference_sched((tp)->funcs);	\
>> +		it_func_ptr = rcu_dereference_sched(__trace_##name##_funcs); \
> 
> What we lose in data size, we may make up for in text (which is even
> more important). This will remove a dereference in the hot path.
> 
> I'll make a few builds and run size on the vmlinux images to see how
> this pans out.

I like the approach. If it passes testing, I think it's a valuable improvement
to lessen cache footprint of tracepoint when tracing is active.

Thanks!

Mathieu


> 
> -- Steve
> 
> 
>>  		if (it_func_ptr) {					\
> >  			do {						\

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ