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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 2 Mar 2022 22:23:25 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Tom Zanussi <zanussi@...nel.org>
Subject: Re: [PATCH 2/2] tracing: Add sample code for custom trace events

On Thu, 3 Mar 2022 10:40:06 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> > +static struct trace_event_call sched_switch_call = {
> > +	.class			= &sched_switch_class,
> > +	.event			= {
> > +		.funcs			= &sched_switch_funcs,
> > +	},
> > +	.print_fmt		= SCHED_PRINT_FMT,
> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
> > +	.module			= THIS_MODULE,
> > +#else
> > +	.mod			= THIS_MODULE,
> > +#endif  
> 
> I think this example code doesn't need to care about older kernels. 

Oops, I thought I got rid of all the mod versions :-p  I had this
working on a 5.4 kernel that we were going use, and there was a bunch
more of these in my original code. I'll nuke this on v2.

> 
> Others looks good to me.
> 
> Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>
> 
> Hopefully, it is more helpful if there are more comments for other developers. :-)
> (and usage comments too)

Actually, I was thinking of coming up with a bunch of helper
functions/macros to make this less complex. But yeah, it needs a bunch
of comments before it can be accepted.

Thanks a lot for the review!

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ