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: <YxkS5uzouv2bn6ZB@google.com>
Date:   Wed, 7 Sep 2022 14:53:42 -0700
From:   Brian Norris <briannorris@...omium.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] tracefs: Only clobber mode/uid/gid on remount if
 asked

On Wed, Sep 07, 2022 at 05:48:13PM -0400, Steven Rostedt wrote:
> On Wed, 7 Sep 2022 17:46:04 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > >   # Don't change /sys/kernel/tracing/ permissions on automount.
> > >   umount /sys/kernel/debug/tracing/  
> > 
> > BTW, I noticed that the above doesn't do anything. That is,
> > you cannot unmount tracefs from /sys/kernel/debug/tracing.

Actually, it does work, but it's hard to observe. See below.

> I just saw your new email. I guess that's just how you were triggering the
> automount, by unmounting it. Right?

You trimmed the important line:
  stat /sys/kernel/debug/tracing/.

It's hard to observe directly that /sys/kernel/debug/tracing is
unmounted, because traditional examination (stat(2), open(2), etc.)
methods will re-trigger the automount. The automount is *supposed* to
appear as if it is always there.

Try these:

  umount /sys/kernel/debug/tracing/
  grep tracefs /proc/mounts
  stat /sys/kernel/debug/tracing/.
  grep tracefs /proc/mounts

The first and the second grep will give you different results.

> A lot of assumptions about what people may know ;-)

Yes, I suppose. That's also why I figured I'd write a test case, because
test cases tell you exactly what is meant.

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ