Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1991207yba; Thu, 25 Apr 2019 08:55:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwj4f7S9PCE6vD5ddCx1DnFOnHEVWgsnKikwWODYmh392ep4J45w9+5m9n1zHEUjnf3vEQU X-Received: by 2002:aa7:8d98:: with SMTP id i24mr12342882pfr.8.1556207742714; Thu, 25 Apr 2019 08:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556207742; cv=none; d=google.com; s=arc-20160816; b=0+kQ07Z50yuan/OFViSHGd2KCIkkva+GDvihhPhGXhg/uraqjxUyjExYc/pmFWSUM/ nBCKBLhvE2Sy3I5YN+s+NUcd1FIZ8VKRbPtKjTDLKI6Onul/Fc+FdylNWQKUuEUagXpM 9fGgF3ZZdavx8dY3zAxTBT2cKE/luvhIqMRPQ6oa/ZnoiTeqQ0ROLhJKusoUwgQvHAbg ovKpUjMkqCOI/Ce6Gu6zkPv2Yczd3OkRTq6RlN8Y1oPdOJh9DMJQVbi75JZVA2Dbn1dI jnTjaKdKCxwFsQp7NNk+bD8E7n3VRCut+bYVu4Ts0ogGwEU8dfgecJmWFP1jslOvp8Mw lN8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=vnOK55Hhpegmo/fnJEz+TCVV+Rtg/rYKGc4878e+cQM=; b=nia3HD4elWQgm2Rwx7Nvsp2YiSBqx7TVwRIk5iijvuQ4kpE3mGuv8gPdBaF8DfEqze RCl43jaeDiuyvTDenvXmnZ0tSHyEM1hmLTTSef7fRri8bEIkXTO5rt4aTaxTT/Eibdak ktkAF08qitGFmuCRTcZkVBB9LfOUcV+gIGoZ+tZaTwSzhJ/hOpb3uMJlbOqYcyqcxy94 gFByCd0SRbq3zMuAocDt+A2L8HolB7Q7aHR8qf7TwscRARnpd55BB3OeoeiOEPJSf8Vg 6AZiz5YDUwIXH1vqtB+lo1qMrcvlKZZiTKAi1w8qPbAfU7gNqzGlTxYqw05L6EnNdtYE fsjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si5038170pfg.93.2019.04.25.08.55.27; Thu, 25 Apr 2019 08:55:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729649AbfDYPc2 (ORCPT + 99 others); Thu, 25 Apr 2019 11:32:28 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44074 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387593AbfDYPcZ (ORCPT ); Thu, 25 Apr 2019 11:32:25 -0400 Received: by mail-qt1-f196.google.com with SMTP id s10so504701qtc.11; Thu, 25 Apr 2019 08:32:23 -0700 (PDT) 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=vnOK55Hhpegmo/fnJEz+TCVV+Rtg/rYKGc4878e+cQM=; b=UKuOoUy+U/DhO1lrIpJzV4Ph/CephrAcf/jKCSeUIeDvoHjzvpEnXC65Ukf9h1Ml3O /s3B+ucBFA/SCZiwvcG8m44SU5vaLq+cSoUpr+v97MybACPI8xSw+tBqbMtGey3O/dwh 7k6dvRZqNSLErq6sAvUOfdrbS3QsRH/LAtzQL7ZCp3VEV4Xa+tJDCKHFqhG4eUmFBOoA TdH5uTW+6TRa6B8E0jLoEj97uvssKvZFAGT30Y1GHSjPupev46xs0A2EzYdpKp1K0Cnc ECJ5zIKvJo3lKjWIAoD4lKDuRognkIEVFH3Eb+w7nBaxIUaAv8axd6sFg84VH9IhHe+7 WZ5Q== X-Gm-Message-State: APjAAAWLh3mra7FsjsrItm2wXSJLHGYq1pNo9wSfDkOc4Mfvr6JR7F6K S2gD/7PIlEI9SIS02upAVCHeANw0CRkAyRlXWeA= X-Received: by 2002:ac8:2924:: with SMTP id y33mr30625898qty.212.1556206343098; Thu, 25 Apr 2019 08:32:23 -0700 (PDT) MIME-Version: 1.0 References: <20190416202013.4034148-1-arnd@arndb.de> <20190416202701.127745-1-arnd@arndb.de> <20190425122153.450fc094@coco.lan> In-Reply-To: <20190425122153.450fc094@coco.lan> From: Arnd Bergmann Date: Thu, 25 Apr 2019 17:32:05 +0200 Message-ID: Subject: Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl To: Mauro Carvalho Chehab Cc: Alexander Viro , Linux FS-devel Mailing List , y2038 Mailman List , Linux Kernel Mailing List , Jason Gunthorpe , Daniel Vetter , Greg Kroah-Hartman , David Sterba , Darren Hart , Jonathan Cameron , Bjorn Andersson , driverdevel , qat-linux@intel.com, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Linux Media Mailing List , dri-devel , linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, "open list:HID CORE LAYER" , linux-iio@vger.kernel.org, linux-rdma , linux-nvdimm@lists.01.org, linux-nvme@lists.infradead.org, linux-pci , Platform Driver , linux-remoteproc@vger.kernel.org, sparclinux , linux-scsi , USB list , linux-btrfs , ceph-devel , linux-wireless , Networking , Sean Young Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab wrote: > Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann escreveu: > > If I understand your patch description well, using compat_ptr_ioctl > only works if the driver is not for s390, right? No, the purpose of compat_ptr_ioctl() is to make sure it works everywhere including s390. Even on s390 it tends to work most of the time, but for correctness the upper bit of a 32-bit pointer needs to be cleared, as compat_ptr_ioctl does, in case some application passes a pointer with that bit set. [IIRC, in the instruction pointer, the high bit is set, in data references it is ignored but usually cleared, but it may be left on for IP-relative address generation] Arnd