From patchwork Wed Oct 9 19:10:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 175634 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1170360ill; Wed, 9 Oct 2019 12:11:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4TREy+cs9zasGDbpuoyMrTQS+sRwl1MsxGgHZ22mhaJVPIFYfo9r8EpPp9oVYP9L/f4+x X-Received: by 2002:a17:906:298f:: with SMTP id x15mr4308599eje.50.1570648268378; Wed, 09 Oct 2019 12:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570648268; cv=none; d=google.com; s=arc-20160816; b=THRBIKnQ23ctftle5okcWj/su/vhshyaMrNFzpOYgYWc1bXzzuBjePomnJ4muIvfID a7Jdi8iuuUYOXI0nT0umDRS0YMF9wXyFLWR22R+tKx3uX/vRNR9pAlwm9tCZTPPkv/2c 41J2E7TNLHHcMNRYKl8qbZ6U8VSAU7pzkLh6/j4bvkFPj7ZWB+H+xiTgmcxEYKxR/P9q oMPticgi7uuXxEYlRm8zko3Rqdq8+fPzxCr+wZ01fP5DnOgvgK3ZDCKGw5gYTcfHkjvb fFCAgRSZ2oUiswK7hvTrIW7qVivSSHPlk8yyNoItbKuXfO/XODDZQMn8k6OYTuHchiWa 0kBA== 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=qBe0RxGqYa2Mz1EAUqLg0S4YUw9XHpWnxmmzZ7QKh6w=; b=zV0WnzBcBAGy/M5rAP/xeXmIx9HNnDYjhItHEcaGGFnX9rb+rIRTr+nE41JQfdunue TdEk3W5wRFpgZFa/w6t/AEHY7lhI8gON0GMoaL+pB8SwG1AMQURT5VxMwxeDMy/HL/GD eWQfdO51Owx9Wtr3IiyDFqEthrYg1D6TpQfdCVrXnvkiabzX3WLpfFNAwPozsenAjcLl 2SljCWteKyOtFvHM3Azi6jXoit9TF1rJrs3y/XloaB8H2UNTqyBqXmRKOZBEWYg7rRbW GXExr9xQDmkOLOPGKkIm41EPsfFr9p7kh8HB6l5GXRma0foSWEzzX/9JUL0nSNJLAfjc jQlA== 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 q13si1711323eju.46.2019.10.09.12.11.08; Wed, 09 Oct 2019 12:11:08 -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 S1731625AbfJITLH (ORCPT + 26 others); Wed, 9 Oct 2019 15:11:07 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:36045 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728804AbfJITLG (ORCPT ); Wed, 9 Oct 2019 15:11:06 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MCKWI-1iQUqA1iMc-009Tzp; Wed, 09 Oct 2019 21:11:04 +0200 From: Arnd Bergmann To: Al Viro Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v6 01/43] fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP Date: Wed, 9 Oct 2019 21:10:01 +0200 Message-Id: <20191009191044.308087-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191009190853.245077-1-arnd@arndb.de> References: <20191009190853.245077-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:2uJzilWeK+WiT0h/pPdN3K/mVdDW9vuZKh5Yov5RjBQWLhEkFap up2GIxj8olvwQyD7nR6AsIG1/ngU6zLv+NT0Y0oU00nKWO6ezKQaqr/JnGgm1oSKtbbC3SO uYzStCkbpGXYKZlSiTsjT053BoaE5r0D1mmmRBMk5nKa4JV3IMvPXaF55mk6LpR5WrXNxYf T2KievGd+GbjOXz6xVSfw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:NRFYuPKnEzE=:+jRPMK5onbQzyVK1NHGVFD OTAzT1XPimm0LNZEtTF71Ls8QCgcHoLMeVDlIFljoRwUflgKvHTB7BMUZHgfa4LV/HXvZR6Wi lpCvt26D0MrhZdB7iLnpQyhz/sbkkaDzNPuewSvyG3fk4RyMm3eNlOFGADFygQ7oFf8HlBJrb TSG+GrUflecniKNUu3nUj0LQ87hRmJ9r8mAKzf2uya08bvMmeXXbRHWRcHwM5murzvUhmvW9D UaAY/nQzTBBYXR17b/hHClU2+65r0MqBxGaM9BzqXX6WI65zZ6C7h/jns+vBBkKJg8yVITWGN AlifMCCwgeHZ+7aklSauD6cRN0b55xqXMHAlISjdbfpRMza3GreD/s6r0JbCbuFAaFhpoQuBw p58j7/ZRPbqwlgMA/xQw7h4G3dsJdjyB8dTrcy/570F+X43+YHbOTGzI/sML8wd0+gk+cNnGo PIGHlQvHlGmAQQ3fRr7utBE9d5mo5rMN6gv+zrAIdWThhXelSn8bfUFDWXHb3nxhN27ulG0dL rki5fZl7jLs16uIOe4izdDqhR9a7ZqCe0tvVMZzqaq5O64ksLusQWThq2EJL4qIRjm7QeE29n vNw/Kw+6mVZ4PU1uJEVkCnuBLy6JNWV+j+QtaYfx9PSwBMa6oeJFHfaD/ujFHX62XGFRRHWr0 MUkskSrK4tIckxJIDq+blZCBvl1aqEumKcQ9Y6sS0lIRiA4yeA9tQn0Z3wiWOEq7SwPsMMPh8 mf920VjPDEVFVfhEAdhAt61uDO9UgQUyIau3EoTCEWuIQPnaO2gUEXX62dN42Ru1t+GSRDNSo 0vUguuUma6IZR2u4o5ElRna9moSK2Qqi9+IJJ1U67PTE+GhYB7qI1P9SnApsa4ezL2S/FIS1Y CromSpYbYmQDcqkn512Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro Unlike FICLONE, all of those take a pointer argument; they do need compat_ptr() applied to arg. Fixes: d79bdd52d8be ("vfs: wire up compat ioctl for CLONE/CLONE_RANGE") Fixes: 54dbc1517237 ("vfs: hoist the btrfs deduplication ioctl to the vfs") Fixes: ceac204e1da9 ("fs: make fiemap work from compat_ioctl") Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann --- fs/compat_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index a7ec2d3dff92..e0226b2138d6 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -1032,10 +1032,11 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, #endif case FICLONE: + goto do_ioctl; case FICLONERANGE: case FIDEDUPERANGE: case FS_IOC_FIEMAP: - goto do_ioctl; + goto found_handler; case FIBMAP: case FIGETBSZ: