[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211207121021.4d261d6e@gandalf.local.home>
Date: Tue, 7 Dec 2021 12:10:21 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Kalesh Singh <kaleshsingh@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Yabin Cui <yabinc@...gle.com>
Subject: Re: [RFC][PATCH] tracefs: Set all files to the same group ownership
as the mount option
On Tue, 7 Dec 2021 09:04:30 -0800
Kalesh Singh <kaleshsingh@...gle.com> wrote:
> One thing that I missed before: There are files that can be generated
> after the mount, for instance when a new synthetic event is added new
> entries for that event are created under events/synthetic/ and when a
> new instance is created the new entries generated under instances/.
> These new entries don't honor the gid specified when mounting. Could
> we make it so that they also respect the specified gid?
They don't?
/me looks at code
Aw crap. I thought since I have this:
static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts)
{
[..]
case Opt_gid:
if (match_int(&args[0], &option))
return -EINVAL;
gid = make_kgid(current_user_ns(), option);
if (!gid_valid(gid))
return -EINVAL;
opts->gid = gid;
set_gid(tracefs_mount->mnt_root, gid);
[..]
That the new files would inherit the opts->gid. But I see that they do not.
I'll add that as a separate patch.
Thanks for bringing that to my attention.
-- Steve
Powered by blists - more mailing lists