From patchwork Tue Oct 18 19:31:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9382831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 902FC600CA for ; Tue, 18 Oct 2016 19:33:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F74029757 for ; Tue, 18 Oct 2016 19:33:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7387D29790; Tue, 18 Oct 2016 19:33:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E86829757 for ; Tue, 18 Oct 2016 19:33:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwa7M-0008F3-Mw; Tue, 18 Oct 2016 19:32:08 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwa7H-0008Cs-AM for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 19:32:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:To:From; bh=hCwPTIE9Yij+7cl855/Uq+A20ACbS2Ff4xAxNdM0Hu4=; b=qrB/q994zNAM5PTduskd7y5D+nIlnBm17j9psbXEQ5oWfmfcz7AY5b9WOWsoLF/dx2h87Xm4sBQ8l6gY0pxRPOySaYrBQfUDh/F9nS7mqwcfd/gKGnqG9vegEzGp6h+qXRnojXxFHQfOjWxe+njDx9BAqSmWSjzz9+DfAi4LSvc=; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:44448 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bwa6y-0004dl-4l for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 20:31:44 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bwa6x-0004Ze-8l for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 20:31:43 +0100 From: Russell King To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] ARM: wire up new pkey syscalls MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 18 Oct 2016 20:31:43 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161018_123203_728947_6EFAA3E9 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Wire up the new pkey syscalls for ARM. This illustrates the ease that the generated/tabular approach gives us: adding new system calls becomes much easier, and all the dependencies are automatically handled for the update. Signed-off-by: Russell King --- Of course, this is development, and there will be a patch for -rc2 to wire these up in due course. I'm using this as an illustration for this approach - compared with f2335a2a0a59 ("ARM: wire up preadv2 and pwritev2 syscalls") adding two syscalls, with a diffstat of: arch/arm/include/asm/unistd.h | 2 +- arch/arm/include/uapi/asm/unistd.h | 2 ++ arch/arm/kernel/calls.S | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) vs this patch adding three plus reserving two, giving: arch/arm/tools/syscall.tbl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index 62285cbd09c0..c2af3b281bcb 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -426,3 +426,8 @@ 391 common copy_file_range sys_copy_file_range 392 common preadv2 sys_preadv2 393 common pwritev2 sys_pwritev2 +394 common pkey_mprotect sys_pkey_mprotect +395 common pkey_alloc sys_pkey_alloc +396 common pkey_free sys_pkey_free +# 397 for pkey_get +# 398 for pkey_set