From patchwork Mon Jun 3 12:03:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Streetman X-Patchwork-Id: 1109202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45HYd00vTwz9sNk; Mon, 3 Jun 2019 22:04:19 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hXlhI-0004MJ-D8; Mon, 03 Jun 2019 12:04:16 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1hXlhG-0004Lu-F9 for kernel-team@lists.ubuntu.com; Mon, 03 Jun 2019 12:04:14 +0000 Received: from mail-yb1-f200.google.com ([209.85.219.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hXlhG-0002re-1U for kernel-team@lists.ubuntu.com; Mon, 03 Jun 2019 12:04:14 +0000 Received: by mail-yb1-f200.google.com with SMTP id r142so8774206ybc.0 for ; Mon, 03 Jun 2019 05:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J7NyBdxhdsek+xG6c8IbdX3kKa4LIrDE3ZEizKPx3jE=; b=VTYZu0ItwwcYWTe2/Cp3QjijOLLJdsCG0S63BA95pdZkCb6h7SU8xdAmuKfivYdczx Fz5FS+x3SmIjTpxaFRnF84Hshu6E7QahTUSKRjltc+FLosRsS6a90jG696eSzHoYbesh y6wCacj9RYXsALM4cg+Q8Gogtit2UjkzNgwOG2Sxp8KlzgTOf7Sk28ScBQIJETC17hBy mGC7obp1qzm6l/pwW14B2KWcryLyRQr4226HvMf2bGqXipFVwf1bw6OmLyg0cR/akFnw t2Nlo76LzTsOoKMorN4nVq4QG0QGZVDqHbxCpFqcRaYTAX4FouLliUCUgUMchSB0wjad XZtA== X-Gm-Message-State: APjAAAXHX1BmEd2cgcE6oeK3NndZvJSxTgMyJZSKU3vAW/ndHaILO1jq k5gbI4HFItnlCI0LVv8dImu3hN/EJR4JWZmomenGqxIxKFS0BhBDc7jpF0KcWE7vrcoPZ2kf/ru M5OAUJz9m1lGKIY3fIP8+iMCfHlwM1izD4I00LLxnhQ== X-Received: by 2002:a81:e4e:: with SMTP id 75mr13705327ywo.487.1559563452926; Mon, 03 Jun 2019 05:04:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfsaug3vU+0CHzT9gyhUlVtuKNXdkzoEffiB81uWna6XAzLChF0zsMzm0FHw1dNv/lz1emNw== X-Received: by 2002:a81:e4e:: with SMTP id 75mr13705311ywo.487.1559563452705; Mon, 03 Jun 2019 05:04:12 -0700 (PDT) Received: from thorin.lan (45-27-90-188.lightspeed.rlghnc.sbcglobal.net. [45.27.90.188]) by smtp.gmail.com with ESMTPSA id 138sm3672872ywm.96.2019.06.03.05.04.11 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 03 Jun 2019 05:04:12 -0700 (PDT) From: Dan Streetman To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2] powerpc: sys_pkey_alloc() and sys_pkey_free() system calls Date: Mon, 3 Jun 2019 08:03:48 -0400 Message-Id: <20190603120349.403-2-dan.streetman@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190603120349.403-1-dan.streetman@canonical.com> References: <20190603120349.403-1-dan.streetman@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ram Pai BugLink: https://bugs.launchpad.net/bugs/1821625 Finally this patch provides the ability for a process to allocate and free a protection key. Signed-off-by: Ram Pai Signed-off-by: Michael Ellerman (cherry picked from commit 9499ec1b5e82321829e1c1510bcc37edc20b6f38) Signed-off-by: Dan Streetman --- 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 449912f057f63..dea4a952ec53d 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -389,3 +389,5 @@ COMPAT_SYS_SPU(preadv2) 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 9ba11dbcaca98..e0273bc5b0952 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 df8684f31919a..5db438516e61b 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_ */ From patchwork Mon Jun 3 12:03:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Streetman X-Patchwork-Id: 1109203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45HYd212k6z9s4Y; Mon, 3 Jun 2019 22:04:22 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hXlhK-0004NG-Ie; Mon, 03 Jun 2019 12:04:18 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1hXlhI-0004MC-AP for kernel-team@lists.ubuntu.com; Mon, 03 Jun 2019 12:04:16 +0000 Received: from mail-yb1-f200.google.com ([209.85.219.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hXlhH-0002rk-Tc for kernel-team@lists.ubuntu.com; Mon, 03 Jun 2019 12:04:16 +0000 Received: by mail-yb1-f200.google.com with SMTP id k10so14250332ybd.14 for ; Mon, 03 Jun 2019 05:04:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fHNc0UVXB8W4eROFk4NupnDu6Yb0mOmt+FqUVMuf5xo=; b=juFQK9/NBBPgnCfOZxYNNYUVU0C14DoFLY2XWbqUd/FFyabWF3R9agJEu5l5FvUidX j9kY4XVXWuE8OBlte5tLJMSowHyGFIiDD51kz698gmkNYpKU1CW6WuRWNLX9VCu3/Gp7 jH7x8lD3B3OZKDkd9TVcNgxlgGIsobutGhuQOZhphb+kLMzj2WuHgXRYsx5MmhDNMog4 i/058fwwX1H4uNv4Hj8eAHEJVaQV42ciQmwtGIAnsNCovgGYF8SMy7STBjfQ8WS/VXKD OuC0ffIkZoYGwPMNeUf9T4K6ipYqf4jXQTu4lkwmQUsD9jDWRlQ8sSAAaIFx5mvH/wv2 s6sg== X-Gm-Message-State: APjAAAVDlwVB6R94Ew8zpSt50z9ah22nTK1j7lp7m/HiL7m8GQm5LKWD aL8aS+7l2hCNK45QBTR0agWXYUa3dGN/ZJEInXC8qamMm9Owak8KtTJ4XSXiktbl7AeqKe7mvhG YQ5HJLoHGScth6kCOVs1EIs05hDGaJb+Jy3jw9/kR0g== X-Received: by 2002:a25:2410:: with SMTP id k16mr11664520ybk.174.1559563454867; Mon, 03 Jun 2019 05:04:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDNyP4D6svLD1fMF1/pTKwau5nsabdoHAS3ezlV4e7i6P8MS0UtQ3ZRhyD7Hz10jFBuDsQVg== X-Received: by 2002:a25:2410:: with SMTP id k16mr11664506ybk.174.1559563454609; Mon, 03 Jun 2019 05:04:14 -0700 (PDT) Received: from thorin.lan (45-27-90-188.lightspeed.rlghnc.sbcglobal.net. [45.27.90.188]) by smtp.gmail.com with ESMTPSA id 138sm3672872ywm.96.2019.06.03.05.04.13 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 03 Jun 2019 05:04:13 -0700 (PDT) From: Dan Streetman To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] powerpc: sys_pkey_mprotect() system call Date: Mon, 3 Jun 2019 08:03:49 -0400 Message-Id: <20190603120349.403-3-dan.streetman@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190603120349.403-1-dan.streetman@canonical.com> References: <20190603120349.403-1-dan.streetman@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ram Pai BugLink: https://bugs.launchpad.net/bugs/1821625 Patch provides the ability for a process to associate a pkey with a address range. Signed-off-by: Ram Pai Signed-off-by: Michael Ellerman (cherry picked from commit 3350eb2ea127978319ced883523d828046af4045) Signed-off-by: Dan Streetman --- arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/unistd.h | 4 +--- arch/powerpc/include/uapi/asm/unistd.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index dea4a952ec53d..d61f9c96d9163 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -391,3 +391,4 @@ SYSCALL(kexec_file_load) SYSCALL(statx) SYSCALL(pkey_alloc) SYSCALL(pkey_free) +SYSCALL(pkey_mprotect) diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index e0273bc5b0952..daf1ba97a00cd 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -12,12 +12,10 @@ #include -#define NR_syscalls 386 +#define NR_syscalls 387 #define __NR__exit __NR_exit -#define __IGNORE_pkey_mprotect - #ifndef __ASSEMBLY__ #include diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index 5db438516e61b..389c36fd82990 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h @@ -397,5 +397,6 @@ #define __NR_statx 383 #define __NR_pkey_alloc 384 #define __NR_pkey_free 385 +#define __NR_pkey_mprotect 386 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */