From patchwork Mon Nov 2 12:31:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11873821 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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 BC399C00A89 for ; Mon, 2 Nov 2020 12:33:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C4A02225B for ; Mon, 2 Nov 2020 12:33:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mh7IXu0r"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="xj2CopuK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C4A02225B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0o8ddLOHz2+kufbhRo7s7RIYhA2I3FZWuvmUAZ1ggFQ=; b=Mh7IXu0rpxLvXp31k+kriCXyjv UL2TDZb9z40VOYyeGxps8R23u6de4UbZTE2NbCNQ/e1t2j2Pqa/F1SCvI8kMClVwPvt1JSm0YKpzp L9T3ehBC5s8Hd9xMPph/uWcllpTnBIm3+cVsAA2eEZq5HxRA7h/Nczo9buzUP8/aNqNvLQw/9q6zK hH2Iq/x+e3ey3tySlg5FARyZzsbZdvwx2FOvXbV5Ib09zNwrc0t74XHay/hW10Jdgk3TJoe+iQrM1 dTadCCDbqP2MoeTesEiJfJgstmZ+0QbwbEy3rhvQNlPsujB9oIqdv/vg8VupHtvVf+AEiQ5ixd5Gx WUY1KyRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZZ0U-0007b4-63; Mon, 02 Nov 2020 12:32:18 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZZ0Q-0007Zk-N7; Mon, 02 Nov 2020 12:32:15 +0000 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D84E2076E; Mon, 2 Nov 2020 12:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604320333; bh=lLXuGY/nGSqNrbsjk3YhWViLi2X0XYWjraAqnjfRDAc=; h=From:To:Cc:Subject:Date:From; b=xj2CopuKaGXkMg2sipuEiU3iuJEEmdGxEzbxBvMQkkUEUqrhHMqAJsqqYBYeKHrTy mAt1qNFbZPz26kGNMcz5w22t0LIY5Gt08nabXpweNBi/9lwYBznFti6g1OtqxRclH8 GJc5vaCul4npegEcPz3/CW6YydqTd5i0rSUacZJk= From: Arnd Bergmann To: linux-arch@vger.kernel.org Subject: [PATCH v2 0/4] syscalls: remove compat_alloc_user_space callers Date: Mon, 2 Nov 2020 13:31:47 +0100 Message-Id: <20201102123151.2860165-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_073214_835477_8EDA04BF X-CRM114-Status: GOOD ( 17.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Arnd Bergmann , Brian Gerst , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Borislav Petkov , Alexander Viro , Andy Lutomirski , "H . Peter Anvin" , Andrew Morton , Ingo Molnar , linux-arm-kernel@lists.infradead.org, Eric Biederman Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann Going through compat_alloc_user_space() to convert indirect system call arguments tends to add complexity compared to handling the native and compat logic in the same code. I have patches for all other uses of compat_alloc_user_space() as well, and would expect that we can subsequently remove the interface itself. Changes in v2: - address review comments from Christoph Hellwig - split syscall removal into a separate patch - replace __X32_COND_SYSCALL() with individual macros for x32 Arnd Bergmann (4): kexec: simplify compat_sys_kexec_load mm: simplify compat_sys_move_pages mm: simplify compat numa syscalls compat: remove some compat entry points arch/arm64/include/asm/unistd32.h | 12 +- arch/mips/kernel/syscalls/syscall_n32.tbl | 12 +- arch/mips/kernel/syscalls/syscall_o32.tbl | 12 +- arch/parisc/kernel/syscalls/syscall.tbl | 10 +- arch/powerpc/kernel/syscalls/syscall.tbl | 12 +- arch/s390/kernel/syscalls/syscall.tbl | 12 +- arch/sparc/kernel/syscalls/syscall.tbl | 12 +- arch/x86/entry/syscall_x32.c | 2 + arch/x86/entry/syscalls/syscall_32.tbl | 6 +- arch/x86/entry/syscalls/syscall_64.tbl | 4 +- include/linux/compat.h | 26 --- include/linux/kexec.h | 2 - include/uapi/asm-generic/unistd.h | 12 +- kernel/kexec.c | 90 ++++------ kernel/sys_ni.c | 5 - mm/mempolicy.c | 195 +++++----------------- mm/migrate.c | 50 +++--- 17 files changed, 155 insertions(+), 319 deletions(-) Cc: Alexander Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Christoph Hellwig Cc: Eric Biederman Cc: Ingo Molnar Cc: "H . Peter Anvin" Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: kexec@lists.infradead.org