Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp711849imm; Sat, 8 Sep 2018 07:33:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbVKwEyxqOndsoFquKwi7XzpZN/JFWBZK1Q++XzaHydWuQ0bvVC7g+Y6mrXUrr2RfglrkqQ X-Received: by 2002:a62:5f82:: with SMTP id t124-v6mr14004960pfb.223.1536417184821; Sat, 08 Sep 2018 07:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536417184; cv=none; d=google.com; s=arc-20160816; b=OcXUnm87Mh0XmDKYPJkyeh7wdXU8FkhfDW2b6itqAaxagyNb40zMeHMZ5PbxyE0OCO Sseh1eVngIRUXdTAU5KB4rB/ByV2NM7JFNykMcxrFZCUqTqtYQLZUK5kktK1mVojWGH9 cNSPsoE7xzkbYil7LX93mRNt6mzQqw4blhoBH7y0VaDyBw0lp8jCj/kytGsYrobVGQhC OnBQRXRazP/d5Kwiz/y7Mz2IHcDdvcB9cO/HPX/PfmxTgVH4ExnU0N3nXYx3iWoY31qC gPhfW/lhn/1JT1aUB+FYzwy4qSUjXYRJeqzNZnyaP/LkfAEClXURAQNLZ76FNKuGrTWp +oPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=BD5r2u+jaH5bBURuscayM57RDNOWS3zcJZnWNXP1I04=; b=r8jqKDjQJk9N9U810nolVfOxmST25BHNzFqCKsbnAoqNkHW+pRSV2UpN8/Ge/J3vGp 3JIyeEtSCbEZiNUkBh6DsIzR+Ps7iAjsRti0UtpAwksGt+di457cg7WKyWk2iNovAGOR FC0vqUZT8ht8Y66Hf9bTuugTTxigyMu8j8zhpSHrRIvM+1MtWRclCceYFamnmCEnZCHg 6Ht3GviSCD1Ajh89m5p3vJsWTLIHJ0ODMo3+XD5orSQ2QX2r9BN7LaISgyShgtWmGG4N KlanmO+INPJMX5vjKLcHJki3O4nZV2tFHjXhA3vRQ/HGXASD2BgEd4HtIkuGANYAUha6 cdiQ== 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 q17-v6si11745794pfi.183.2018.09.08.07.32.50; Sat, 08 Sep 2018 07:33:04 -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 S1727521AbeIHTQk (ORCPT + 99 others); Sat, 8 Sep 2018 15:16:40 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:44743 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726351AbeIHTQj (ORCPT ); Sat, 8 Sep 2018 15:16:39 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mzhzd-1fc9Ql2W1Z-00vgsF; Sat, 08 Sep 2018 16:30:38 +0200 From: Arnd Bergmann To: viro@zeniv.linux.org.uk Cc: Arnd Bergmann , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/11] compat_ioctl: remove IGNORE_IOCTL() Date: Sat, 8 Sep 2018 16:28:11 +0200 Message-Id: <20180908142837.2819693-5-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180908142837.2819693-1-arnd@arndb.de> References: <20180908142837.2819693-1-arnd@arndb.de> X-Provags-ID: V03:K1:nGbJ5rDoHoRTqGmMjwVxk1EKcIjD3EJ4qLojhrz8TGe5tT+v4vw wShQKhuSiQodO+1Y/rvhQQgjbBFG15AfpNpwXsNKzDwJYzoro7wPQsg7PL/0+JHIIEYZYnt g3HYDhDVdkqNc8lxT7dZFgKeqv2SkcIvgcJKiXi8zPQhW/jDSJkEZrkFUxpeEoOHkIx1p45 6yAaspwr2GgTn84kY2izg== X-UI-Out-Filterresults: notjunk:1;V01:K0:OdVvqWONxx8=:KOdinIiFeW80teagBmcu9c Uj691wMWWSrTqvMjFTmBe02FhdKpw0F8AbYxxdqLevsZIs1+Qxhp/wEwpMWpIVjUoLwaZvO9j Go9Wa4UZU34AnqZ68Ko8r/7B9zoQ0vIphOqsCvH2vHwBxq1zR13lu2xyzf3WfwBbngzb4uGK/ ECs4rWABxwvZr+MBt6wETmljILAgXjb86JzKyrv2g39wilYC2I7rTaGSvoIXMcBdD5dPvbpwC XTZSSlOb1zX7Te9HuYVBW71GWwv2cPl4f+m8nRuyzX7WZtiHwxhDnSwwmmX9F34qOXQk3FVxs IuTn8qHSAHdNRcQ/SJpWchhW8UtFmiizyr2Cs4bZ3dHXCuZnCHGNBFM/uCZszr7sVLTd7RPrz qxnFO/D8yPkzgXq6HkkqhkVnydv0LWhmttmFkRD4Y/0yYyFdpFCPwD9MuI5M1QXyLS1l/GMb9 qpKbViThyCzbKpy3MiZqzumrdUsAS9Cffqsk7P/gmDoMl8GVBZGN2NOeR4lBTVsq40UC5CT9Y 2x/jVkz4ze3rmX5nIDt1Ex+2VJhhi9vwvjLEpdmxBicQdvuBB1CvC9fhndg+uj90AKeT8mJPc mlQtIOhATBWfmpHS26tMlT9DNfHAw4m5dgyU1Z4EZbRyuio49pdxZo/W0lnh2/JOU/LF7paab rfwF1bsvbN1TanbDngbYB+0G3D8iFkiZa725mDpDQs4YyMBMryhNgEElTQnaOn2vM5Mo= 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 7d8c5722fd0a..b56a3842d61d 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -463,20 +463,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 */ -COMPATIBLE_IOCTL(0x4B50) /* KDGHWCLK - not in the kernel, but don't complain */ -COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain */ - /* Big T */ COMPATIBLE_IOCTL(TCGETA) COMPATIBLE_IOCTL(TCSETA) @@ -553,9 +540,6 @@ 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 @@ -569,11 +553,6 @@ COMPATIBLE_IOCTL(MTIOCTOP) /* 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) @@ -684,41 +663,6 @@ COMPATIBLE_IOCTL(JSIOCGNAME(0)) COMPATIBLE_IOCTL(TIOCGLTC) COMPATIBLE_IOCTL(TIOCSLTC) #endif -#ifdef TIOCSTART -/* - * For these two we have definitions in ioctls.h and/or termios.h on - * some architectures but no actual implemention. Some applications - * like bash call them if they are defined in the headers, so we provide - * entries here to avoid syslog message spew. - */ -COMPATIBLE_IOCTL(TIOCSTART) -COMPATIBLE_IOCTL(TIOCSTOP) -#endif - -/* 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.18.0