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] [day] [month] [year] [list]
Date:   Fri, 9 Aug 2019 12:25:16 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Hridya Valsaraju <hridya@...gle.com>
Cc:     devel@...verdev.osuosl.org, kernel-team@...roid.com,
        Todd Kjos <tkjos@...roid.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Arve Hjønnevåg <arve@...roid.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Martijn Coenen <maco@...roid.com>,
        Christian Brauner <christian@...uner.io>
Subject: Re: [PATCH v2 1/2] binder: Add default binder devices through
 binderfs when configured

On Wed, Aug 07, 2019 at 09:51:46AM -0700, Hridya Valsaraju wrote:
> On Wed, Aug 7, 2019 at 4:02 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:
> >
> > On Tue, Aug 06, 2019 at 11:40:05AM -0700, Hridya Valsaraju wrote:
> > > @@ -467,6 +466,9 @@ static int binderfs_fill_super(struct super_block *sb, void *data, int silent)
> > >       int ret;
> > >       struct binderfs_info *info;
> > >       struct inode *inode = NULL;
> > > +     struct binderfs_device device_info = { 0 };
> > > +     const char *name;
> > > +     size_t len;
> > >
> > >       sb->s_blocksize = PAGE_SIZE;
> > >       sb->s_blocksize_bits = PAGE_SHIFT;
> > > @@ -521,7 +523,24 @@ static int binderfs_fill_super(struct super_block *sb, void *data, int silent)
> > >       if (!sb->s_root)
> > >               return -ENOMEM;
> > >
> > > -     return binderfs_binder_ctl_create(sb);
> > > +     ret = binderfs_binder_ctl_create(sb);
> > > +     if (ret)
> > > +             return ret;
> > > +
> > > +     name = binder_devices_param;
> > > +     for (len = strcspn(name, ","); len > 0; len = strcspn(name, ",")) {
> > > +             strscpy(device_info.name, name, len + 1);
> > > +             ret = binderfs_binder_device_create(inode, NULL, &device_info);
> > > +             if (ret)
> > > +                     return ret;
> >
> > We should probably clean up before returning...  The error handling code
> > would probably be tricky to write though and it's not super common.
> 
> Thank you for taking a look Dan. Did you mean cleaning up the default
> devices that were already created? They will actually be cleaned up by
> binderfs_evict_inode() during the super block's cleanup since the
> mount operation will fail due to an error here.

Yeah.  I meant the binderfs_binder_device_create() from previous
iterations through this loop.

Good to know that it's handled.  Thanks for taking the time to look at
this.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ