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]
Message-ID: <c5ffd55d5785ab1c3a2a94af528e34fa26b68767.camel@kernel.crashing.org>
Date:   Thu, 04 Jul 2019 16:29:23 +1000
From:   Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Muchun Song <smuchun@...il.com>, rafael@...nel.org,
        prsood@...eaurora.org, mojha@...eaurora.org, gkohli@...eaurora.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 OPT2] driver core: Fix use-after-free and double free
 on glue directory

On Thu, 2019-07-04 at 07:40 +0200, Greg KH wrote:
> On Thu, Jul 04, 2019 at 08:57:13AM +1000, Benjamin Herrenschmidt
> wrote:
> > On Wed, 2019-07-03 at 21:36 +0200, Greg KH wrote:
> > > 
> > > > -static struct kobject *get_device_parent(struct device *dev,
> > > > -					 struct device *parent)
> > > > +/**
> > > > + * __get_device_parent() - Get the parent device kobject.
> > > > + * @dev: Pointer to the device structure.
> > > > + * @parent: Pointer to the parent device structure.
> > > > + * @lock: When we live in a glue directory, should we hold the
> > > > + *        gdp_mutex lock when this function returns? If @lock
> > > > + *        is true, this function returns with the gdp_mutex
> > > > + *        holed. Otherwise it will not.
> > > 
> > > Ugh, if you are trying to get me to hate one version of these
> > > patches,
> > > this is how you do it :)
> > > 
> > > A function should not "sometimes takes a lock, sometimes does
> > > not,
> > > depending on a parameter passed into it"  That way lies
> > > madness...
> > 
> > Yes, I prefer this approach to the fix but I dont like the patch
> > either
> > for the same reason...
> > 
> >  ...
> > 
> > > Anyway, this is a mess.
> > > 
> > > Ugh I hate glue dirs...
> > 
> > Amen...
> 
> Well, can we just remove them?  Who relies on them anymore?

Isn't it an ABI ? I'm sure there are going to be userspace things that
break if we do...

Cheers,
Ben.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ