Received: by 10.223.176.46 with SMTP id f43csp308284wra; Thu, 18 Jan 2018 17:56:18 -0800 (PST) X-Google-Smtp-Source: ACJfBouLP9SPBAIZP/ILkvIRlbraYNlKR+IT23EW/AvXhud667G+66SkoceibAZUvmRyxDmSCZLA X-Received: by 10.99.96.131 with SMTP id u125mr38150829pgb.380.1516326978874; Thu, 18 Jan 2018 17:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516326978; cv=none; d=google.com; s=arc-20160816; b=QB8c6VVj20PA2p+Ik0L+7PBlzsCuNz1pHADjAGbYvTTfnanqSdr0NsZUqTUDcd27+F a8zWwNKuzPM4iXU5hAJToYl0Oa0DIWp/3fETJVYCMIDxkQaBhewF1zBo90OCFTzkXIJh r66x/iUw1XHKgau5GKssjPivKvwnZfC2Uyarm2rS6Z4pBsQANrzHfQO0Z3Hum4PdD5F8 zmJELIFnh8X7OqqwEdIfFgN7Nlbep1JyemKCNXyrESyEhnIaSTVDuo5P+RuLrXn+L74K AIfQlkcCnU8plv9rUFAOkXQp0eOJfVpogpwJfX2pmkDgHV3ne/ZSD1b4zs4XXBRqO5Uq 7nNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FZ7oGjpNo7wRIQAizuc+iri/hm7RchOUs62xRqtKqmA=; b=kd0hS1rbbZ021Cu65/kadTbT6I9riCPwJAbUplrcT5xgi3I+Voi+UEEK+dD/q0Nanf /NTcAlcqhNx+HCWZA2oj35ArP2acll0p35NPlqHiaNj8wgzKz5BVyUr8oRHnPxK0tsIJ G7frB9O3PeMvv1wQBHgWhmWs8XHBkvbiUrJUunQWoCbLYgySJOBMHLsvfv8WYJw+dXiP ONhNG2a8MhrH8QWTARCDWIJ/abj/gmKdjkHMkVmwANiaBt/bC6g49EN+gAH0fa1myU94 bfkVZAo80937FZZP6dkTJUXsn6LFDNlXmPwxFCry6Sv2gSAadYs9YDRanRdKT1YrU7AV zxmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QYXfzvuy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t203si7183092pgb.758.2018.01.18.17.56.05; Thu, 18 Jan 2018 17:56:18 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QYXfzvuy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932394AbeASBzN (ORCPT + 99 others); Thu, 18 Jan 2018 20:55:13 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:42358 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755294AbeASBww (ORCPT ); Thu, 18 Jan 2018 20:52:52 -0500 Received: by mail-qt0-f196.google.com with SMTP id c2so430423qtn.9; Thu, 18 Jan 2018 17:52:52 -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=VZhg/fwLDX9wOKwoRLwX3wzz9AQTnNw+zXA5Td83mtiEqWsfpEXJdKBakSKCpGI659 W7kw2402c/rXituSwfeI2LccKsgDkTIomhWDc0aHDFrUx4ZnfeQrYU0TIKik4opFdgTG A9OniOugwIsY1xT5sFsqwhXUZFUvGyxDRoz4VoGRmRmBW7i9IUzb/W8HWzNCxHDjf4Ov virTQDpOtFB/tUz5aKuvr2H4LsAxgtlU6BOv51QWk3J8Pm8PuhYGoyBqvMYCcDZATjwk e4+bdGEyTe/70hkCVdZ0MOf4yCemPckY+co0X4YOQpaJIWgmg5xTcEmspEi3x0diGQS/ qn8g== X-Gm-Message-State: AKwxytfAODZ6yMXxixezhI8MmDviOxwxd2+QODhZaexM4IzqN+FrrVuJ HoGRbLSbgausKGnlZcGKgjE= 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 Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, benh@kernel.crashing.org, paulus@samba.org, khandual@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, ebiederm@xmission.com, linuxram@us.ibm.com 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_ */ -- 1.7.1