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: <736090577.117.1581520071732.JavaMail.zimbra@efficios.com>
Date:   Wed, 12 Feb 2020 10:07:51 -0500 (EST)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        "Joel Fernandes, Google" <joel@...lfernandes.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        paulmck <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [PATCH 6/8] perf,tracing: Prepare the perf-trace interface for
 RCU changes

----- On Feb 12, 2020, at 9:26 AM, rostedt rostedt@...dmis.org wrote:

> On Wed, 12 Feb 2020 10:32:16 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
> 
>> The tracepoint interface will stop providing regular RCU context; make
>> sure we do it ourselves, since perf makes use of regular RCU protected
>> data.
>> 
> 
> Suggested-by: Steven Rostedt (VMware) <rosted@...dmis.org>

and

Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>

Thanks :)

Mathieu

> 
>  ;-)
> 
> -- Steve
> 
>> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
>> ---
>>  kernel/events/core.c |    5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -8950,6 +8950,7 @@ void perf_tp_event(u16 event_type, u64 c
>>  {
>>  	struct perf_sample_data data;
>>  	struct perf_event *event;
>> +	unsigned long rcu_flags;
>>  
>>  	struct perf_raw_record raw = {
>>  		.frag = {
>> @@ -8961,6 +8962,8 @@ void perf_tp_event(u16 event_type, u64 c
>>  	perf_sample_data_init(&data, 0, 0);
>>  	data.raw = &raw;
>>  
>> +	rcu_flags = trace_rcu_enter();
>> +
>>  	perf_trace_buf_update(record, event_type);
>>  
>>  	hlist_for_each_entry_rcu(event, head, hlist_entry) {
>> @@ -8996,6 +8999,8 @@ void perf_tp_event(u16 event_type, u64 c
>>  	}
>>  
>>  	perf_swevent_put_recursion_context(rctx);
>> +
>> +	trace_rcu_exit(rcu_flags);
>>  }
>>  EXPORT_SYMBOL_GPL(perf_tp_event);
>>  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ