From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40gSv61SLGzDrDT for ; Wed, 9 May 2018 04:39:12 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w48IalQ0126353 for ; Tue, 8 May 2018 14:39:06 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hue9dt079-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 May 2018 14:39:06 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 May 2018 19:39:04 +0100 Date: Tue, 8 May 2018 11:38:53 -0700 From: Ram Pai To: Michal =?iso-8859-1?Q?Such=E1nek?= Cc: fweimer@redhat.com, Dave Hansen , Ingo Molnar , mhocko@kernel.org, Ulrich.Weigand@de.ibm.com, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com, Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Andrew Morton Subject: Re: [PATCH v3] powerpc, pkey: make protection key 0 less special Reply-To: Ram Pai References: <1525461778-26265-1-git-send-email-linuxram@us.ibm.com> <20180504232647.3412f563@naga.suse.cz> <20180504214507.GA5871@ram.oc3035372033.ibm.com> <20180505143956.139f4828@naga.suse.cz> <20180506201043.GE5617@ram.oc3035372033.ibm.com> <20180507132149.3fc1dcc5@kitsune.suse.cz> <20180508163801.GC5474@ram.oc3035372033.ibm.com> <20180508190336.361a508b@naga.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20180508190336.361a508b@naga.suse.cz> Message-Id: <20180508183853.GA5802@ram.oc3035372033.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, May 08, 2018 at 07:03:36PM +0200, Michal Suchánek wrote: > > How is the application denied setting the permissions on key 0 if it > can program the register directly? There is a UAMOR register. The userspace can change the permissions of a given key; by modifying the bits in AMOR register, only if the kernel has set the corresponding bit in the UAMOR register. For key-0 the kernel does not set the corresponding UAMOR bit. RP