From: David Laight <David.Laight@ACULAB.COM>
To: 'Andy Shevchenko' <andy.shevchenko@gmail.com>,
Arnd Bergmann <arnd@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
"Christoph Hellwig" <hch@lst.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>,
"linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>
Subject: RE: [PATCH] media: atomisp: remove compat_ioctl32 code
Date: Mon, 17 May 2021 13:04:31 +0000 [thread overview]
Message-ID: <eb34029138bd4c02960a59c88009cc76@AcuMS.aculab.com> (raw)
In-Reply-To: <CAHp75Ve7FZQwj-aO_TJ4ddYmhRMez+CapH4YUV7s3-6zVjdLnA@mail.gmail.com>
From: Andy Shevchenko
> Sent: 17 May 2021 08:10
>
> On Mon, May 17, 2021 at 3:27 AM Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > From: Arnd Bergmann <arnd@arndb.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)
next prev parent reply other threads:[~2021-05-17 13:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-16 20:47 [PATCH] media: atomisp: remove compat_ioctl32 code Arnd Bergmann
2021-05-17 7:10 ` Andy Shevchenko
2021-05-17 13:04 ` David Laight [this message]
2021-05-17 13:08 ` Christoph Hellwig
2021-05-17 13:30 ` Arnd Bergmann
2021-05-24 15:18 ` Sakari Ailus
2021-05-28 7:19 ` Arnd Bergmann
2021-05-28 9:56 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb34029138bd4c02960a59c88009cc76@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox