From patchwork Fri Jan 19 01:50:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ram Pai X-Patchwork-Id: 863280 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zN54p5DFsz9s7h for ; Fri, 19 Jan 2018 13:54:02 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QYXfzvuy"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zN54n4sHpzF0Vm for ; Fri, 19 Jan 2018 13:54:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QYXfzvuy"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400d:c0d::241; helo=mail-qt0-x241.google.com; envelope-from=ram.n.pai@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QYXfzvuy"; dkim-atps=neutral Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zN3kG0nTMzF0wr for ; Fri, 19 Jan 2018 12:52:54 +1100 (AEDT) Received: by mail-qt0-x241.google.com with SMTP id o35so414906qtj.13 for ; Thu, 18 Jan 2018 17:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=FZ7oGjpNo7wRIQAizuc+iri/hm7RchOUs62xRqtKqmA=; b=QYXfzvuytOsuKhZeNCB8Bf7y3zQMMvVEA6/nPmbvwyKHoXxCWlyhMV2fTtgbqpibBY BbAlT87zLQbblSFJwIksvtN5+vVWMHXeX+e6tPR8ZiRehOpKQP1ppdaXjIokTVuBjE8K OwtiBivRx6k9DsYYX6ALqGwnMujDK9fXe6HhmqgJq0oihMG9v1j92m99gSZR+2p/8sAs fXivjpSgtVHvy7pRmfUnLO2i/TNZZI3Y5PVSAqwKcsaTUye49o1XIcO9LTjTHmMqrXJI SxR1WEyONuX8mWB4jANy5yRnzc83mr/dXV9AnYJIXYBJHDfJAAt9KVYNds+MSQMor8tr qHCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=FZ7oGjpNo7wRIQAizuc+iri/hm7RchOUs62xRqtKqmA=; b=LvGZ9DRPWHA/IeWb0RDAJr6+botLhtwaLytwsZVEZTGI6qVOkkFp3eTxxRoOHp5c7G JidsHhX7GtF+4dw3qfUl+jQemMIf6ZmkvKpcfhyTFMEGuCmPqGWhBliRIZTWtdRTwsVw vQjZcheWZUfxpLpNUHdr4DsC9GLDz2A5qvNwrFuNc81SKNrEedMQaC4xCPDq1QRgr3fN 4g2JQdn+eKVehhhwKcbTAHY+UTY/CJpff9ZhKzLuHtMBWilEBqgmAFB7IxmEl/KA9yWF 2moroMeWmywqZiIjhB64PIOvorKkKW/FPK++DymmlrzBmbSOBboG9mf02D1IJTzdZLvr nclg== X-Gm-Message-State: AKwxyteuxxl8mjn6N4OR867z5WtpXBvVBGCSLz1jXJP+w254dY9tkXJ0 GcTmaLNYGF0XqKuxQJ9wciI= X-Google-Smtp-Source: ACJfBov4d3IY9m4a2jCaCAu1hfINbx2wNcMW8gVGt8q65jReiwMFuNFZtp0vWmiKqYjugoXJxUpTBw== X-Received: by 10.237.41.39 with SMTP id s36mr27449496qtd.2.1516326771778; Thu, 18 Jan 2018 17:52:51 -0800 (PST) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id c127sm5483161qke.78.2018.01.18.17.52.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 17:52:51 -0800 (PST) From: Ram Pai To: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de Subject: [PATCH v10 24/27] powerpc: sys_pkey_alloc() and sys_pkey_free() system calls Date: Thu, 18 Jan 2018 17:50:45 -0800 Message-Id: <1516326648-22775-25-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1516326648-22775-1-git-send-email-linuxram@us.ibm.com> References: <1516326648-22775-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, ebiederm@xmission.com, linux-doc@vger.kernel.org, x86@kernel.org, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linuxram@us.ibm.com, mhocko@kernel.org, linux-mm@kvack.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org, bauerman@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, khandual@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Finally this patch provides the ability for a process to allocate and free a protection key. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/systbl.h | 2 ++ arch/powerpc/include/asm/unistd.h | 4 +--- arch/powerpc/include/uapi/asm/unistd.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 449912f..dea4a95 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -389,3 +389,5 @@ COMPAT_SYS_SPU(pwritev2) SYSCALL(kexec_file_load) SYSCALL(statx) +SYSCALL(pkey_alloc) +SYSCALL(pkey_free) diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 9ba11db..e0273bc 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -12,13 +12,11 @@ #include -#define NR_syscalls 384 +#define NR_syscalls 386 #define __NR__exit __NR_exit #define __IGNORE_pkey_mprotect -#define __IGNORE_pkey_alloc -#define __IGNORE_pkey_free #ifndef __ASSEMBLY__ diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index df8684f..5db4385 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h @@ -395,5 +395,7 @@ #define __NR_pwritev2 381 #define __NR_kexec_file_load 382 #define __NR_statx 383 +#define __NR_pkey_alloc 384 +#define __NR_pkey_free 385 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */