Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814446/?format=api
{ "id": 814446, "url": "http://patchwork.ozlabs.org/api/patches/814446/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1505524870-4783-2-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": "<1505524870-4783-2-git-send-email-linuxram@us.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1505524870-4783-2-git-send-email-linuxram@us.ibm.com/", "date": "2017-09-16T01:21:05", "name": "[1/6] mm: introduce an additional vma bit for powerpc pkey", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "a5c41344a70bbbeec1e47f10b51e8488bdbb78ab", "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/1505524870-4783-2-git-send-email-linuxram@us.ibm.com/mbox/", "series": [ { "id": 3406, "url": "http://patchwork.ozlabs.org/api/series/3406/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3406", "date": "2017-09-16T01:21:04", "name": "mm, x86, powerpc: Memory Protection Keys enhancement", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3406/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814446/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814446/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 [103.22.144.68])\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 3xvF2F6TXmz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 11:25:25 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xvF2F5HnRzDrnf\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 11:25:25 +1000 (AEST)", "from mail-qk0-x243.google.com (mail-qk0-x243.google.com\n\t[IPv6:2607:f8b0:400d:c09::243])\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 3xvDxq2dgPzDrbr\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 16 Sep 2017 11:21:35 +1000 (AEST)", "by mail-qk0-x243.google.com with SMTP id i14so2432790qke.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 15 Sep 2017 18:21:35 -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\tv11sm1493189qkl.45.2017.09.15.18.21.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 18:21:31 -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=\"U3RfMNWN\"; 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=\"U3RfMNWN\"; dkim-atps=neutral", "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400d:c09::243; helo=mail-qk0-x243.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=\"U3RfMNWN\"; 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=p+SC2whNU3+lSuskV2alUvcf0/dnKYq3m6sjwKX9YzI=;\n\tb=U3RfMNWN5X7w59bGZmvj91qDitQH5wJ826srwZTRiclac/Y5db3fs5aEVytn7vwMP6\n\teJHNMMQBFTOPtGu3O4bW0mP/UoEVSWPgFa3VzlmtJSgKEgThpL5iGd1ecwciKCuG7l7S\n\t7nEU2reeQ3QyCxCZFX2bQh6XjTTBlg/j6TgCJRV9Ud/QAvTlkKfnoP4CSrxnreKUbZ4B\n\tEYcjdAo3QgETKGetqSvBC+ghCTZEsw5rDThlBjsexHqS6UERhogiRnCSCTkIq+iVDSgZ\n\txMIEnQftbP5ehRAK/iY6JED9QkOZDu4dd8cBMtGUiTUV+fHztg6p0yahOCDgnvVpCMTh\n\tYVew==", "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=p+SC2whNU3+lSuskV2alUvcf0/dnKYq3m6sjwKX9YzI=;\n\tb=ce4BYcQYyNOBceXuVBCjWmhzCzxtPA4Sj/p6Y/fzSzr2R4ssom8BFTOYE0NSBqOgTv\n\tx29SsGBlcVSGMk+lShUGND80hW5OrUUXcbxYOFbMDiEybtVCPna7JUsLB0+ADBg365qC\n\t+ldqzuiPhJfs/3F3voYH0Qar4WuxKIyYgDmgvfM4US70FBn2Nk/1Rk1HzR5jpv7aZRsN\n\t6FUjr4/fVjZDlKVACa6vZSNhTXRgOUW1nhaJkrzI3aWFezHtzqM5ttCTSaUxXYdn3aK9\n\tD/UI9XjvUdZ4sxQSxWIOQuhiFUuG/o1u87lTJgx8yk45cgjpJ3lApmKnqc+l30mQfzgV\n\t3s3A==", "X-Gm-Message-State": "AHPjjUhiVDPNatp3q7veSRMrh/85NGKcTFf0Mh1L9bA8l77dcu5yQryH\n\th64dsGjD8X5B6A==", "X-Google-Smtp-Source": "AOwi7QDmvYZXa7B7QE7zs8fEknow6ipwwAGQVFPjVhqs7j0UbZ964OGasGEg8XEO/Q6sydC1l8N5sg==", "X-Received": "by 10.55.191.129 with SMTP id p123mr10692191qkf.47.1505524892957;\n\tFri, 15 Sep 2017 18:21:32 -0700 (PDT)", "From": "Ram Pai <linuxram@us.ibm.com>", "To": "mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,\n\tlinux-mm@kvack.org, x86@kernel.org, linux-doc@vger.kernel.org", "Subject": "[PATCH 1/6] mm: introduce an additional vma bit for powerpc pkey", "Date": "Fri, 15 Sep 2017 18:21:05 -0700", "Message-Id": "<1505524870-4783-2-git-send-email-linuxram@us.ibm.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<1505524870-4783-1-git-send-email-linuxram@us.ibm.com>", "References": "<1505524870-4783-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\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, arnd@arndb.de, corbet@lwn.net, linuxram@us.ibm.com,\n\tmhocko@kernel.org, mingo@redhat.com, paulus@samba.org,\n\taneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com,\n\takpm@linux-foundation.org, 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": "Currently only 4bits are allocated in the vma flags to hold 16\nkeys. This is sufficient for x86. PowerPC supports 32 keys,\nwhich needs 5bits. This patch allocates an additional bit.\n\nSigned-off-by: Ram Pai <linuxram@us.ibm.com>\n---\n fs/proc/task_mmu.c | 6 ++++--\n include/linux/mm.h | 16 ++++++++++------\n 2 files changed, 14 insertions(+), 8 deletions(-)", "diff": "diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c\nindex b836fd6..cf25306 100644\n--- a/fs/proc/task_mmu.c\n+++ b/fs/proc/task_mmu.c\n@@ -661,13 +661,15 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)\n \t\t[ilog2(VM_MERGEABLE)]\t= \"mg\",\n \t\t[ilog2(VM_UFFD_MISSING)]= \"um\",\n \t\t[ilog2(VM_UFFD_WP)]\t= \"uw\",\n-#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS\n+#ifdef CONFIG_ARCH_HAS_PKEYS\n \t\t/* These come out via ProtectionKey: */\n \t\t[ilog2(VM_PKEY_BIT0)]\t= \"\",\n \t\t[ilog2(VM_PKEY_BIT1)]\t= \"\",\n \t\t[ilog2(VM_PKEY_BIT2)]\t= \"\",\n \t\t[ilog2(VM_PKEY_BIT3)]\t= \"\",\n-#endif\n+\t\t/* Additional bit used by ppc64 */\n+\t\t[ilog2(VM_PKEY_BIT4)]\t= \"\",\n+#endif /* CONFIG_ARCH_HAS_PKEYS */\n \t};\n \tsize_t i;\n \ndiff --git a/include/linux/mm.h b/include/linux/mm.h\nindex 46b9ac5..6d72ec0 100644\n--- a/include/linux/mm.h\n+++ b/include/linux/mm.h\n@@ -208,21 +208,25 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,\n #define VM_HIGH_ARCH_BIT_1\t33\t/* bit only usable on 64-bit architectures */\n #define VM_HIGH_ARCH_BIT_2\t34\t/* bit only usable on 64-bit architectures */\n #define VM_HIGH_ARCH_BIT_3\t35\t/* bit only usable on 64-bit architectures */\n+#define VM_HIGH_ARCH_BIT_4\t36\t/* bit only usable on 64-bit architectures */\n #define VM_HIGH_ARCH_0\tBIT(VM_HIGH_ARCH_BIT_0)\n #define VM_HIGH_ARCH_1\tBIT(VM_HIGH_ARCH_BIT_1)\n #define VM_HIGH_ARCH_2\tBIT(VM_HIGH_ARCH_BIT_2)\n #define VM_HIGH_ARCH_3\tBIT(VM_HIGH_ARCH_BIT_3)\n+#define VM_HIGH_ARCH_4\tBIT(VM_HIGH_ARCH_BIT_4)\n #endif /* CONFIG_ARCH_USES_HIGH_VMA_FLAGS */\n \n-#if defined(CONFIG_X86)\n-# define VM_PAT\t\tVM_ARCH_1\t/* PAT reserves whole VMA at once (x86) */\n-#if defined (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS)\n+#ifdef CONFIG_ARCH_HAS_PKEYS\n # define VM_PKEY_SHIFT\tVM_HIGH_ARCH_BIT_0\n-# define VM_PKEY_BIT0\tVM_HIGH_ARCH_0\t/* A protection key is a 4-bit value */\n-# define VM_PKEY_BIT1\tVM_HIGH_ARCH_1\n+# define VM_PKEY_BIT0\tVM_HIGH_ARCH_0 /* A protection key is a 4-bit value */\n+# define VM_PKEY_BIT1\tVM_HIGH_ARCH_1 /* on x86 and 5-bit value on ppc64 */\n # define VM_PKEY_BIT2\tVM_HIGH_ARCH_2\n # define VM_PKEY_BIT3\tVM_HIGH_ARCH_3\n-#endif\n+# define VM_PKEY_BIT4\tVM_HIGH_ARCH_4\n+#endif /* CONFIG_ARCH_HAS_PKEYS */\n+\n+#if defined(CONFIG_X86)\n+# define VM_PAT\t\tVM_ARCH_1\t/* PAT reserves whole VMA at once (x86) */\n #elif defined(CONFIG_PPC)\n # define VM_SAO\t\tVM_ARCH_1\t/* Strong Access Ordering (powerpc) */\n #elif defined(CONFIG_PARISC)\n", "prefixes": [ "1/6" ] }