[{"id":1789121,"web_url":"http://patchwork.ozlabs.org/comment/1789121/","msgid":"<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>","date":"2017-10-18T04:36:35","subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","submitter":{"id":9347,"url":"http://patchwork.ozlabs.org/api/people/9347/","name":"Balbir Singh","email":"bsingharora@gmail.com"},"content":"On Fri,  8 Sep 2017 15:45:01 -0700\nRam Pai <linuxram@us.ibm.com> wrote:\n\n> arch independent code calls arch_override_mprotect_pkey()\n> to return a pkey that best matches the requested protection.\n> \n> This patch provides the implementation.\n> \n> Signed-off-by: Ram Pai <linuxram@us.ibm.com>\n> ---\n>  arch/powerpc/include/asm/mmu_context.h |    5 +++\n>  arch/powerpc/include/asm/pkeys.h       |   17 ++++++++++-\n>  arch/powerpc/mm/pkeys.c                |   47 ++++++++++++++++++++++++++++++++\n>  3 files changed, 67 insertions(+), 2 deletions(-)\n> \n> diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h\n> index c705a5d..8e5a87e 100644\n> --- a/arch/powerpc/include/asm/mmu_context.h\n> +++ b/arch/powerpc/include/asm/mmu_context.h\n> @@ -145,6 +145,11 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,\n>  #ifndef CONFIG_PPC64_MEMORY_PROTECTION_KEYS\n>  #define pkey_initialize()\n>  #define pkey_mm_init(mm)\n> +\n> +static inline int vma_pkey(struct vm_area_struct *vma)\n> +{\n> +\treturn 0;\n> +}\n>  #endif /* CONFIG_PPC64_MEMORY_PROTECTION_KEYS */\n>  \n>  #endif /* __KERNEL__ */\n> diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h\n> index f13e913..d2fffef 100644\n> --- a/arch/powerpc/include/asm/pkeys.h\n> +++ b/arch/powerpc/include/asm/pkeys.h\n> @@ -41,6 +41,16 @@ static inline u64 pkey_to_vmflag_bits(u16 pkey)\n>  \t\t((pkey & 0x10UL) ? VM_PKEY_BIT4 : 0x0UL));\n>  }\n>  \n> +#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \\\n> +\t\t\t\tVM_PKEY_BIT3 | VM_PKEY_BIT4)\n> +\n> +static inline int vma_pkey(struct vm_area_struct *vma)\n> +{\n> +\tif (!pkey_inited)\n> +\t\treturn 0;\n\nWe don't want pkey_inited to be present in all functions, why do we need\na conditional branch for all functions. Even if we do, it should be a jump\nlabel. I would rather we just removed !pkey_inited unless really really\nrequired.\n\n> +\treturn (vma->vm_flags & ARCH_VM_PKEY_FLAGS) >> VM_PKEY_SHIFT;\n> +}\n> +\n>  #define arch_max_pkey()  pkeys_total\n>  #define AMR_RD_BIT 0x1UL\n>  #define AMR_WR_BIT 0x2UL\n> @@ -142,11 +152,14 @@ static inline int execute_only_pkey(struct mm_struct *mm)\n>  \treturn __execute_only_pkey(mm);\n>  }\n>  \n> -\n> +extern int __arch_override_mprotect_pkey(struct vm_area_struct *vma,\n> +\t\tint prot, int pkey);\n>  static inline int arch_override_mprotect_pkey(struct vm_area_struct *vma,\n>  \t\tint prot, int pkey)\n>  {\n> -\treturn 0;\n> +\tif (!pkey_inited)\n> +\t\treturn 0;\n> +\treturn __arch_override_mprotect_pkey(vma, prot, pkey);\n>  }\n>  \n>  extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,\n> diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c\n> index 8a24983..fb1a76a 100644\n> --- a/arch/powerpc/mm/pkeys.c\n> +++ b/arch/powerpc/mm/pkeys.c\n> @@ -245,3 +245,50 @@ int __execute_only_pkey(struct mm_struct *mm)\n>  \t\tmm->context.execute_only_pkey = execute_only_pkey;\n>  \treturn execute_only_pkey;\n>  }\n> +\n> +static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)\n> +{\n> +\t/* Do this check first since the vm_flags should be hot */\n> +\tif ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)\n> +\t\treturn false;\n> +\n> +\treturn (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);\n> +}\n> +\n> +/*\n> + * This should only be called for *plain* mprotect calls.\n\nWhat's a plain mprotect call?\n\n> + */\n> +int __arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot,\n> +\t\tint pkey)\n> +{\n> +\t/*\n> +\t * Is this an mprotect_pkey() call?  If so, never\n> +\t * override the value that came from the user.\n> +\t */\n> +\tif (pkey != -1)\n> +\t\treturn pkey;\n\nIf the user specified a key, we always use it? Presumably the user\ngot it from pkey_alloc(), in other cases, the user was lazy and used\n-1 in the mprotect call?\n\n> +\n> +\t/*\n> +\t * If the currently associated pkey is execute-only,\n> +\t * but the requested protection requires read or write,\n> +\t * move it back to the default pkey.\n> +\t */\n> +\tif (vma_is_pkey_exec_only(vma) &&\n> +\t    (prot & (PROT_READ|PROT_WRITE)))\n> +\t\treturn 0;\n> +\n> +\t/*\n> +\t * the requested protection is execute-only. Hence\n> +\t * lets use a execute-only pkey.\n> +\t */\n> +\tif (prot == PROT_EXEC) {\n> +\t\tpkey = execute_only_pkey(vma->vm_mm);\n> +\t\tif (pkey > 0)\n> +\t\t\treturn pkey;\n> +\t}\n> +\n> +\t/*\n> +\t * nothing to override.\n> +\t */\n> +\treturn vma_pkey(vma);\n> +}\n\nBalbir Singh.","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 3yGznv0j8Tz9s7F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 18 Oct 2017 15:38:11 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yGznt6bhMzDrJj\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 18 Oct 2017 15:38:10 +1100 (AEDT)","from mail-pg0-x244.google.com (mail-pg0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c05::244])\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 3yGzmH3jYzzDrD6\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 18 Oct 2017 15:36:47 +1100 (AEDT)","by mail-pg0-x244.google.com with SMTP id j3so3250180pga.1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 17 Oct 2017 21:36:47 -0700 (PDT)","from firefly.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tl189sm21088148pga.24.2017.10.17.21.36.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 17 Oct 2017 21:36:44 -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=\"l0mNzGND\"; 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=\"l0mNzGND\"; dkim-atps=neutral","ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c05::244; helo=mail-pg0-x244.google.com;\n\tenvelope-from=bsingharora@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=\"l0mNzGND\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=CmshN1ICj1w0qswyobqww7j6tDasbP+g5Fres+XtKE8=;\n\tb=l0mNzGNDFJiEpNVZprOif6JjAeZzFaGfa64ZgGVauhOLFAAZhu/CqEcA3NrGe6FGeD\n\t8eD76wFVhsBvuFJ+tsr/n9toAiV5H1uCiqqwCLRc7PpGtcnt/Hs7MloPej7Uph87yk95\n\tF7ssLC7fZwEdxuk+q+WU77H5EDUDsjmqblzVpGJkrEiqzq6xMh/EGixSqt5DxeVWT+xG\n\tKvC1eCGZ8j9P/CA0FlUTbVanLHfL1XH69ikZD3vGI54ri9vr8wcAXtr/WlNNXxYMKvEi\n\tJrdspWlu7OigxtVntdF+AVfQ4xBus7g5SQX14zWdh1h5Xua0ETFjWYJ8WkoLCj5XSAJP\n\tjj2A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=CmshN1ICj1w0qswyobqww7j6tDasbP+g5Fres+XtKE8=;\n\tb=fvWEYaPSWO+TwQVAjIVuVqPSFyGzrajzE5labThfMAuYjA6aoUh1I7VIHSJOIBM8gn\n\tEA/x4Vc8CYJRhJwBPpSDAEY7gmsk6kVITmxAdGfXa6yjN/2OJ1mE+F0omfiJagU1ycir\n\tEzW8+z5AB9qjMgbULCJE/hzzdnGOp7UGQQnWL69t5dXwSEtjLCOxASrOebDA6aLep8MD\n\thgzX6Yihsndo2lmz5MI+WsWq+SVpzw1xQLxy14J2wulspIQqah6AthwjFBFOn3m6mFcf\n\tqO799CuJLVitmjDcMsvJ3qHc8Tsn3w4OZ1qV0bmFCOXYj/q64Fg2AkEcmqJCApeGPUf4\n\tYMxA==","X-Gm-Message-State":"AMCzsaU8VW/q82z8aI1swY6CD/d3IFfAOG+o7JGjxYU7T3B1HQyAEV23\n\thcbx3wWSrHwSUXdEIq/Ta0g=","X-Google-Smtp-Source":"AOwi7QDHhMkR/PDjvt4jUscNf0RsA1TL6/hJilC4SxaN+Nbvjvl7O8iT9TmGls/N5StxJ9DaPILQsw==","X-Received":"by 10.84.228.193 with SMTP id y1mr13520942pli.301.1508301405128; \n\tTue, 17 Oct 2017 21:36:45 -0700 (PDT)","Date":"Wed, 18 Oct 2017 15:36:35 +1100","From":"Balbir Singh <bsingharora@gmail.com>","To":"Ram Pai <linuxram@us.ibm.com>","Subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","Message-ID":"<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>","In-Reply-To":"<1504910713-7094-22-git-send-email-linuxram@us.ibm.com>","References":"<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>\n\t<1504910713-7094-22-git-send-email-linuxram@us.ibm.com>","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","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, mhocko@kernel.org, paulus@samba.org,\n\taneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com,\n\tlinuxppc-dev@lists.ozlabs.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>"}},{"id":1789971,"web_url":"http://patchwork.ozlabs.org/comment/1789971/","msgid":"<20171018211041.GI5617@ram.oc3035372033.ibm.com>","date":"2017-10-18T21:10:41","subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","submitter":{"id":2667,"url":"http://patchwork.ozlabs.org/api/people/2667/","name":"Ram Pai","email":"linuxram@us.ibm.com"},"content":"On Wed, Oct 18, 2017 at 03:36:35PM +1100, Balbir Singh wrote:\n> On Fri,  8 Sep 2017 15:45:01 -0700\n> Ram Pai <linuxram@us.ibm.com> wrote:\n> \n> > arch independent code calls arch_override_mprotect_pkey()\n> > to return a pkey that best matches the requested protection.\n> > \n> > This patch provides the implementation.\n> > \n> > Signed-off-by: Ram Pai <linuxram@us.ibm.com>\n> > ---\n> >  arch/powerpc/include/asm/mmu_context.h |    5 +++\n> >  arch/powerpc/include/asm/pkeys.h       |   17 ++++++++++-\n> >  arch/powerpc/mm/pkeys.c                |   47 ++++++++++++++++++++++++++++++++\n> >  3 files changed, 67 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h\n> > index c705a5d..8e5a87e 100644\n> > --- a/arch/powerpc/include/asm/mmu_context.h\n> > +++ b/arch/powerpc/include/asm/mmu_context.h\n> > @@ -145,6 +145,11 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,\n> >  #ifndef CONFIG_PPC64_MEMORY_PROTECTION_KEYS\n> >  #define pkey_initialize()\n> >  #define pkey_mm_init(mm)\n> > +\n> > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > +{\n> > +\treturn 0;\n> > +}\n> >  #endif /* CONFIG_PPC64_MEMORY_PROTECTION_KEYS */\n> >  \n> >  #endif /* __KERNEL__ */\n> > diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h\n> > index f13e913..d2fffef 100644\n> > --- a/arch/powerpc/include/asm/pkeys.h\n> > +++ b/arch/powerpc/include/asm/pkeys.h\n> > @@ -41,6 +41,16 @@ static inline u64 pkey_to_vmflag_bits(u16 pkey)\n> >  \t\t((pkey & 0x10UL) ? VM_PKEY_BIT4 : 0x0UL));\n> >  }\n> >  \n> > +#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \\\n> > +\t\t\t\tVM_PKEY_BIT3 | VM_PKEY_BIT4)\n> > +\n> > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > +{\n> > +\tif (!pkey_inited)\n> > +\t\treturn 0;\n> \n> We don't want pkey_inited to be present in all functions, why do we need\n> a conditional branch for all functions. Even if we do, it should be a jump\n> label. I would rather we just removed !pkey_inited unless really really\n> required.\n\nNo. we really really need it.  For example when we build a kernel with\nPROTECTION_KEYS config enabled and run that kernel on a older processor\nor on a system where the key feature is not enabled in the device tree,\nwe have fail all the calls that get called-in by the arch-neutral code.\n\nHence we need this check.\n\nBTW: jump labels are awkward IMHO, unless absolutely needed.\n\n> \n> > +\treturn (vma->vm_flags & ARCH_VM_PKEY_FLAGS) >> VM_PKEY_SHIFT;\n> > +}\n> > +\n> >  #define arch_max_pkey()  pkeys_total\n> >  #define AMR_RD_BIT 0x1UL\n> >  #define AMR_WR_BIT 0x2UL\n> > @@ -142,11 +152,14 @@ static inline int execute_only_pkey(struct mm_struct *mm)\n> >  \treturn __execute_only_pkey(mm);\n> >  }\n> >  \n> > -\n> > +extern int __arch_override_mprotect_pkey(struct vm_area_struct *vma,\n> > +\t\tint prot, int pkey);\n> >  static inline int arch_override_mprotect_pkey(struct vm_area_struct *vma,\n> >  \t\tint prot, int pkey)\n> >  {\n> > -\treturn 0;\n> > +\tif (!pkey_inited)\n> > +\t\treturn 0;\n> > +\treturn __arch_override_mprotect_pkey(vma, prot, pkey);\n> >  }\n> >  \n> >  extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,\n> > diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c\n> > index 8a24983..fb1a76a 100644\n> > --- a/arch/powerpc/mm/pkeys.c\n> > +++ b/arch/powerpc/mm/pkeys.c\n> > @@ -245,3 +245,50 @@ int __execute_only_pkey(struct mm_struct *mm)\n> >  \t\tmm->context.execute_only_pkey = execute_only_pkey;\n> >  \treturn execute_only_pkey;\n> >  }\n> > +\n> > +static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)\n> > +{\n> > +\t/* Do this check first since the vm_flags should be hot */\n> > +\tif ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)\n> > +\t\treturn false;\n> > +\n> > +\treturn (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);\n> > +}\n> > +\n> > +/*\n> > + * This should only be called for *plain* mprotect calls.\n> \n> What's a plain mprotect call?\n\nthere is sys_mprotect() and now there is a sys_pkey_mprotect() call.\nThe 'plain' one is the former.\n\n> \n> > + */\n> > +int __arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot,\n> > +\t\tint pkey)\n> > +{\n> > +\t/*\n> > +\t * Is this an mprotect_pkey() call?  If so, never\n> > +\t * override the value that came from the user.\n> > +\t */\n> > +\tif (pkey != -1)\n> > +\t\treturn pkey;\n> \n> If the user specified a key, we always use it? Presumably the user\n> got it from pkey_alloc(), in other cases, the user was lazy and used\n> -1 in the mprotect call?\n\nin the plain sys_mprotect() key is not specified. In that case this\nfunction gets called with a -1.\n\n> \n> > +\n> > +\t/*\n> > +\t * If the currently associated pkey is execute-only,\n> > +\t * but the requested protection requires read or write,\n> > +\t * move it back to the default pkey.\n> > +\t */\n> > +\tif (vma_is_pkey_exec_only(vma) &&\n> > +\t    (prot & (PROT_READ|PROT_WRITE)))\n> > +\t\treturn 0;\n> > +\n> > +\t/*\n> > +\t * the requested protection is execute-only. Hence\n> > +\t * lets use a execute-only pkey.\n> > +\t */\n> > +\tif (prot == PROT_EXEC) {\n> > +\t\tpkey = execute_only_pkey(vma->vm_mm);\n> > +\t\tif (pkey > 0)\n> > +\t\t\treturn pkey;\n> > +\t}\n> > +\n> > +\t/*\n> > +\t * nothing to override.\n> > +\t */\n> > +\treturn vma_pkey(vma);\n> > +}\n> \n> Balbir Singh.","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 3yHPrl0lzXz9sBd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 19 Oct 2017 08:12:07 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yHPrk697WzDqfh\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 19 Oct 2017 08:12:06 +1100 (AEDT)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3yHPqK5YP2zDqJh\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 19 Oct 2017 08:10:52 +1100 (AEDT)","from pps.filterd (m0098393.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv9ILAl13116444\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 18 Oct 2017 17:10:51 -0400","from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2dpcwd5hbj-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 18 Oct 2017 17:10:50 -0400","from localhost\n\tby e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <linuxram@us.ibm.com>;\n\tWed, 18 Oct 2017 15:10:50 -0600","from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16)\n\tby e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 18 Oct 2017 15:10:47 -0600","from b03ledav006.gho.boulder.ibm.com\n\t(b03ledav006.gho.boulder.ibm.com [9.17.130.237])\n\tby b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v9ILAi0410027300; Wed, 18 Oct 2017 14:10:47 -0700","from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id EBEEAC6043;\n\tWed, 18 Oct 2017 15:10:46 -0600 (MDT)","from ram.oc3035372033.ibm.com (unknown [9.85.176.245])\n\tby b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTPS id\n\t1C7E3C603E; Wed, 18 Oct 2017 15:10:44 -0600 (MDT)"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=us.ibm.com\n\t(client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=linuxram@us.ibm.com; receiver=<UNKNOWN>)","Date":"Wed, 18 Oct 2017 14:10:41 -0700","From":"Ram Pai <linuxram@us.ibm.com>","To":"Balbir Singh <bsingharora@gmail.com>","Subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","References":"<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>\n\t<1504910713-7094-22-git-send-email-linuxram@us.ibm.com>\n\t<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>","User-Agent":"Mutt/1.5.20 (2009-12-10)","X-TM-AS-GCONF":"00","x-cbid":"17101821-0020-0000-0000-00000CDE5070","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007916; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000237; SDB=6.00933066; UDB=6.00469935;\n\tIPR=6.00713356; \n\tBA=6.00005648; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017596;\n\tXFM=3.00000015; UTC=2017-10-18 21:10:49","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17101821-0021-0000-0000-00005E9161AD","Message-Id":"<20171018211041.GI5617@ram.oc3035372033.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-10-18_08:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1710180293","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>","Reply-To":"Ram Pai <linuxram@us.ibm.com>","Cc":"ebiederm@xmission.com, mhocko@kernel.org, paulus@samba.org,\n\taneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com,\n\tlinuxppc-dev@lists.ozlabs.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>"}},{"id":1790032,"web_url":"http://patchwork.ozlabs.org/comment/1790032/","msgid":"<20171019100440.7fca1bd4@MiWiFi-R3-srv>","date":"2017-10-18T23:04:40","subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","submitter":{"id":9347,"url":"http://patchwork.ozlabs.org/api/people/9347/","name":"Balbir Singh","email":"bsingharora@gmail.com"},"content":"On Wed, 18 Oct 2017 14:10:41 -0700\nRam Pai <linuxram@us.ibm.com> wrote:\n\n> On Wed, Oct 18, 2017 at 03:36:35PM +1100, Balbir Singh wrote:\n> > On Fri,  8 Sep 2017 15:45:01 -0700\n> > Ram Pai <linuxram@us.ibm.com> wrote:\n> >   \n> > > arch independent code calls arch_override_mprotect_pkey()\n> > > to return a pkey that best matches the requested protection.\n> > > \n> > > This patch provides the implementation.\n> > > \n> > > Signed-off-by: Ram Pai <linuxram@us.ibm.com>\n> > > ---\n> > >  arch/powerpc/include/asm/mmu_context.h |    5 +++\n> > >  arch/powerpc/include/asm/pkeys.h       |   17 ++++++++++-\n> > >  arch/powerpc/mm/pkeys.c                |   47 ++++++++++++++++++++++++++++++++\n> > >  3 files changed, 67 insertions(+), 2 deletions(-)\n> > > \n> > > diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h\n> > > index c705a5d..8e5a87e 100644\n> > > --- a/arch/powerpc/include/asm/mmu_context.h\n> > > +++ b/arch/powerpc/include/asm/mmu_context.h\n> > > @@ -145,6 +145,11 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,\n> > >  #ifndef CONFIG_PPC64_MEMORY_PROTECTION_KEYS\n> > >  #define pkey_initialize()\n> > >  #define pkey_mm_init(mm)\n> > > +\n> > > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > > +{\n> > > +\treturn 0;\n> > > +}\n> > >  #endif /* CONFIG_PPC64_MEMORY_PROTECTION_KEYS */\n> > >  \n> > >  #endif /* __KERNEL__ */\n> > > diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h\n> > > index f13e913..d2fffef 100644\n> > > --- a/arch/powerpc/include/asm/pkeys.h\n> > > +++ b/arch/powerpc/include/asm/pkeys.h\n> > > @@ -41,6 +41,16 @@ static inline u64 pkey_to_vmflag_bits(u16 pkey)\n> > >  \t\t((pkey & 0x10UL) ? VM_PKEY_BIT4 : 0x0UL));\n> > >  }\n> > >  \n> > > +#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \\\n> > > +\t\t\t\tVM_PKEY_BIT3 | VM_PKEY_BIT4)\n> > > +\n> > > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > > +{\n> > > +\tif (!pkey_inited)\n> > > +\t\treturn 0;  \n> > \n> > We don't want pkey_inited to be present in all functions, why do we need\n> > a conditional branch for all functions. Even if we do, it should be a jump\n> > label. I would rather we just removed !pkey_inited unless really really\n> > required.  \n> \n> No. we really really need it.  For example when we build a kernel with\n> PROTECTION_KEYS config enabled and run that kernel on a older processor\n> or on a system where the key feature is not enabled in the device tree,\n> we have fail all the calls that get called-in by the arch-neutral code.\n> \n> Hence we need this check.\n> \n\nUse a mmu_feature then, it's already designed and optimized for that\npurpose\n\n> BTW: jump labels are awkward IMHO, unless absolutely needed.\n>\n\nThe if checks across the place will hurt performance and we want to have\nthis enabled by default, we may need a mmu feature or jump labels\n\nBalbir Singh.","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 3yHSPS33twz9t4P\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 19 Oct 2017 10:07:08 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yHSPS1wl7zDqBr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 19 Oct 2017 10:07:08 +1100 (AEDT)","from mail-pf0-x242.google.com (mail-pf0-x242.google.com\n\t[IPv6:2607:f8b0:400e:c00::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 3yHSLq3nvwzDqR8\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 19 Oct 2017 10:04:51 +1100 (AEDT)","by mail-pf0-x242.google.com with SMTP id t188so5056179pfd.10\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 18 Oct 2017 16:04:51 -0700 (PDT)","from MiWiFi-R3-srv ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tb28sm26928954pfl.86.2017.10.18.16.04.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 18 Oct 2017 16:04:49 -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=\"GMwVJHkl\"; 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=\"GMwVJHkl\"; dkim-atps=neutral","ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c00::242; helo=mail-pf0-x242.google.com;\n\tenvelope-from=bsingharora@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=\"GMwVJHkl\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=IWNKmaqfTeJQPUHTbnGM8VbEl15Jn3QZMONRBmsLDV4=;\n\tb=GMwVJHkl9R4d1Cqa831pCKMjaIen8jo2bnBYxgoNTvoA4jcm8KaRez/BPaQPW3mQ62\n\txUQQMyWGjrYlX6XNd3HzlLRyFA0T44uVN99je01yDmfJgheWljUdHqBFVMf/55SIZycd\n\tDgbyYZDfwPpZYd6Zb+JerraNz5vHDs2i2erW0jvAHnAHwwkJYwRDU+B/b5BTkFjIwKZ+\n\t+5CVuN4oMVHgRi5TlNb740lI1yaDb+PQIJTjmyrYujV/xNY+8MV3oYVHaUM86Ag8z2we\n\tbxajB0pinJnLwGelAQyVylipkV2+GJD5+gAPNKvmNMpKtX1H39bJnoQRSGO/+kJQcgOl\n\trkTg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=IWNKmaqfTeJQPUHTbnGM8VbEl15Jn3QZMONRBmsLDV4=;\n\tb=R4llnZRiedKVhdzdJVCcfwiceJ08SuWuNbJlYpJ83tv0NkiIw6RiHf5x/AP7d/UGJd\n\taN5QHaGsWSTCYJYu/9mEGu/2gbcKtxL1fhEqJ5t+8y+oR75MURcKulksc3zXHjfS2p9o\n\t26u6AmsmZGtkTr+uej4zkeZZJ7Q+8meacnSRaVaMSTJms0Z2ls9CebGCfFbc0IYPEZJ8\n\tUR8DwMB9/aYBKqXsUOzfa9V0/OHKuL38x/AQE64kND7bwKoMN8SsmzYutLKBr/hgW4x0\n\t0njDR/mZiRRgcpKiXTeV9DvcjZvVGajzJtWCfYCjHnaH4iQjLUvuXU2rNshJzhWvQ6PC\n\tYHwg==","X-Gm-Message-State":"AMCzsaVgF9ldvuIv2PnKos+rCWbNb3RkOxmIPKyRF8p/KLRzwMdF1gVX\n\t5AyV5OrPN4EvQVGog4NbZZE=","X-Google-Smtp-Source":"ABhQp+RxwIINiziMcCLur/k3FLWq7zGzvWdVYHVMJLvCM1WlD0CwzV4rf5dMv3xWrCAwuOURHI/aUw==","X-Received":"by 10.98.33.15 with SMTP id h15mr9138518pfh.319.1508367889560;\n\tWed, 18 Oct 2017 16:04:49 -0700 (PDT)","Date":"Thu, 19 Oct 2017 10:04:40 +1100","From":"Balbir Singh <bsingharora@gmail.com>","To":"Ram Pai <linuxram@us.ibm.com>","Subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","Message-ID":"<20171019100440.7fca1bd4@MiWiFi-R3-srv>","In-Reply-To":"<20171018211041.GI5617@ram.oc3035372033.ibm.com>","References":"<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>\n\t<1504910713-7094-22-git-send-email-linuxram@us.ibm.com>\n\t<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>\n\t<20171018211041.GI5617@ram.oc3035372033.ibm.com>","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","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, mhocko@kernel.org, paulus@samba.org,\n\taneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com,\n\tlinuxppc-dev@lists.ozlabs.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>"}},{"id":1790756,"web_url":"http://patchwork.ozlabs.org/comment/1790756/","msgid":"<20171019163934.GS5617@ram.oc3035372033.ibm.com>","date":"2017-10-19T16:39:34","subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","submitter":{"id":2667,"url":"http://patchwork.ozlabs.org/api/people/2667/","name":"Ram Pai","email":"linuxram@us.ibm.com"},"content":"On Thu, Oct 19, 2017 at 10:04:40AM +1100, Balbir Singh wrote:\n> On Wed, 18 Oct 2017 14:10:41 -0700\n> Ram Pai <linuxram@us.ibm.com> wrote:\n> \n> > On Wed, Oct 18, 2017 at 03:36:35PM +1100, Balbir Singh wrote:\n> > > On Fri,  8 Sep 2017 15:45:01 -0700\n> > > Ram Pai <linuxram@us.ibm.com> wrote:\n> > >   \n> > > > arch independent code calls arch_override_mprotect_pkey()\n> > > > to return a pkey that best matches the requested protection.\n> > > > \n> > > > This patch provides the implementation.\n> > > > \n> > > > Signed-off-by: Ram Pai <linuxram@us.ibm.com>\n> > > > ---\n> > > >  arch/powerpc/include/asm/mmu_context.h |    5 +++\n> > > >  arch/powerpc/include/asm/pkeys.h       |   17 ++++++++++-\n> > > >  arch/powerpc/mm/pkeys.c                |   47 ++++++++++++++++++++++++++++++++\n> > > >  3 files changed, 67 insertions(+), 2 deletions(-)\n> > > > \n> > > > diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h\n> > > > index c705a5d..8e5a87e 100644\n> > > > --- a/arch/powerpc/include/asm/mmu_context.h\n> > > > +++ b/arch/powerpc/include/asm/mmu_context.h\n> > > > @@ -145,6 +145,11 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,\n> > > >  #ifndef CONFIG_PPC64_MEMORY_PROTECTION_KEYS\n> > > >  #define pkey_initialize()\n> > > >  #define pkey_mm_init(mm)\n> > > > +\n> > > > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > > > +{\n> > > > +\treturn 0;\n> > > > +}\n> > > >  #endif /* CONFIG_PPC64_MEMORY_PROTECTION_KEYS */\n> > > >  \n> > > >  #endif /* __KERNEL__ */\n> > > > diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h\n> > > > index f13e913..d2fffef 100644\n> > > > --- a/arch/powerpc/include/asm/pkeys.h\n> > > > +++ b/arch/powerpc/include/asm/pkeys.h\n> > > > @@ -41,6 +41,16 @@ static inline u64 pkey_to_vmflag_bits(u16 pkey)\n> > > >  \t\t((pkey & 0x10UL) ? VM_PKEY_BIT4 : 0x0UL));\n> > > >  }\n> > > >  \n> > > > +#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \\\n> > > > +\t\t\t\tVM_PKEY_BIT3 | VM_PKEY_BIT4)\n> > > > +\n> > > > +static inline int vma_pkey(struct vm_area_struct *vma)\n> > > > +{\n> > > > +\tif (!pkey_inited)\n> > > > +\t\treturn 0;  \n> > > \n> > > We don't want pkey_inited to be present in all functions, why do we need\n> > > a conditional branch for all functions. Even if we do, it should be a jump\n> > > label. I would rather we just removed !pkey_inited unless really really\n> > > required.  \n> > \n> > No. we really really need it.  For example when we build a kernel with\n> > PROTECTION_KEYS config enabled and run that kernel on a older processor\n> > or on a system where the key feature is not enabled in the device tree,\n> > we have fail all the calls that get called-in by the arch-neutral code.\n> > \n> > Hence we need this check.\n> > \n> \n> Use a mmu_feature then, it's already designed and optimized for that\n> purpose\n\nWe rely on a combination of cpu_feature and firmware_feature. But that\nis still not sufficient. It is also gated on !radix_enabled().\n\nIn other words,  the pkey system is enabled if\na) if we are in a lpar and device tree has the feature enabled, and\n\tthere are more than zero keys enabled and radix is not enabled.\n\n\tOR\n\nb) if we in baremetal, and the CPU is power5 or later and radix is not\n\tenabled.\n\nAll these criteria determine the value of 'pkey_inited'.\n\n> \n> > BTW: jump labels are awkward IMHO, unless absolutely needed.\n> >\n> \n> The if checks across the place will hurt performance and we want to have\n> this enabled by default, we may need a mmu feature or jump labels\n\nI like the idea of jump_label now that I googled for it.\n\nThanks,\nRP\n\n> \n> Balbir Singh.","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 3yHvp90zyfz9t6m\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 20 Oct 2017 03:41:37 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yHvp86P5DzDqRQ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 20 Oct 2017 03:41:36 +1100 (AEDT)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3yHvm21662zDqBd\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 20 Oct 2017 03:39:45 +1100 (AEDT)","from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv9JGXm7o024839\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 19 Oct 2017 12:39:43 -0400","from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2dpws20udj-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 19 Oct 2017 12:39:43 -0400","from localhost\n\tby e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <linuxram@us.ibm.com>;\n\tThu, 19 Oct 2017 10:39:42 -0600","from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17)\n\tby e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 19 Oct 2017 10:39:39 -0600","from b03ledav005.gho.boulder.ibm.com\n\t(b03ledav005.gho.boulder.ibm.com [9.17.130.236])\n\tby b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v9JGddaH64028906; Thu, 19 Oct 2017 09:39:39 -0700","from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id E4C1FBE040;\n\tThu, 19 Oct 2017 10:39:38 -0600 (MDT)","from ram.oc3035372033.ibm.com (unknown [9.85.176.245])\n\tby b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS id\n\t0FFF3BE03B; Thu, 19 Oct 2017 10:39:36 -0600 (MDT)"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=us.ibm.com\n\t(client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=linuxram@us.ibm.com; receiver=<UNKNOWN>)","Date":"Thu, 19 Oct 2017 09:39:34 -0700","From":"Ram Pai <linuxram@us.ibm.com>","To":"Balbir Singh <bsingharora@gmail.com>","Subject":"Re: [PATCH 13/25] powerpc: implementation for\n\tarch_override_mprotect_pkey()","References":"<1504910713-7094-1-git-send-email-linuxram@us.ibm.com>\n\t<1504910713-7094-22-git-send-email-linuxram@us.ibm.com>\n\t<20171018153635.1ab9765d@firefly.ozlabs.ibm.com>\n\t<20171018211041.GI5617@ram.oc3035372033.ibm.com>\n\t<20171019100440.7fca1bd4@MiWiFi-R3-srv>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20171019100440.7fca1bd4@MiWiFi-R3-srv>","User-Agent":"Mutt/1.5.20 (2009-12-10)","X-TM-AS-GCONF":"00","x-cbid":"17101916-0008-0000-0000-000008BC6801","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007919; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000238; SDB=6.00933453; UDB=6.00470167;\n\tIPR=6.00713741; \n\tBA=6.00005651; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017609;\n\tXFM=3.00000015; UTC=2017-10-19 16:39:41","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17101916-0009-0000-0000-0000446D9B25","Message-Id":"<20171019163934.GS5617@ram.oc3035372033.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-10-19_08:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1710190229","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>","Reply-To":"Ram Pai <linuxram@us.ibm.com>","Cc":"ebiederm@xmission.com, mhocko@kernel.org, paulus@samba.org,\n\taneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com,\n\tlinuxppc-dev@lists.ozlabs.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>"}}]