driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: stop compiling compat_ioctl32 code
@ 2020-10-07 14:16 Arnd Bergmann
  2020-10-07 14:18 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2020-10-07 14:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: devel, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
	Hans Verkuil, Sakari Ailus, Christoph Hellwig, linux-media

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.

Do the same thing here and stub out the implementation as well while
leaving it in place, with a comment explaining the problem.

Alternatively, the entire file could just be removed, since anyone
willing to restore the functionality can equally well just look up
the contents in the git history if needed.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 .../staging/media/atomisp/pci/atomisp_compat_ioctl32.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c b/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c
index e5553df5bad4..bc6ef902a520 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c
@@ -15,7 +15,15 @@
  *
  *
  */
-#ifdef CONFIG_COMPAT
+
+/*
+ * The compat code is disabled for now, as compat_alloc_user_space()
+ * is in the process of getting removed. The compat_ioctl implementation
+ * here was already disabled in commit 57e6b6f2303e ("media: atomisp_fops.c:
+ * disable atomisp_compat_ioctl32"), so this is all dead code, but it
+ * is left for reference as long as something like it is in fact needed.
+ */
+#if 0 /* #ifdef CONFIG_COMPAT */
 #include <linux/compat.h>
 
 #include <linux/videodev2.h>
-- 
2.27.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atomisp: stop compiling compat_ioctl32 code
  2020-10-07 14:16 [PATCH] media: atomisp: stop compiling compat_ioctl32 code Arnd Bergmann
@ 2020-10-07 14:18 ` Christoph Hellwig
  2020-10-07 15:37   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2020-10-07 14:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devel, Greg Kroah-Hartman, linux-kernel, Hans Verkuil,
	Sakari Ailus, Mauro Carvalho Chehab, Christoph Hellwig,
	linux-media

On Wed, Oct 07, 2020 at 04:16:39PM +0200, Arnd Bergmann wrote:
> Alternatively, the entire file could just be removed, since anyone
> willing to restore the functionality can equally well just look up
> the contents in the git history if needed.

I suspect that is the right thing.  Note that given that the driver
is only in staging anyway, the right thing to do would be to change
the ioctl ABI to be more compat friendly to start with.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atomisp: stop compiling compat_ioctl32 code
  2020-10-07 14:18 ` Christoph Hellwig
@ 2020-10-07 15:37   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-10-07 15:37 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: driverdevel, Greg Kroah-Hartman, linux-kernel, Hans Verkuil,
	Sakari Ailus, Mauro Carvalho Chehab, Linux Media Mailing List

On Wed, Oct 7, 2020 at 4:18 PM Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, Oct 07, 2020 at 04:16:39PM +0200, Arnd Bergmann wrote:
> > Alternatively, the entire file could just be removed, since anyone
> > willing to restore the functionality can equally well just look up
> > the contents in the git history if needed.
>
> I suspect that is the right thing.  Note that given that the driver
> is only in staging anyway, the right thing to do would be to change
> the ioctl ABI to be more compat friendly to start with.

Ok, I sent that as v2 now.

I wonder how many of those 56 ioctl commands in the driver are
actually used in practice. Is there a public repository for the
matching user space? Is it required to even use the driver
or is it otherwise compatible with normal v4l2 applications?

     Arnd
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-07 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 14:16 [PATCH] media: atomisp: stop compiling compat_ioctl32 code Arnd Bergmann
2020-10-07 14:18 ` Christoph Hellwig
2020-10-07 15:37   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).