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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 10 Dec 2017 11:33:18 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     viro@...IV.linux.org.uk, mhocko@...nel.org
Cc:     david@...morbit.com, jack@...e.cz, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH v2] fs: handle shrinker registration failure in sget_userns

Al Viro wrote:
> On Sat, Dec 09, 2017 at 08:59:22PM +0000, Al Viro wrote:
> > On Wed, Nov 29, 2017 at 12:55:15PM +0100, Michal Hocko wrote:
> > > On Thu 23-11-17 14:55:40, Al Viro wrote:
> > > > On Thu, Nov 23, 2017 at 03:35:37PM +0100, Michal Hocko wrote:
> > > > > Hopefully less screwed version.  But as I've said I am not really
> > > > > familiar with the code and do not feel competent to change it so please
> > > > > be very careful here. I've moved the shrinker registration to
> > > > > alloc_super which turned out to be simpler.
> > > > 
> > > > I don't get it.  Why the hell do we need all that PITA in the first place?
> > > > Just make sget_userns() end with
> > > > 	if (unlikely(regsiter_shrinker(&s->s_shrink) != 0)) {
> > > > 		deactivate_locked_super(s);
> > > > 		s = ERR_PTR(-ENOMEM);
> > > > 	}
> > > > 	return s;
> > > > and be done with that.  All there is to it...
> > > 
> > > Al, do you plan to push this fix? Tetsuo's unregister_shrinker
> > > fortification is already in the mmotm tree.
> > 
> > Is it in any git branch I could pull from?  Or I could just throw it
> > into vfs.git#for-linus before the fix above - up to you, folks...
> 
> Actually, looking at mmotm...  I don't see it there.  Which patch
> is it in?
> 

My unregister_shrinker() fortification patch
( http://lkml.kernel.org/r/1511523385-6433-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp )
is not yet in the mmotm tree due to disagreement between Michal and I, but
you can throw your sget_userns() patch into vfs.git#for-linus anyway.
We will eventually apply unregister_shrinker() fortification patch.

I'm observing whether people notice my __must_check annotation patch
( http://lkml.kernel.org/r/1511523385-6433-2-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp )
in linux-next.git and fix register_shrinker() callers. If people do not fix
the callers, both patches need to be sent to linux.git.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ