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]
Message-Id: <20221019234615.061b981d888b374220e39324@kernel.org>
Date:   Wed, 19 Oct 2022 23:46:15 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Song Chen <chensong_2000@....cn>, mingo@...hat.com,
        mhiramat@...nel.org, linux-kernel@...r.kernel.org,
        xiehuan09@...il.com
Subject: Re: [PATCH v2] trace/kprobe: remove duplicated calls of
 ring_buffer_event_data

On Wed, 19 Oct 2022 09:30:22 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Wed, 19 Oct 2022 10:11:18 +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 does __kretprobe_trace_func.
> > 
> > This patch removes those duplicated calls.
> > 
> > Signed-off-by: Song Chen <chensong_2000@....cn>
> 
> Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> 
> Masami, want to take this one?

yes, this looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thank you,

> 
> -- Steve
> 
> > ---
> >  kernel/trace/trace_kprobe.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> > index 23f7f0ec4f4c..f905829b856b 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);
> >  
> > @@ -1435,7 +1434,6 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
> >  		return;
> >  
> >  	fbuffer.regs = regs;
> > -	entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
> >  	entry->func = (unsigned long)tk->rp.kp.addr;
> >  	entry->ret_ip = get_kretprobe_retaddr(ri);
> >  	store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ