Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3536754yba; Tue, 16 Apr 2019 13:30:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1pA28rfNCG/c6VpZoRcS0HF2xRzS321Sh6duYyPBj+jttUaVA8KgrCOD5foWc6G42r3yR X-Received: by 2002:aa7:8282:: with SMTP id s2mr85354441pfm.7.1555446637951; Tue, 16 Apr 2019 13:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555446637; cv=none; d=google.com; s=arc-20160816; b=a+rlF4azIDiqSpSQMTdn15BcnKQZQr1AQOMdY99/eOxiOCW7pGKdGzqGV9/Hwcz9To WSNr89B3BkebYtwR88UBbKmZmBbKYkKHkSdsxv3Tis6w0vhhHr6j10HDh0P+gPE0OFcq mvgAjkeuh9Er63TBbFoZFvUBTSd+mmA3AgLQwCOfUMcatAEV0bh9d0Kob70oVhWYRs+M swkaY7MYoY4fdEurs8PGMS+EEUaBEKRRM1U9S8B7HoNKpip4QYQ0eFuWYzxsJuzKbwl+ ZNmGizg6wDa8mfnShHTaA7HxVHsQ9L8QO9BRfkUGmomaivqZgGsvgabl+LK9rddHZXf3 YEmw== 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:date:subject:cc:to:from; bh=ABhqmJQeewgLa3ZkH6RWQT4KrRbbOZpzhionw/j5i1Y=; b=RRvkS0cMQmIWOkTMhPzKKZIWoB2jgQAdwrXAe+cLcqcsFjcDJo8/VopSoe3B0kIpxI K4JjD1m1mzJamh8bWfEcTPTIRT2dsDWhyw8gICzvuDQsVqsn7nSM+5tX4BzQ8PrQDjU2 QqqAnRM4z0p1HjsXsYDSlqc9StFLt5oEbinqYf3bV6IcdvcBUt6wGhyjiMs0aIKIfLaO zcncdhclcDZFA/zua1Su481bRrrTrAVQzU6QbHAO5x3N/pLQ27YkhNc4wjGp1zX828OJ PqUqgRavIpS69AJpO6W1l+nKhd3GZIwpHjPJxKOWyp/g5/1XvVTBW/xmjY528cnQUn9t uMLg== 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 v10si49680302plo.439.2019.04.16.13.30.21; Tue, 16 Apr 2019 13:30:37 -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 S1730794AbfDPU2w (ORCPT + 99 others); Tue, 16 Apr 2019 16:28:52 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:36437 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730588AbfDPU2q (ORCPT ); Tue, 16 Apr 2019 16:28:46 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbS0X-1gjttl2T0b-00bwNW; Tue, 16 Apr 2019 22:28:44 +0200 From: Arnd Bergmann To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v3 21/26] compat_ioctl: remove IGNORE_IOCTL() Date: Tue, 16 Apr 2019 22:28:06 +0200 Message-Id: <20190416202839.248216-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190416202839.248216-1-arnd@arndb.de> References: <20190416202013.4034148-1-arnd@arndb.de> <20190416202839.248216-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Ay0NXVdQsnX0Bpy9xNzkDl1OuTukLuJANGE9LgdpW2dQl548Idd RiZgHAbL7b3fzwshDONkpSBnBpuL5RIKilaHHL4O0JjTgOmZ+HdLQOThg3PNC9YYLaTer+i Ewp8GF9/H2nSpqNUUSEUkNdGE30ol6bQ4oqQLI17TAkZMUruVklX8cPvrhxF2jEnuKOdz6X DsHPDKkPONW3aQSYnALFA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:1wRWGtouAwU=:zDreuz6/FTI1MfqgU9FSYj xDmnIM5T620SrIJ1gBtgbIkfV9fGZbyway6ROu0BFUYZjmql+ET3o7Gf27f2PFk3YtTbXUICF cYWI3aaRS1/CkTGATRWj9hWkvIfv8CSsb/HMaBH0vT/rHSxAFuGi59mCFOTf4zVzLD++NMjO8 lZG8krpPOUriembTz/6N0ltkmq210j/KPflJ0VMPb7/xjdLMzymGqxVXwzhzdn2JExHZgTJd0 s8QKKuThb/wWaGJ/XanVNMEo5DYF2Bn/E3cZcVrD4aF8q8hSpdOM49fp5GGEvNX3YrkMG0vHh MBAIrjaJdDSaokno98PWYPF5OgY3QQm4BF8t4U2akJwrXfKgPNuBLAEzGd/U+pkdOnPqrmUmZ vocabSwA7uEryL5thhXritcAGRJgTAUEjF2q4A1V6F9moM/5RSumVU5j0+scbi/iddptwOlbh ch6HN1EQdTgGHWPgEooDIG/6BIMKCFFphx2rHvQNQTk2H+h1VgdvrbpZjbY4WoZ5xUzNdgoKg VdeUkFDjNtUFkOmUr6Usecd63Mb64EJDNbNTWWQmnVaj4aPlXais7gEnvW/pa/dRBGIMurFs6 L9egrMQpYVGvXu+p9ZoyvYA9P2TPChEUXszyw2cYEptiCxGiP+/gke6gef16gBgUybHdTvuBq JpYA7EX6Yd/efU/imbHCcvxBIy6O/5QJeb+0ZBATORV+lsDTnTB+rG+5BRrB7TG3aE0Mj0YRt JEKIzSgyIN2EhsgG3Yp8NqlFmHgTH3fyN3saDA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 07d106d0a33d ("vfs: fix up ENOIOCTLCMD error handling"), we don't warn about unhandled compat-ioctl command code any more, but just return the same error that a native file descriptor returns when there is no handler. This means the IGNORE_IOCTL() annotations are completely useless and can all be removed. TIOCSTART/TIOCSTOP and KDGHWCLK/KDSHWCLK fall into the same category, but for some reason were listed as COMPATIBLE_IOCTL(). Signed-off-by: Arnd Bergmann --- fs/compat_ioctl.c | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 625536aa6b03..bae7b38a881f 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -56,11 +56,6 @@ #include -#ifdef CONFIG_SPARC -#include -#include -#endif - #define convert_in_user(srcptr, dstptr) \ ({ \ typeof(*srcptr) val; \ @@ -313,17 +308,7 @@ static int compat_ioctl_preallocate(struct file *file, #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) #define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), -/* ioctl should not be warned about even if it's not implemented. - Valid reasons to use this: - - It is implemented with ->compat_ioctl on some device, but programs - call it on others too. - - The ioctl is not implemented in the native kernel, but programs - call it commonly anyways. - Most other reasons are not valid. */ -#define IGNORE_IOCTL(cmd) COMPATIBLE_IOCTL(cmd) - static unsigned int ioctl_pointer[] = { -/* compatible ioctls first */ /* Little t */ COMPATIBLE_IOCTL(TIOCOUTQ) /* Little f */ @@ -351,25 +336,9 @@ COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND) COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) #endif -/* Big V (don't complain on serial console) */ -IGNORE_IOCTL(VT_OPENQRY) -IGNORE_IOCTL(VT_GETMODE) -/* - * These two are only for the sbus rtc driver, but - * hwclock tries them on every rtc device first when - * running on sparc. On other architectures the entries - * are useless but harmless. - */ -COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ -COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ /* Socket level stuff */ COMPATIBLE_IOCTL(FIOQSIZE) #ifdef CONFIG_BLOCK -/* md calls this on random blockdevs */ -IGNORE_IOCTL(RAID_VERSION) -/* qemu/qemu-img might call these two on plain files for probing */ -IGNORE_IOCTL(CDROM_DRIVE_STATUS) -IGNORE_IOCTL(FDGETPRM32) /* SG stuff */ COMPATIBLE_IOCTL(SG_SET_TIMEOUT) COMPATIBLE_IOCTL(SG_GET_TIMEOUT) @@ -428,31 +397,6 @@ COMPATIBLE_IOCTL(JSIOCGVERSION) COMPATIBLE_IOCTL(JSIOCGAXES) COMPATIBLE_IOCTL(JSIOCGBUTTONS) COMPATIBLE_IOCTL(JSIOCGNAME(0)) - -/* fat 'r' ioctls. These are handled by fat with ->compat_ioctl, - but we don't want warnings on other file systems. So declare - them as compatible here. */ -#define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) -#define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) - -IGNORE_IOCTL(VFAT_IOCTL_READDIR_BOTH32) -IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32) - -#ifdef CONFIG_SPARC -/* Sparc framebuffers, handled in sbusfb_compat_ioctl() */ -IGNORE_IOCTL(FBIOGTYPE) -IGNORE_IOCTL(FBIOSATTR) -IGNORE_IOCTL(FBIOGATTR) -IGNORE_IOCTL(FBIOSVIDEO) -IGNORE_IOCTL(FBIOGVIDEO) -IGNORE_IOCTL(FBIOSCURPOS) -IGNORE_IOCTL(FBIOGCURPOS) -IGNORE_IOCTL(FBIOGCURMAX) -IGNORE_IOCTL(FBIOPUTCMAP32) -IGNORE_IOCTL(FBIOGETCMAP32) -IGNORE_IOCTL(FBIOSCURSOR32) -IGNORE_IOCTL(FBIOGCURSOR32) -#endif }; /* -- 2.20.0