Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811873/?format=api
{ "id": 811873, "url": "http://patchwork.ozlabs.org/api/patches/811873/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504910713-7094-18-git-send-email-linuxram@us.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1504910713-7094-18-git-send-email-linuxram@us.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1504910713-7094-18-git-send-email-linuxram@us.ibm.com/", "date": "2017-09-08T22:44:57", "name": "[09/25] powerpc: ability to create execute-disabled pkeys", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "f559bf6f21aa8fa3fdb171cd9e7ccebe52cb00be", "submitter": { "id": 2667, "url": "http://patchwork.ozlabs.org/api/people/2667/?format=api", "name": "Ram Pai", "email": "linuxram@us.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504910713-7094-18-git-send-email-linuxram@us.ibm.com/mbox/", "series": [ { "id": 2303, "url": "http://patchwork.ozlabs.org/api/series/2303/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=2303", "date": "2017-09-08T22:44:40", "name": "powerpc: Free up RPAGE_RSV bits", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2303/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811873/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811873/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xptbG1kDTz9s7h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 9 Sep 2017 09:20:26 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xptbG0MGVzDrcF\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 9 Sep 2017 09:20:26 +1000 (AEST)", "from mail-qk0-x242.google.com (mail-qk0-x242.google.com\n\t[IPv6:2607:f8b0:400d:c09::242])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xpsrf4H8JzDrcp\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 9 Sep 2017 08:46:58 +1000 (AEST)", "by mail-qk0-x242.google.com with SMTP id g128so2327254qke.0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 08 Sep 2017 15:46:58 -0700 (PDT)", "from localhost.localdomain (50-39-103-96.bvtn.or.frontiernet.net.\n\t[50.39.103.96]) by smtp.gmail.com with ESMTPSA id\n\tx124sm2033726qka.85.2017.09.08.15.46.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 15:46:56 -0700 (PDT)" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YJ/liKVk\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YJ/liKVk\"; dkim-atps=neutral", "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400d:c09::242; helo=mail-qk0-x242.google.com;\n\tenvelope-from=ram.n.pai@gmail.com; receiver=<UNKNOWN>)", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YJ/liKVk\"; dkim-atps=neutral" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=0Jb5jeM2wh9FdjQ7C4+oqGliaOzy4NENLmrM18JVFPE=;\n\tb=YJ/liKVkI242RmV8J0vIvXkWGT5EwM4JKcefZzjCJTUDn5kZ/0edvI20o3T1Mr89Rb\n\t25N0Un4mtAY09nCNIm5V4sE3Cswoe3UNXmvT8eFm7ozds8OpocCnrB+wFGi+i/LwXWOJ\n\tlTd2w7C0i6KX8y6aWA/cWGmjxTf408EIYyUZPMPHBL/66fQzxEFHgE7z3gxxp6CPXU/c\n\tG0jSD7hGxtBvP0SGna2nTtj1r+TqJaDaJMhfjp6cv+y+0185NY7sWCHOiIagtKhzW2bC\n\tNysoYCJDt72GAYPpZh3yPY+DTE6aDfdfzLq+QPAFNSs9h62hnG/UArjiuyucScAnB088\n\t9Drw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=0Jb5jeM2wh9FdjQ7C4+oqGliaOzy4NENLmrM18JVFPE=;\n\tb=XYdlbPt8kV0HUiLtxu6Q5mZ2ZR8K3JHEslBgNos0fhRDDbS1y5WsG6BIUbBYu4zhky\n\tfOHzR0RLDmPpGtSgK3WWYscS4gJfG/V0/IDIIq+Ui7JqUKiPcOK2Iq8rwNnuQnHCkhk7\n\tBKbRIr8d2IrbkC13kgFn+u7y3GPf20Ag/TwMOm2qBLrura6X4fdnVD3V1S9Xm8F0E2zs\n\thRPM8ekYtL7s8H2I2V3w/5C7PDjWF4BxK15or/xv4SDYAM2k7D+cbqmCf22J4UoZAxzV\n\tHLNqDoAMwcLtmKpLNSTQtIoY+t8D4S2KM986r/r2EHhE3nLJMT1Zqq5PaS6a6W5Nl0yS\n\tihBw==", "X-Gm-Message-State": "AHPjjUibzcKZEYFaiQT/hJ5D6J5zyfrUCM823y5xVNdSpvMuNmOLave3\n\tb6m24r9MGAzjgw==", "X-Google-Smtp-Source": "AOwi7QCsy6nG7qLqv6qUAfE5JtG7Pu7Xx13VRfSsj4JxM26StJZ/PUzDjkhhEATAC4SP4shZ1+7vBw==", "X-Received": "by 10.55.18.96 with SMTP id c93mr6215639qkh.297.1504910816705;\n\tFri, 08 Sep 2017 15:46:56 -0700 (PDT)", "From": "Ram Pai <linuxram@us.ibm.com>", "To": "mpe@ellerman.id.au,\n\tlinuxppc-dev@lists.ozlabs.org", "Subject": "[PATCH 09/25] powerpc: ability to create execute-disabled pkeys", "Date": "Fri, 8 Sep 2017 15:44:57 -0700", "Message-Id": "<1504910713-7094-18-git-send-email-linuxram@us.ibm.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>", "References": "<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "ebiederm@xmission.com, linuxram@us.ibm.com, mhocko@kernel.org,\n\tpaulus@samba.org, aneesh.kumar@linux.vnet.ibm.com,\n\tbauerman@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "powerpc has hardware support to disable execute on a pkey.\nThis patch enables the ability to create execute-disabled\nkeys.\n\nSigned-off-by: Ram Pai <linuxram@us.ibm.com>\n---\n arch/powerpc/include/uapi/asm/mman.h | 6 ++++++\n arch/powerpc/mm/pkeys.c | 16 ++++++++++++++++\n 2 files changed, 22 insertions(+), 0 deletions(-)", "diff": "diff --git a/arch/powerpc/include/uapi/asm/mman.h b/arch/powerpc/include/uapi/asm/mman.h\nindex ab45cc2..f272b09 100644\n--- a/arch/powerpc/include/uapi/asm/mman.h\n+++ b/arch/powerpc/include/uapi/asm/mman.h\n@@ -45,4 +45,10 @@\n #define MAP_HUGE_1GB\t(30 << MAP_HUGE_SHIFT)\t/* 1GB HugeTLB Page */\n #define MAP_HUGE_16GB\t(34 << MAP_HUGE_SHIFT)\t/* 16GB HugeTLB Page */\n \n+/* override any generic PKEY Permission defines */\n+#define PKEY_DISABLE_EXECUTE 0x4\n+#undef PKEY_ACCESS_MASK\n+#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\\\n+\t\t\t\tPKEY_DISABLE_WRITE |\\\n+\t\t\t\tPKEY_DISABLE_EXECUTE)\n #endif /* _UAPI_ASM_POWERPC_MMAN_H */\ndiff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c\nindex cc5be6a..2282864 100644\n--- a/arch/powerpc/mm/pkeys.c\n+++ b/arch/powerpc/mm/pkeys.c\n@@ -24,6 +24,14 @@ void __init pkey_initialize(void)\n {\n \tint os_reserved, i;\n \n+\t/*\n+\t * we define PKEY_DISABLE_EXECUTE in addition to the arch-neutral\n+\t * generic defines for PKEY_DISABLE_ACCESS and PKEY_DISABLE_WRITE.\n+\t * Ensure that the bits a distinct.\n+\t */\n+\tBUILD_BUG_ON(PKEY_DISABLE_EXECUTE &\n+\t\t (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE));\n+\n \t/* disable the pkey system till everything\n \t * is in place. A patch further down the\n \t * line will enable it.\n@@ -120,10 +128,18 @@ int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,\n \t\tunsigned long init_val)\n {\n \tu64 new_amr_bits = 0x0ul;\n+\tu64 new_iamr_bits = 0x0ul;\n \n \tif (!is_pkey_enabled(pkey))\n \t\treturn -EINVAL;\n \n+\tif ((init_val & PKEY_DISABLE_EXECUTE)) {\n+\t\tif (!pkey_execute_disable_support)\n+\t\t\treturn -EINVAL;\n+\t\tnew_iamr_bits |= IAMR_EX_BIT;\n+\t}\n+\tinit_iamr(pkey, new_iamr_bits);\n+\n \t/* Set the bits we need in AMR: */\n \tif (init_val & PKEY_DISABLE_ACCESS)\n \t\tnew_amr_bits |= AMR_RD_BIT | AMR_WR_BIT;\n", "prefixes": [ "09/25" ] }