Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814448/?format=api
{ "id": 814448, "url": "http://patchwork.ozlabs.org/api/patches/814448/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1505524870-4783-4-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-4-git-send-email-linuxram@us.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1505524870-4783-4-git-send-email-linuxram@us.ibm.com/", "date": "2017-09-16T01:21:07", "name": "[3/6] mm: display pkey in smaps if arch_pkeys_enabled() is true", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "9c21d37e5da7075738c0bf4ca8e77607c2139d06", "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-4-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/814448/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814448/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 3xvF6N06Dhz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 11:29:00 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xvF6M5yLBzDrcl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 11:28:59 +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 3xvDxx0FwDzDrbw\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 16 Sep 2017 11:21:40 +1000 (AEST)", "by mail-qk0-x242.google.com with SMTP id o77so2436557qke.2\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 15 Sep 2017 18:21:40 -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.35\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 18:21:37 -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=\"o8DtqYLy\"; 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=\"o8DtqYLy\"; 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=\"o8DtqYLy\"; 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=OAiSEmvn0GP1+sSc+27UEPpLNHrQY1TXNfuMlFlyRZc=;\n\tb=o8DtqYLyYPQmsKvq0DczP0bg8JKXSyOnfEr+xPO6gV1TLzoepa6c1UzJ/fsd7XaHOs\n\t6ny+nxFrnJ7/F4b4z3dq4fuXcrRgO69qSWYLDdYgweJBf8Ph9PhRLpk5dUzMSKcbN/gR\n\tw5S65FxAD3bgzICQnTIFolhSa3WUwv5OdSykKG704S+O0fhUoFsytj3dnfgnuqUcxhIf\n\tSOmSCpRx4ptBvSkB3knKHbza9B72Qw4TbFhn9G8r06bq6tZDeX/S6Zb36gWV4gML1omy\n\t8akpg8ylturlcr09onRUkY/L4IPiE1/mXICJdmV1u+IDuabIBGC9gsBzad5sLS3NPTfX\n\tpYsA==", "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=OAiSEmvn0GP1+sSc+27UEPpLNHrQY1TXNfuMlFlyRZc=;\n\tb=YwZ5Ag3b/Vlmg0Y8jM/DUxswa9aS0Gf6tkVPJltqPrBcFgOyckWzYboz+ekV1Fq4Bd\n\tBOCLUhdgKpoJAE/1CxOKyYiE3YYhOMBaK4TKhwPTbeDPnrkJm9ykr9e4avLxOGNtobyJ\n\tknzsqQO1Fqbb690x/t6dkVZOOhYIrQ2WSwnXt4f1t8ubs7YNpumjN7Ew43liCeHgncnq\n\tFLq3HNecknvaI9g+JkoZ2fVwJcXOAR6Md6mDPLia+VZ18ZKLOX+CiF4cgSmnm5augsJ9\n\t4HAXMwl2M/4sv1fzNfkVecCZWypuGU92stCwWdyhgmbm7c1ZZPs4UcRFS+OSMA0thUHU\n\tT8Tg==", "X-Gm-Message-State": "AHPjjUgdZdCsg4r8ipn2KJo2P5lQ+Lzz4IFXpGZq+KHicJEiNhe1YbGL\n\tDXdVI2GuL+0E/t6cz/0=", "X-Google-Smtp-Source": "AOwi7QA6mdi6ljhoGKTQ/WCiZy72WZPKZ+DqX72M+hwU+mHG01gssiD8MvHLjDE7foMs7sv4I0zQzg==", "X-Received": "by 10.55.140.69 with SMTP id o66mr10481789qkd.312.1505524898234; \n\tFri, 15 Sep 2017 18:21:38 -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 3/6] mm: display pkey in smaps if arch_pkeys_enabled() is\n\ttrue", "Date": "Fri, 15 Sep 2017 18:21:07 -0700", "Message-Id": "<1505524870-4783-4-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 the architecture specific code is expected to\ndisplay the protection keys in smap for a given vma.\nThis can lead to redundant code and possibly to divergent\nformats in which the key gets displayed.\n\nThis patch changes the implementation. It displays the\npkey only if the architecture support pkeys.\n\nx86 arch_show_smap() function is not needed anymore.\nDelete it.\n\nSigned-off-by: Ram Pai <linuxram@us.ibm.com>\n---\n arch/x86/kernel/setup.c | 8 --------\n fs/proc/task_mmu.c | 11 ++++++-----\n 2 files changed, 6 insertions(+), 13 deletions(-)", "diff": "diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c\nindex 3486d04..1953bce 100644\n--- a/arch/x86/kernel/setup.c\n+++ b/arch/x86/kernel/setup.c\n@@ -1340,11 +1340,3 @@ static int __init register_kernel_offset_dumper(void)\n \treturn 0;\n }\n __initcall(register_kernel_offset_dumper);\n-\n-void arch_show_smap(struct seq_file *m, struct vm_area_struct *vma)\n-{\n-\tif (!boot_cpu_has(X86_FEATURE_OSPKE))\n-\t\treturn;\n-\n-\tseq_printf(m, \"ProtectionKey: %8u\\n\", vma_pkey(vma));\n-}\ndiff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c\nindex cf25306..667d44a 100644\n--- a/fs/proc/task_mmu.c\n+++ b/fs/proc/task_mmu.c\n@@ -16,6 +16,7 @@\n #include <linux/mmu_notifier.h>\n #include <linux/page_idle.h>\n #include <linux/shmem_fs.h>\n+#include <linux/pkeys.h>\n \n #include <asm/elf.h>\n #include <linux/uaccess.h>\n@@ -714,10 +715,6 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,\n }\n #endif /* HUGETLB_PAGE */\n \n-void __weak arch_show_smap(struct seq_file *m, struct vm_area_struct *vma)\n-{\n-}\n-\n static int show_smap(struct seq_file *m, void *v, int is_pid)\n {\n \tstruct vm_area_struct *vma = v;\n@@ -803,7 +800,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)\n \t\t (vma->vm_flags & VM_LOCKED) ?\n \t\t\t(unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);\n \n-\tarch_show_smap(m, vma);\n+#ifdef CONFIG_ARCH_HAS_PKEYS\n+\tif (arch_pkeys_enabled())\n+\t\tseq_printf(m, \"ProtectionKey: %8u\\n\", vma_pkey(vma));\n+#endif\n+\n \tshow_smap_vma_flags(m, vma);\n \tm_cache_vma(m, vma);\n \treturn 0;\n", "prefixes": [ "3/6" ] }