Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1997434yba; Thu, 25 Apr 2019 09:01:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB1D0ow09aeLxvdMWzoXkeek5zQj/tN39wVmHdAlIfr/owwv8VJEj9ks/sT78s+VbD15t9 X-Received: by 2002:a63:ef46:: with SMTP id c6mr21820328pgk.392.1556208099909; Thu, 25 Apr 2019 09:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556208099; cv=none; d=google.com; s=arc-20160816; b=xXFb+PFtUbmPJy1BpSGVQDw3Pmc6CGry2nWFOfgHfNN5s0MOcTW91Ssx2M2eaXFBT+ G9qIoMnjEi+rAgnFsXhoC8eoxfcFRXDBzBGle8HjXqLbHWxlB5LDVb8zj1XxrnC23/9G mrzl89vi3iHo7g7oe2tuadu8tWn25YmC+OzlwiwjCxehM61VJcmpFw4OnBKaeMR7ry0/ WWHgYT2LQOdHwRPtljhtJv6kNm9tqFCwVL2cc56fwrPXDBVXx+ZtMAd10JvIdRSaX2h9 nrezKhqh7gc628S37FcTwvUZLRGUOm8xheePzNEGVtaCFmE/Jn0Fjpz0rMEZtgey3R9c EPMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=E3NXYmNospchyn56GjhuUUM3hrUac73tHVKaHCldfOk=; b=tZpT4BLpHc6UIqwoOzBPZBplwhBmmHhydwlX+09hWxyyNE1nG5SY2+L3Xj90J6i0BK mAx2hsF+ca2x4Z0+VIMVN7EVSZ97BwXZ1o4YpSqztSzy6M5890cyj79Bm6jRIyiWjFYd xxSrVRPVtXgvO6SdmKP6kTqTFg5rQXYuGLbxfphbZy5uyWoCctr/YlhcmZqqSD+uJLVM p90iKrEYzSqPpp1E3cC/lg8TeXi5gV/hbcG7zcjjBiTGLVSq+39UaF/i3FvTCaOShZN8 pnXhEZiP42vPL6Smrd0bBkrSy5v9r9Gd34k5EU3hAJdl5PK0+muTiieJlYWSJBNnHMcn s3IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Bonx4HPM; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si21629949pgn.143.2019.04.25.09.01.21; Thu, 25 Apr 2019 09:01:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Bonx4HPM; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729023AbfDYPxW (ORCPT + 99 others); Thu, 25 Apr 2019 11:53:22 -0400 Received: from casper.infradead.org ([85.118.1.10]:44084 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfDYPxV (ORCPT ); Thu, 25 Apr 2019 11:53:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E3NXYmNospchyn56GjhuUUM3hrUac73tHVKaHCldfOk=; b=Bonx4HPMYcr3a2nktGqFVhvpkC Lm7Jv3Ti63Kv4EMBUFae5lI4ptDC5RAI5ElUhwvqH9DfP8HL3oLak9sqkNi1SrdMbInWhlezS4ZQv TaB3dxTt/lLAd7hovrVYa5w4+CCJd72lsXCzDbUllvhVuoJLaU1Hl5+LKJVzv+MI7D167ykTh2GZK d6OPs3hXZSnLAXf1R6CrpdOPA9x9rme1ywi76UowaMUx1f609U55StEwsjKOyqNJVxN4cMGncdYB6 KnVvdda0AmWSEMwWetcrVOOCMdnwjzCP88m9Y10yNoScW0lTGYk+7ZUQxJpbglecBDUogb5ukJzjR 1L7XLtaQ==; Received: from [179.95.39.209] (helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJggS-0007pK-Bs; Thu, 25 Apr 2019 15:53:12 +0000 Date: Thu, 25 Apr 2019 12:53:01 -0300 From: Mauro Carvalho Chehab To: Al Viro Cc: Arnd Bergmann , linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Jason Gunthorpe , Daniel Vetter , Greg Kroah-Hartman , David Sterba , Darren Hart , Jonathan Cameron , Bjorn Andersson , devel@driverdev.osuosl.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, sparclinux@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Sean Young Subject: Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl Message-ID: <20190425125301.5165cf15@coco.lan> In-Reply-To: <20190425153534.GS2217@ZenIV.linux.org.uk> References: <20190416202013.4034148-1-arnd@arndb.de> <20190416202701.127745-1-arnd@arndb.de> <20190425122153.450fc094@coco.lan> <20190425153534.GS2217@ZenIV.linux.org.uk> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Em Thu, 25 Apr 2019 16:35:34 +0100 Al Viro escreveu: > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > > If I understand your patch description well, using compat_ptr_ioctl > > only works if the driver is not for s390, right? > > No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl > and be done with that; compat_ptr() is a no-op anyway" breaks. IOW, > s390 is the reason for having compat_ptr_ioctl() in the first place; > that thing works on all biarch architectures, as long as all stuff > handled by ->ioctl() takes pointer to arch-independent object as > argument. IOW, > argument ignored => OK > any arithmetical type => no go, compat_ptr() would bugger it > pointer to int => OK That's the case for all LIRC ioctls: they all use a pointer to u32 argument. > pointer to string => OK > pointer to u64 => OK > pointer to struct {u64 addr; char s[11];} => OK > pointer to long => needs explicit handler > pointer to struct {void *addr; char s[11];} => needs explicit handler > pointer to struct {int x; u64 y;} => needs explicit handler on amd64 > For "just use ->unlocked_ioctl for ->ioctl" we have > argument ignored => OK > any arithmetical type => OK > any pointer => instant breakage on s390, in addtion to cases that break > with compat_ptr_ioctl(). > > Probably some form of that ought to go into commit message for compat_ptr_ioctl() > introduction... Agreed. Thanks, Mauro