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:	Fri, 05 Apr 2013 12:47:04 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Anton Arapov <anton@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH 3/4] uprobes/tracing: Kill the pointless local_save_flags/preempt_count
 calls

(2013/04/04 23:25), Srikar Dronamraju wrote:
> * Oleg Nesterov <oleg@...hat.com> [2013-03-29 19:15:45]:
> 
>> uprobe_trace_func() is never called with irqs or preemption
>> disabled, no need to ask preempt_count() or local_save_flags().
>>
>> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> 
> Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> 
> Adding Masami in the Cc.

Thanks :), since the running context of uprobe handler is
different from kprobe one, this change is only needed for uprobe.

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>

Thank you,

> 
>> ---
>>  kernel/trace/trace_uprobe.c |   10 +++-------
>>  1 files changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
>> index 8e00901..43d258d 100644
>> --- a/kernel/trace/trace_uprobe.c
>> +++ b/kernel/trace/trace_uprobe.c
>> @@ -492,17 +492,13 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
>>  	struct ring_buffer_event *event;
>>  	struct ring_buffer *buffer;
>>  	u8 *data;
>> -	int size, i, pc;
>> -	unsigned long irq_flags;
>> +	int size, i;
>>  	struct ftrace_event_call *call = &tu->call;
>>
>> -	local_save_flags(irq_flags);
>> -	pc = preempt_count();
>> -
>>  	size = sizeof(*entry) + tu->size;
>>
>>  	event = trace_current_buffer_lock_reserve(&buffer, call->event.type,
>> -						  size, irq_flags, pc);
>> +						  size, 0, 0);
>>  	if (!event)
>>  		return 0;
>>
>> @@ -513,7 +509,7 @@ static int uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs)
>>  		call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset);
>>
>>  	if (!filter_current_check_discard(buffer, call, entry, event))
>> -		trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
>> +		trace_buffer_unlock_commit(buffer, event, 0, 0);
>>
>>  	return 0;
>>  }
>> -- 
>> 1.5.5.1
>>
> 


-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


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