From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70A67C4743C for ; Mon, 14 Jun 2021 17:08:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 412C361185 for ; Mon, 14 Jun 2021 17:08:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235347AbhFNRKY (ORCPT ); Mon, 14 Jun 2021 13:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235185AbhFNRKX (ORCPT ); Mon, 14 Jun 2021 13:10:23 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DA08C061574; Mon, 14 Jun 2021 10:08:20 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DCA0A436; Mon, 14 Jun 2021 19:08:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1623690499; bh=Y62fPdVrSYoDiDWZVQlRpOQy23UZWZkKTNtRurbrjNM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ip2dd0BFn4k0uceKwk6AsRoJ7m6ppXHgN6HDXUl+580Z532sCO4imhCFiJjv8Vzhb H2EBMFMZAb2y8lk3rtgT4uySV6sfr/1FAwNQh7lv2OaRGQ6p2YzWA9cFg+jN6AgIc4 kAie756Ck4NyPzkIHyT6Q6weFlqzrSrL7o36Pj+Q= Date: Mon, 14 Jun 2021 20:07:59 +0300 From: Laurent Pinchart To: Arnd Bergmann Cc: Hans Verkuil , Mauro Carvalho Chehab , Arnd Bergmann , "Lad, Prabhakar" , Eduardo Valentin , Sakari Ailus , Greg Kroah-Hartman , Vaibhav Gupta , Liu Shixin , Jacopo Mondi , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Hans Verkuil , Christoph Hellwig Subject: Re: [PATCH v3 6/8] media: atomisp: remove compat_ioctl32 code Message-ID: References: <20210614103409.3154127-1-arnd@kernel.org> <20210614103409.3154127-7-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210614103409.3154127-7-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Thank you for the patch. On Mon, Jun 14, 2021 at 12:34:07PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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. > > Cc: Sakari Ailus > Cc: Hans Verkuil > Acked-by: Sakari Ailus > Suggested-by: Christoph Hellwig > Reviewed-by: Andy Shevchenko > Signed-off-by: Arnd Bergmann Acked-by: Laurent Pinchart > --- > drivers/staging/media/atomisp/Makefile | 1 - > drivers/staging/media/atomisp/TODO | 5 + > .../atomisp/pci/atomisp_compat_ioctl32.c | 1202 ----------------- > .../staging/media/atomisp/pci/atomisp_fops.c | 8 +- > 4 files changed, 8 insertions(+), 1208 deletions(-) > delete mode 100644 drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c > > diff --git a/drivers/staging/media/atomisp/Makefile b/drivers/staging/media/atomisp/Makefile > index 51498b2e85b8..606b7754fdfd 100644 > --- a/drivers/staging/media/atomisp/Makefile > +++ b/drivers/staging/media/atomisp/Makefile > @@ -16,7 +16,6 @@ atomisp-objs += \ > pci/atomisp_acc.o \ > pci/atomisp_cmd.o \ > pci/atomisp_compat_css20.o \ > - pci/atomisp_compat_ioctl32.o \ > pci/atomisp_csi2.o \ > pci/atomisp_drvfs.o \ > pci/atomisp_file.o \ > diff --git a/drivers/staging/media/atomisp/TODO b/drivers/staging/media/atomisp/TODO > index 6987bb2d32cf..2d1ef9eb262a 100644 > --- a/drivers/staging/media/atomisp/TODO > +++ b/drivers/staging/media/atomisp/TODO > @@ -120,6 +120,11 @@ TODO > for this driver until the other work is done, as there will be a lot > of code churn until this driver becomes functional again. > > +16. Fix private ioctls to not need a compat_ioctl handler for running > + 32-bit tasks. The compat code has been removed because of bugs, > + and should not be needed for modern drivers. Fixing this properly > + unfortunately means an incompatible ABI change. > + > Limitations > =========== > [snip] > diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c > index 26d05474a035..be58f21ab208 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, > }; -- Regards, Laurent Pinchart