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:   Thu, 28 Oct 2021 10:10:17 -0700
From:   Kalesh Singh <kaleshsingh@...gle.com>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>, surenb@...gle.com,
        hridya@...gle.com, namhyung@...nel.org, kernel-team@...roid.com,
        Ingo Molnar <mingo@...hat.com>, Shuah Khan <shuah@...nel.org>,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/3] tracing/kselftests: Remove triggers with references
 before their definitions

On Wed, Oct 27, 2021 at 7:58 PM Kalesh Singh <kaleshsingh@...gle.com> wrote:
>
> On Wed, Oct 27, 2021 at 5:43 PM Masami Hiramatsu <mhiramat@...nel.org> wrote:
> >
> > On Wed, 27 Oct 2021 19:54:54 -0400
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> >
> > > On Wed, 27 Oct 2021 16:26:00 -0700
> > > Kalesh Singh <kaleshsingh@...gle.com> wrote:
> > >
> > > > > Why don't you use 'tac'? I love that idea :)
> > > > > Did you find any issue?
> > > >
> > > > Hi Masami,
> > > >
> > > > Thanks for the reviews. As with the first set of patches using tac
> > > > gives a regression here, though I'm not sure why it doesn't work -- I
> > > > also thought reversing the order would handle any dependencies
> > > > correctly.
> > >
> > > Right, because are triggers not added by list_add_rcu() which adds to
> > > the head of the list.
> >
> > Oops, so are the triggers shown in the reverse order?
> > (newer entry is top, older one is bottom)
> > Then do we need this patch, because we don't care about the
> > dependency.
>
> In the case of the hist expression tests. they create a variable:
> echo 'hist:keys=common_pid:x=1+2' >> trigger
>
> Then print its value in another histogram:
> echo 'hist:keys=common_pid:vals=$x' >> trigger
>
> At least in this case, the triggers are listed from oldest (top) to
> newest (bottom):
> cat trigger
> hist:keys=common_pid:vals=hitcount:x=3:sort=hitcount:size=2048 [active]

I realized the result of the expression can be read directly from the
trigger info, now that expressions of constants are squashed to a
single constant. So we wouldn't need the second trigger to see the
value and can drop this patch. I'll resend a new version.

Thanks,
Kalesh

> hist:keys=common_pid:vals=hitcount,$x:sort=hitcount:size=2048 [active]
>
> So we need to remove the trigger with the var ref first.
>
> - Kalesh
> >
> > > If anything, shouldn't things be removed in order?
> >
> > Hmm, I think the trigger itself might better to be changed. If any dependency in
> > the trigger list, it can not be restored from the copied file, like
> > below may fail.
> >
> > cat events/foo/bar/trigger > /tmp/foo.bar.trigger
> > cat /tmp/foo.bar.trigger > events/foo/bar/trigger
> >
> > (of course we can use 'tac' to restore it ...)
> >
> > This is
> >
> > Thank you,
> >
> >
> > --
> > Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ