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]
Message-ID: <eb34029138bd4c02960a59c88009cc76@AcuMS.aculab.com>
Date:   Mon, 17 May 2021 13:04:31 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Andy Shevchenko' <andy.shevchenko@...il.com>,
        Arnd Bergmann <arnd@...nel.org>
CC:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Hans Verkuil <hverkuil@...all.nl>,
        "Christoph Hellwig" <hch@....de>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Linux Media Mailing List" <linux-media@...r.kernel.org>,
        "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>
Subject: RE: [PATCH] media: atomisp: remove compat_ioctl32 code

From: Andy Shevchenko
> Sent: 17 May 2021 08:10
> 
> On Mon, May 17, 2021 at 3:27 AM Arnd Bergmann <arnd@...nel.org> wrote:
> >
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > This is one of the last remaining users of compat_alloc_user_space()
> > and copy_in_user(), which are in the process of getting removed.
> >
> > As of commit 57e6b6f2303e ("media: atomisp_fops.c: disable
> > atomisp_compat_ioctl32"), nothing in this file is actually getting used
> > as the only reference has been stubbed out.
> >
> > Remove the entire file -- anyone willing to restore the functionality
> > can equally well just look up the contents in the git history if needed.
> 
> Everything which removes tons of LOCs in this driver I like by default, thanks!
....
> > diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c
> b/drivers/staging/media/atomisp/pci/atomisp_fops.c
> > index f1e6b2597853..e383e17c5072 100644
> > --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
> > +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
> > @@ -1283,7 +1283,8 @@ const struct v4l2_file_operations atomisp_fops = {
> >         .unlocked_ioctl = video_ioctl2,
> >  #ifdef CONFIG_COMPAT
> >         /*
> > -        * There are problems with this code. Disable this for now.
> > +        * this was removed because of bugs, the interface
> > +        * needs to be made safe for compat tasks instead.
> >         .compat_ioctl32 = atomisp_compat_ioctl32,
> >          */
> >  #endif
> > @@ -1297,10 +1298,7 @@ const struct v4l2_file_operations atomisp_file_fops = {
> >         .mmap = atomisp_file_mmap,
> >         .unlocked_ioctl = video_ioctl2,
> >  #ifdef CONFIG_COMPAT
> > -       /*
> > -        * There are problems with this code. Disable this for now.
> > -       .compat_ioctl32 = atomisp_compat_ioctl32,
> > -        */
> > +       /* .compat_ioctl32 = atomisp_compat_ioctl32, */
> >  #endif
> >         .poll = atomisp_poll,

Shouldn't they be stubbed with something that returns -ENOTTY
rather than blindly calling the 64bit code with the wrong structure?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ