Messages in this thread | | | Date | Wed, 7 Sep 2022 21:25:42 -0400 | From | Steven Rostedt <> | 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@chromium.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@chromium.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@chromium.org>
| |