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: <20230428102224.061dfbc9a925ab550cb978a8@kernel.org>
Date:   Fri, 28 Apr 2023 10:22:24 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Jiri Olsa <olsajiri@...il.com>
Cc:     linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Florent Revest <revest@...omium.org>,
        Mark Rutland <mark.rutland@....com>,
        Will Deacon <will@...nel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Martin KaFai Lau <martin.lau@...ux.dev>, bpf@...r.kernel.org
Subject: Re: [PATCH v7 04/11] tracing/probes: Add tracepoint support on
 fprobe_events

On Thu, 27 Apr 2023 13:59:03 +0200
Jiri Olsa <olsajiri@...il.com> wrote:

> On Thu, Apr 27, 2023 at 10:18:24AM +0900, Masami Hiramatsu (Google) wrote:
> 
> SNIP
> 
> >  	ret = traceprobe_parse_probe_arg(&ep->tp, i, argv[i], flags);
> > diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c
> > index 0049d9ef2402..7c8be8a3616f 100644
> > --- a/kernel/trace/trace_fprobe.c
> > +++ b/kernel/trace/trace_fprobe.c
> > @@ -9,6 +9,7 @@
> >  #include <linux/module.h>
> >  #include <linux/rculist.h>
> >  #include <linux/security.h>
> > +#include <linux/tracepoint.h>
> >  #include <linux/uaccess.h>
> >  
> >  #include "trace_dynevent.h"
> > @@ -17,6 +18,7 @@
> >  #include "trace_probe_tmpl.h"
> >  
> >  #define FPROBE_EVENT_SYSTEM "fprobes"
> > +#define TRACEPOINT_EVENT_SYSTEM "tracepoints"
> 
> so the created tracepoints go under 'events/tracepoints' directory,
> should the name be more fprobe specific? like under 'events/fprobe/tracepoints' ?

No, because trace event only support single-level class directory, and
I think this can provide a more abstract interface to the user.

Thanks,

> 
> jirka
> 
> >  #define RETHOOK_MAXACTIVE_MAX 4096
> >  
> >  static int trace_fprobe_create(const char *raw_command);
> > @@ -41,6 +43,8 @@ struct trace_fprobe {
> >  	struct dyn_event	devent;
> >  	struct fprobe		fp;
> >  	const char		*symbol;
> > +	struct tracepoint	*tpoint;
> > +	struct module		*mod;
> >  	struct trace_probe	tp;
> >  };
> >  
> > @@ -68,6 +72,11 @@ static bool trace_fprobe_is_return(struct trace_fprobe *tf)
> >  	return tf->fp.exit_handler != NULL;
> >  }
> >  
> > +static bool trace_fprobe_is_tracepoint(struct trace_fprobe *tf)
> > +{
> > +	return tf->tpoint != NULL;
> > +}
> > +
> 
> SNIP


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ