diff mbox series

[1/3] tracing: Document tracefs gid mount option

Message ID 20241028214550.2099923-2-kaleshsingh@google.com (mailing list archive)
State New
Headers show
Series Tracefs gid mount option fixes | expand

Commit Message

Kalesh Singh Oct. 28, 2024, 9:43 p.m. UTC
[1] and [2] introduced a new gid mount options that could apply to a
group to all entries in tracefs.

Document this in the tracing readme.

[1] https://lore.kernel.org/r/20211208075720.4855d180@gandalf.local.home/T/#u
[2] https://lore.kernel.org/r/20211207171729.2a54e1b3@gandalf.local.home/T/#u

Cc: David Howells <dhowells@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
---
 kernel/trace/trace.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Steven Rostedt Oct. 28, 2024, 11:12 p.m. UTC | #1
On Mon, 28 Oct 2024 14:43:57 -0700
Kalesh Singh <kaleshsingh@google.com> wrote:

> [1] and [2] introduced a new gid mount options that could apply to a
> group to all entries in tracefs.
> 
> Document this in the tracing readme.
> 
> [1] https://lore.kernel.org/r/20211208075720.4855d180@gandalf.local.home/T/#u
> [2] https://lore.kernel.org/r/20211207171729.2a54e1b3@gandalf.local.home/T/#u

Your patch series is backwards. The first patch should be the fix, the
second be this patch and the last one is the test case.

You should reference commit IDs and not links.

   Commit ee7f3666995d ("tracefs: Have new files inherit the ownership of
   their parent") and commit 48b27b6b5191 ("tracefs: Set all files to the
   same group ownership as the mount option") introduced a new gid..."

-- Steve

> 
> Cc: David Howells <dhowells@redhat.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
> ---
>  kernel/trace/trace.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index a8f52b6527ca..2b64b3ec67d9 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -5501,6 +5501,10 @@ static const struct file_operations tracing_iter_fops = {
>  
>  static const char readme_msg[] =
>  	"tracing mini-HOWTO:\n\n"
> +	"By default tracefs removes all OTH file permission bits.\n"
> +	"When mounting tracefs an optional group id can be specified\n"
> +	"which adds the group to every directory and file in tracefs:\n\n"
> +	"\t e.g. mount -t tracefs [-o [gid=<gid>]] nodev /sys/kernel/tracing\n\n"
>  	"# echo 0 > tracing_on : quick way to disable tracing\n"
>  	"# echo 1 > tracing_on : quick way to re-enable tracing\n\n"
>  	" Important files:\n"
diff mbox series

Patch

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a8f52b6527ca..2b64b3ec67d9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5501,6 +5501,10 @@  static const struct file_operations tracing_iter_fops = {
 
 static const char readme_msg[] =
 	"tracing mini-HOWTO:\n\n"
+	"By default tracefs removes all OTH file permission bits.\n"
+	"When mounting tracefs an optional group id can be specified\n"
+	"which adds the group to every directory and file in tracefs:\n\n"
+	"\t e.g. mount -t tracefs [-o [gid=<gid>]] nodev /sys/kernel/tracing\n\n"
 	"# echo 0 > tracing_on : quick way to disable tracing\n"
 	"# echo 1 > tracing_on : quick way to re-enable tracing\n\n"
 	" Important files:\n"