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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 710A7C32750 for ; Tue, 30 Jul 2019 20:15:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F74D2087F for ; Tue, 30 Jul 2019 20:15:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="Zwx0RQpM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbfG3UPV (ORCPT ); Tue, 30 Jul 2019 16:15:21 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:35167 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbfG3UPF (ORCPT ); Tue, 30 Jul 2019 16:15:05 -0400 Received: by mail-ot1-f67.google.com with SMTP id j19so29204331otq.2 for ; Tue, 30 Jul 2019 13:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5RzApq6XFoztBnIqNk8vSnTrtbUfODyGJJfunMohfoM=; b=Zwx0RQpMg/Mqj/9z5S89A3ZEJVMpYC9h+xxOXAaZcuU5PCAM8m9Gqaz//RnKDBGDqW 9liyDLB1BwWzU+ZNcxIkUlAhEM4dwaxEWMetA5zngGXxvLUm9KzmX8yqMCHjIc+8qA1I 4Kz3jT1Z/FAcCfiuMTNuiLT9z2kiwc9S0x8YZz6OVlR8h69bqZIY4y5U2CziwyfAHt6S 8CcPZTmDK53Mwk0qwS3iX6X/MjsfAEfTAQNYo9qJOCNeLP9BFCn9fMgZ4bp/B5yi3zOB uh6pK4X9QLjcA5W2PzdnflMG8qYA3C40MW87vpeyNAEv23qLtzsWi1Ofnp3dkIf+XH59 Buzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5RzApq6XFoztBnIqNk8vSnTrtbUfODyGJJfunMohfoM=; b=LVeFGkpq7jPDM1Y7zKBmWo6ay3QdDddGXTy6aijtdx8abWT21Fmhbvo0NRZIgfqTxk nl//DPtWg/w/xXYaNVWRW3s2/f3sb/uDftnYfvl2NkSkpXxg1B3mcNXgWxB8DvFdptzD M2eP/XBYu/MKCTllpMes6ChlXHWvhFoAwSWHqRKYSpJ34R/1KoxBWHOdrqyPcsiB6cVN 6gL/ZzMVeChq7f8HrdrGqTr6NdaRs9EfcpBGvW3qOWUb8wrhbA/RYF559Ro5AZeoiZyJ pTyQmu4Va6pzwMM1kNsO2ioXRab6B6hIc4q3zTmBQbo5eYdKEKZyNpAN/4soI1921OKS vKKg== X-Gm-Message-State: APjAAAVNDMJHG/qYW+cPbD8BjwqkEIh0vLE1gpaLoYCY5HmnN3TBQFMW KjPswJgj9ZiBHklnU92ylHJKtTSoXjRQRbkK1ENTbA== X-Google-Smtp-Source: APXvYqw9ObVuL9+XuGR4o0J2QBLrDkVcN3aYitNJvsGPbv5ZPcYvxRI6eCPCNx+pUD4yOvd0Fq+ICTQ9s+BKXhNpUpI= X-Received: by 2002:a9d:7248:: with SMTP id a8mr23671169otk.363.1564517704838; Tue, 30 Jul 2019 13:15:04 -0700 (PDT) MIME-Version: 1.0 References: <20190730192552.4014288-1-arnd@arndb.de> <20190730195819.901457-1-arnd@arndb.de> In-Reply-To: <20190730195819.901457-1-arnd@arndb.de> From: Dan Williams Date: Tue, 30 Jul 2019 13:14:52 -0700 Message-ID: Subject: Re: [PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl To: Arnd Bergmann Cc: Alexander Viro , linux-iio@vger.kernel.org, Daniel Vetter , linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, Bjorn Andersson , sparclinux@vger.kernel.org, Mauro Carvalho Chehab , linux-scsi , linux-nvdimm , linux-rdma , qat-linux@intel.com, amd-gfx list , Jason Gunthorpe , linux-input@vger.kernel.org, Darren Hart , "Linux-media@vger.kernel.org" , linux-remoteproc@vger.kernel.org, "moderated list:DMA BUFFER SHARING FRAMEWORK" , Maling list - DRI developers , Jonathan Cameron , David Sterba , platform-driver-x86@vger.kernel.org, Greg Kroah-Hartman , USB list , Linux Wireless List , Linux Kernel Mailing List , tee-dev@lists.linaro.org, linux-crypto , Netdev , linux-fsdevel , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Jul 30, 2019 at 12:59 PM Arnd Bergmann wrote: > > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architecture, where a compat pointer is only > 31 bit wide, and converting it into a 64-bit pointer requires calling > compat_ptr(). Most drivers here will never run in s390, but since we now > have a generic helper for it, it's easy enough to use it consistently. > > I double-checked all these drivers to ensure that all ioctl arguments > are used as pointers or are ignored, but are not interpreted as integer > values. > > Acked-by: Jason Gunthorpe > Acked-by: Daniel Vetter > Acked-by: Mauro Carvalho Chehab > Acked-by: Greg Kroah-Hartman > Acked-by: David Sterba > Acked-by: Darren Hart (VMware) > Acked-by: Jonathan Cameron > Acked-by: Bjorn Andersson > Signed-off-by: Arnd Bergmann > --- > drivers/nvdimm/bus.c | 4 ++-- [..] > diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c > index 798c5c4aea9c..6ca142d833ab 100644 > --- a/drivers/nvdimm/bus.c > +++ b/drivers/nvdimm/bus.c > @@ -1229,7 +1229,7 @@ static const struct file_operations nvdimm_bus_fops = { > .owner = THIS_MODULE, > .open = nd_open, > .unlocked_ioctl = bus_ioctl, > - .compat_ioctl = bus_ioctl, > + .compat_ioctl = compat_ptr_ioctl, > .llseek = noop_llseek, > }; > > @@ -1237,7 +1237,7 @@ static const struct file_operations nvdimm_fops = { > .owner = THIS_MODULE, > .open = nd_open, > .unlocked_ioctl = dimm_ioctl, > - .compat_ioctl = dimm_ioctl, > + .compat_ioctl = compat_ptr_ioctl, > .llseek = noop_llseek, > }; Acked-by: Dan Williams