Re: [PATCH v3 7/8] media: subdev: fix compat_ioctl32

From: Arnd Bergmann
Date: Tue Jun 15 2021 - 04:42:02 EST


On Tue, Jun 15, 2021 at 10:27 AM Hans Verkuil <hverkuil-cisco@xxxxxxxxx> wrote:
> On 14/06/2021 19:18, Laurent Pinchart wrote:

> >
> > Should we drop v4l2_subdev_core_ops.compat_ioctl32 and call
> > v4l2_subdev_core_ops.ioctl from subdev_do_compat_ioctl32() ? New drivers
> > should design custom ioctls in a way that doesn't require compat code.
>
> I agree, we can drop it completely.

I agree about new drivers defining their ioctls in a compatible way,
though Ideally
I'd say subdev drivers should not use custom ioctls at all. There are
two other drivers
that define private subdev ioctls and that lack a working compat handler:

- the omap3 isp driver would not work in compat mode, though I don't think there
are any 64-bit SoCs using this hardware. The Sitara AM6 and J72 SoCs
are the only chips in that family at the moment, but these don't
seem to include
any image processor.

- The Intel Atom ISP driver has a broken compat ioctl handler that I remove
in this series, but the v4l2_subdev_core_ops->compat_ioctl32 callback
would be the correct place to hook these up if they do not get fixed.

> I'll skip this patch, but I'll take the other 7 patches and make a v3 PR with
> updated Reviewed-by tags from Laurent.

Thanks!

Arnd