Skip to content

media: v4l2: simplify compat ioctl handling

Arnd Bergmann linux-media lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8media: v4l2: prepare compat-ioctl reworkdrivers/media/v4l2-core/v4l2-compat-ioctl32.c drivers/media/v4l2-core/v4l2-ioctl.c include/media/v4l2-ioctl.h+156 -670 replies
2/8media: v4l2: remove unneeded compat ioctl handlersdrivers/media/v4l2-core/v4l2-compat-ioctl32.c+0 -420 replies
3/8media: v4l2: move v4l2_ext_controls conversiondrivers/media/v4l2-core/v4l2-compat-ioctl32.c+90 -1460 replies
4/8media: v4l2: move compat handling for v4l2_bufferdrivers/media/v4l2-core/v4l2-compat-ioctl32.c+270 -4540 replies
5/8media: v4l2: allocate v4l2_clip objects earlydrivers/media/common/saa7146/saa7146_video.c drivers/media/pci/bt8xx/bttv-driver.c drivers/media/pci/saa7134/saa7134-video.c +4 more+48 -460 replies
6/8media: v4l2: convert v4l2_format compat ioctlsdrivers/media/v4l2-core/v4l2-compat-ioctl32.c+139 -2070 replies
7/8media: v4l2: remaining compat handlersdrivers/media/v4l2-core/v4l2-compat-ioctl32.c+109 -1740 replies
8/8media: v4l2: remove remaining compat_ioctldrivers/media/v4l2-core/v4l2-compat-ioctl32.c+2 -1950 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] media: v4l2: simplify compat ioctl handling

From: Arnd Bergmann <[email protected]>

I have a series to remove all uses of compat_alloc_user_space() and copy_in_user() from the kernel, this is the part of it that involves the v4l2 compat code.

The resulting code is significantly shorter and arguably more readable, but I have not done any testing beyond compilation on it, so at the minimum this first needs to pass the test suite for both native and compat users space.

The first version had a number of bugs that Hans Verkuil managed to fix, I have now rebased my series on top of linux-5.10-rc1 and included his bugfixes.

This series and the remaining changes for removing compat_alloc_user_space are available for further testing in

https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git compat-alloc-user-space-4

Arnd

Arnd Bergmann (8):
media: v4l2: prepare compat-ioctl rework
media: v4l2: remove unneeded compat ioctl handlers
media: v4l2: move v4l2_ext_controls conversion
media: v4l2: move compat handling for v4l2_buffer
media: v4l2: allocate v4l2_clip objects early
media: v4l2: convert v4l2_format compat ioctls
media: v4l2: remaining compat handlers
media: v4l2: remove remaining compat_ioctl

 drivers/media/common/saa7146/saa7146_video.c  |    6 +-
 drivers/media/pci/bt8xx/bttv-driver.c         |    8 +-
 drivers/media/pci/saa7134/saa7134-video.c     |   19 +-
 .../media/test-drivers/vivid/vivid-vid-cap.c  |   18 +-
 .../media/test-drivers/vivid/vivid-vid-out.c  |   18 +-
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 1773 ++++++-----------
 drivers/media/v4l2-core/v4l2-ioctl.c          |  182 +-
 include/media/v4l2-ioctl.h                    |   11 +
 include/uapi/linux/videodev2.h                |    2 +-
 9 files changed, 760 insertions(+), 1277 deletions(-)
Signature · 1 line
2.27.0