From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00483C43463 for ; Fri, 18 Sep 2020 12:45:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FAF220717 for ; Fri, 18 Sep 2020 12:45:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vJlif4OD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FAF220717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 965428E0003; Fri, 18 Sep 2020 08:45:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8ED1B6B005A; Fri, 18 Sep 2020 08:45:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78CB98E0001; Fri, 18 Sep 2020 08:45:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 5A23B6B0055 for ; Fri, 18 Sep 2020 08:45:50 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 292CA181AEF1F for ; Fri, 18 Sep 2020 12:45:50 +0000 (UTC) X-FDA: 77276154060.29.light35_41151da2712b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 0136118086CBE; Fri, 18 Sep 2020 12:45:49 +0000 (UTC) X-HE-Tag: light35_41151da2712b X-Filterd-Recvd-Size: 4719 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP; Fri, 18 Sep 2020 12:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=V3X+nIZPxUoB2BOajjqXji1hFeXgDyeXoEcOBeTEcjY=; b=vJlif4ODGlFSaA/X96y95TBxaJ n1vQfWDy9aeQQz/QfN88AtyhJjnDQw4iBBxB3dOINUYSWIDVuarqzmR0pZ51u4RNdWq3xd56/l+oR 5GEDqjcn7bBB3CNVKgHN2a9wCcAG8SVe7T2vZu1M3dI0BtwzjwiuqLtNf9Jp3kLrAw46KAsyjal9/ QoDWN5trBS3vHnHgnjwv02AJsET1D7F4cR807vr6jIEUKZP+oBkLuggklbUB1OR5q/LzveCjsdCRd XkzH7AWVhPje1BKWsGUA6phSyo6a5kaSlGjDsD4kHaEc69ADj0ykAyKUBp48wXzsnb2cVPD/Usdlf ivQpFJ1w==; Received: from [80.122.85.238] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJFle-0008SE-9Z; Fri, 18 Sep 2020 12:45:36 +0000 From: Christoph Hellwig To: Alexander Viro Cc: Andrew Morton , Jens Axboe , Arnd Bergmann , David Howells , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org Subject: let import_iovec deal with compat_iovecs as well Date: Fri, 18 Sep 2020 14:45:24 +0200 Message-Id: <20200918124533.3487701-1-hch@lst.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Al, this series changes import_iovec to transparently deal with comat iovec structures, and then cleanups up a lot of code dupliation. But to get there it first has to fix the pre-existing bug that io_uring compat contexts don't trigger the in_compat_syscall() check. This has so far been relatively harmless as very little code callable from io_uring used the check, and even that code that could be called usually wasn't. Diffstat arch/arm64/include/asm/unistd32.h | 10=20 arch/mips/kernel/syscalls/syscall_n32.tbl | 10=20 arch/mips/kernel/syscalls/syscall_o32.tbl | 10=20 arch/parisc/kernel/syscalls/syscall.tbl | 10=20 arch/powerpc/kernel/syscalls/syscall.tbl | 10=20 arch/s390/kernel/syscalls/syscall.tbl | 10=20 arch/sparc/include/asm/compat.h | 3=20 arch/sparc/kernel/syscalls/syscall.tbl | 10=20 arch/x86/entry/syscall_x32.c | 5=20 arch/x86/entry/syscalls/syscall_32.tbl | 10=20 arch/x86/entry/syscalls/syscall_64.tbl | 10=20 arch/x86/include/asm/compat.h | 2=20 block/scsi_ioctl.c | 12=20 drivers/scsi/sg.c | 9=20 fs/aio.c | 38 -- fs/io_uring.c | 21 - fs/read_write.c | 307 ++++----------= ------- fs/splice.c | 57 --- include/linux/compat.h | 29 - include/linux/fs.h | 7=20 include/linux/sched.h | 1=20 include/linux/uio.h | 7=20 include/uapi/asm-generic/unistd.h | 12=20 lib/iov_iter.c | 30 -- mm/process_vm_access.c | 69 ---- net/compat.c | 4=20 security/keys/compat.c | 37 -- security/keys/internal.h | 5=20 security/keys/keyctl.c | 2=20 tools/include/uapi/asm-generic/unistd.h | 12=20 tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 10=20 tools/perf/arch/s390/entry/syscalls/syscall.tbl | 10=20 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 10=20 33 files changed, 207 insertions(+), 582 deletions(-)