[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220907212542.513afad2@gandalf.local.home>
Date: Wed, 7 Sep 2022 21:25:42 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Brian Norris <briannorris@...omium.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, 7 Sep 2022 13:52:15 -0700
Brian Norris <briannorris@...omium.org> wrote:
> Existing behavior:
>
> ## Pre-existing status: tracefs is 0755.
> # stat -c '%A' /sys/kernel/tracing/
> drwxr-xr-x
>
> ## (Re)trigger the automount.
> # umount /sys/kernel/debug/tracing
> # stat -c '%A' /sys/kernel/debug/tracing/.
> drwx------
>
> ## Unexpected: the automount changed mode for other mount instances.
> # stat -c '%A' /sys/kernel/tracing/
> drwx------
>
> New behavior:
>
> ## Pre-existing status: tracefs is 0755.
> # stat -c '%A' /sys/kernel/tracing/
> drwxr-xr-x
>
> ## (Re)trigger the automount.
> # umount /sys/kernel/debug/tracing
> # stat -c '%A' /sys/kernel/debug/tracing/.
> drwxr-xr-x
>
> ## Expected: the automount does not change other mount instances.
> # stat -c '%A' /sys/kernel/tracing/
> drwxr-xr-x
Thanks!
Here's the new change log:
-- Steve
From: Brian Norris <briannorris@...omium.org>
Subject: [PATCH] tracefs: Only clobber mode/uid/gid on remount if asked
Users may have explicitly configured their tracefs permissions; we
shouldn't overwrite those just because a second mount appeared.
Only clobber if the options were provided at mount time.
Note: the previous behavior was especially surprising in the presence of
automounted /sys/kernel/debug/tracing/.
Existing behavior:
## Pre-existing status: tracefs is 0755.
# stat -c '%A' /sys/kernel/tracing/
drwxr-xr-x
## (Re)trigger the automount.
# umount /sys/kernel/debug/tracing
# stat -c '%A' /sys/kernel/debug/tracing/.
drwx------
## Unexpected: the automount changed mode for other mount instances.
# stat -c '%A' /sys/kernel/tracing/
drwx------
New behavior (after this change):
## Pre-existing status: tracefs is 0755.
# stat -c '%A' /sys/kernel/tracing/
drwxr-xr-x
## (Re)trigger the automount.
# umount /sys/kernel/debug/tracing
# stat -c '%A' /sys/kernel/debug/tracing/.
drwxr-xr-x
## Expected: the automount does not change other mount instances.
# stat -c '%A' /sys/kernel/tracing/
drwxr-xr-x
Signed-off-by: Brian Norris <briannorris@...omium.org>
Powered by blists - more mailing lists