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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <19306ab7-6fda-e995-e61d-2ddf4910e126@189.cn>
Date:   Wed, 19 Oct 2022 09:27:05 +0800
From:   Song Chen <chensong_2000@....cn>
To:     "Masami Hiramatsu (Google)" <mhiramat@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org, xiehuan09@...il.com
Subject: Re: [PATCH] trace/kprobe: remove duplicated call of
 ring_buffer_event_data

Hi,

在 2022/10/18 23:22, Masami Hiramatsu (Google) 写道:
> Hi,
> 
> On Tue, 18 Oct 2022 09:59:32 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
> 
>>
>> [ Added Masami who's the new co-maintainer, and this is his code ]
>>
>> On Tue, 18 Oct 2022 15:13:06 +0800
>> Song Chen <chensong_2000@....cn> wrote:
>>
>>> Function __kprobe_trace_func calls ring_buffer_event_data to get
>>> a ring buffer, however, it has been done in above call
>>> trace_event_buffer_reserve.
>>>
>>> So remove one of them.
>>>
>>
>> May as well add:
>>
>> Fixes: 5e6cd84e2f8bd ("tracing/kprobes: Do not open code event reserve logic")
>>
>> Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> 
> Oops, and we have another line in __kretprobe_trace_func() too.
> 
> Song, can you update this patch to fix the __kretprobe_trace_func() too?
> 
> Thank you,
> 

will do

Song
>>
>> -- Steve
>>
>>
>>> Signed-off-by: Song Chen <chensong_2000@....cn>
>>> ---
>>>   kernel/trace/trace_kprobe.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
>>> index 23f7f0ec4f4c..dfd5809a4a65 100644
>>> --- a/kernel/trace/trace_kprobe.c
>>> +++ b/kernel/trace/trace_kprobe.c
>>> @@ -1394,7 +1394,6 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
>>>   		return;
>>>   
>>>   	fbuffer.regs = regs;
>>> -	entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
>>>   	entry->ip = (unsigned long)tk->rp.kp.addr;
>>>   	store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
>>>   
>>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ