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]
Date:   Tue, 18 Jan 2022 10:02:44 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Beau Belgrave <beaub@...ux.microsoft.com>
Cc:     rostedt@...dmis.org, linux-trace-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 01/12] user_events: Add minimal support for
 trace_event into ftrace

On Mon, 17 Jan 2022 10:09:14 -0800
Beau Belgrave <beaub@...ux.microsoft.com> wrote:

> On Tue, Jan 18, 2022 at 12:45:17AM +0900, Masami Hiramatsu wrote:
> > Hi Beau,
> > 
> > On Tue, 11 Jan 2022 09:25:51 -0800
> > Beau Belgrave <beaub@...ux.microsoft.com> wrote:
> > 
> > > +static int user_event_show(struct seq_file *m, struct dyn_event *ev)
> > > +{
> > > +	struct user_event *user = container_of(ev, struct user_event, devent);
> > > +	struct ftrace_event_field *field, *next;
> > > +	struct list_head *head;
> > > +	int depth = 0;
> > > +
> > > +	seq_printf(m, "%s%s", USER_EVENTS_PREFIX, EVENT_NAME(user));
> > > +
> > > +	head = trace_get_fields(&user->call);
> > > +
> > > +	list_for_each_entry_safe_reverse(field, next, head, link) {
> > > +		if (depth == 0)
> > > +			seq_puts(m, " ");
> > > +		else
> > > +			seq_puts(m, "; ");
> > > +		seq_printf(m, "%s %s", field->type, field->name);
> > > +		depth++;
> > > +	}
> > > +
> > > +	seq_puts(m, "\n");
> > > +
> > > +	return 0;
> > > +}
> > 
> > Let me confirm just one point. Your syntax supports
> > 
> > [__data_loc|__rel_loc] [unsigned] TYPE[\[LEN\]] NAME
> > 
> > or
> > 
> > struct TYPE NAME SIZE
> > 
> > for the fields, right? In that case, above seq_printf() seems not enough.
> 
> Yep, I see.
> 
> The non-struct cases work as expected from my testing:
> echo 'u:test unsigned char msg[20]' > dynamic_events
> cat dynamic_events
> u:test unsigned char msg[20]
> 
> In the struct case you are right, it's missing the size. Good catch!
> I'll fix this up!
> 
> Was there another case you had in mind that I might have missed beyond
> the struct case?

No, that's the only one which I found :)

> 
> I also would like, since I'm re-spinning, to fix a warning the intel bot
> found related to the same code pulled from single_open, etc.
> 
> See https://lore.kernel.org/llvm/YeGk0nIH9x91k01I@archlinux-ax161/

OK, I'll then wait for your next version.

Thank you!

> 
> > 
> > Thank you,
> > 
> > 
> > -- 
> > Masami Hiramatsu <mhiramat@...nel.org>
> 
> Thanks,
> -Beau


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ