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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 25 Feb 2022 12:18:04 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        stable@...r.kernel.org
Subject: Re: [for-linus][PATCH 09/13] tracefs: Set the group ownership in
 apply_options() not parse_options()

On Fri, 25 Feb 2022 17:11:00 +0000
Al Viro <viro@...iv.linux.org.uk> wrote:

> On Fri, Feb 25, 2022 at 11:52:00AM -0500, Steven Rostedt wrote:
> 
> > @@ -293,6 +292,9 @@ static int tracefs_apply_options(struct super_block *sb)
> >  	inode->i_uid = opts->uid;
> >  	inode->i_gid = opts->gid;
> >  
> > +	if (tracefs_mount && tracefs_mount->mnt_root)
> > +		set_gid(tracefs_mount->mnt_root, opts->gid);
> > +  
> 
> Umm...  Why bother with tracefs_mount here in the first place?
> You have the superblock the operation is applied for - right in the
> arguments.

Ah, because I didn't realize they were one and the same ;-)

> 
> Just make that
> 	set_gid(sb->s_root, opts->gid);
> and be done with that.  Same place in tracefs_apply_options()...
> 
> Incidentally, I'm not sure you need to keep ->i_gid assignment - set_gid()
> won't miss that inode, so...

Makes sense. Thanks.

I guess I wont be sending my pull request to Linus now :-/

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ