Received: by 10.223.164.202 with SMTP id h10csp2577081wrb; Sun, 12 Nov 2017 12:47:36 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ470BZ9mDKI2hpXfx66wRSKjNSfQ9RV95+5ZW7q3jmBHThBC9HsmJDY+AaEYDtTfrQsoWd X-Received: by 10.99.96.71 with SMTP id u68mr6467900pgb.389.1510519656198; Sun, 12 Nov 2017 12:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510519656; cv=none; d=google.com; s=arc-20160816; b=WYRDtW+V6ZMeozQ/K+biHjlAVNod9Bjv63DnLkqucjKPwtnnoh9c3n85pew1rTpOVZ AL/UMgBNH8OGAlLV4EIEhGriS5jJ7XmMGEoQDUyDvCt8XgGa74HccRFMJrIBTlZ0Px2J /X10XWKjG17VHEnCV8BEAqISFTKHmUv5KkRaiUdYQeA668KZs353d1zDZ5rquEOR//YO Y6UpTDBUQsdgR+bZcPM2Mj79ZL4DZEjtaHVERKKtJHS5rSKLH9kGlPwF0zlBmiE34SPP k1jHa6Ni85qbuCsCRxQFss2S9v6lHM1MYBwt86zF7/RZSaOW4ucgwG4gmV3e5zeCB8A3 ht5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:reply-to:subject:cc:to:from:date :arc-authentication-results; bh=YKs+AesQvfXVJrrn/hg8U1HohiAlFuhiKv4zjeFINyA=; b=Gy3IPXXOTWvPULVtRUhSqJYNuiiBynqzY2UqUxpY/qgM2hKbkm6gBv88KJw7mX6Z+e L5NMAU4GCxjt0hRDUKHVT3zKVqXWCndq6b0GXMxR+vdxvcU1zuiDPOcHBbThyjYFgC1I ck9XdqDSexwhh808nhttc8u3lcrqWeapu+MdRRmVwVeND7MB2GLt7mcgmZOaw7WopcWU Rj7dGEqibLrnTzY5wcNLDx2z1Qb6sJ+6JKnwe3vYaSIKQh7TWnrZ8o2gnpqDM3oj8o51 zx7ZfXOZsu+ODlcKW4c98D0fQOmYjdkxbjxZ0aszBMXeh/eG9muiQ7hQCUnvA5CDUbQm s/jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15si14114465pfj.97.2017.11.12.12.47.23; Sun, 12 Nov 2017 12:47:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbdKLUp1 (ORCPT + 87 others); Sun, 12 Nov 2017 15:45:27 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36918 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751231AbdKLUpY (ORCPT ); Sun, 12 Nov 2017 15:45:24 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vACKiQPo027864 for ; Sun, 12 Nov 2017 15:45:24 -0500 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e6f1bvur3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 12 Nov 2017 15:45:24 -0500 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 12 Nov 2017 13:45:23 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 12 Nov 2017 13:45:17 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vACKjFOI55574586; Sun, 12 Nov 2017 13:45:17 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D9006A041; Sun, 12 Nov 2017 13:45:17 -0700 (MST) Received: from ram.oc3035372033.ibm.com (unknown [9.85.193.131]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS id 999B16A03C; Sun, 12 Nov 2017 13:45:13 -0700 (MST) Date: Sun, 12 Nov 2017 12:45:10 -0800 From: Ram Pai To: Christophe LEROY Cc: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de, linux-arch@vger.kernel.org, ebiederm@xmission.com, linux-doc@vger.kernel.org, x86@kernel.org, dave.hansen@intel.com, linux-kernel@vger.kernel.org, mhocko@kernel.org, linux-mm@kvack.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org, bauerman@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, khandual@linux.vnet.ibm.com Subject: Re: [PATCH v9 00/51] powerpc, mm: Memory Protection Keys Reply-To: Ram Pai References: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> <45ca9196-1d7d-d530-45df-4ee41773cace@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45ca9196-1d7d-d530-45df-4ee41773cace@c-s.fr> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 17111220-0004-0000-0000-0000133370DA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008058; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00944932; UDB=6.00476843; IPR=6.00725229; BA=6.00005688; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017982; XFM=3.00000015; UTC=2017-11-12 20:45:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111220-0005-0000-0000-000084D74A95 Message-Id: <20171112204510.GE5546@ram.oc3035372033.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-12_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711120296 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 10, 2017 at 07:10:31PM +0100, Christophe LEROY wrote: > Hi > > Le 06/11/2017 � 09:56, Ram Pai a �crit�: > >Memory protection keys enable applications to protect its > >address space from inadvertent access from or corruption > >by itself. > > > >These patches along with the pte-bit freeing patch series > >enables the protection key feature on powerpc; 4k and 64k > >hashpage kernels. It also changes the generic and x86 > >code to expose memkey features through sysfs. Finally > >testcases and Documentation is updated. > > > >All patches can be found at -- > >https://github.com/rampai/memorykeys.git memkey.v9 > > As far as I can see you are focussing the implementation on 64 bits > powerpc. This could also be implemented on 32 bits powerpc, for > instance the 8xx has MMU Access Protection Registers which can be > used to define 16 domains and could I think be used for implementing > protection keys. I was assuming non-existence of any 32bit powerpc systems supporting memory keys. Sounds like it was a wrong assumption. However, I think, the framework as it stands today should work. All the functionality is captured in pkeys.c and pkeys.h which are generic ppc files. Its just a matter of providing the 32-bit implementation for whichever sub-arch that support it. Can you point me to problem areas? I will fix them. Thanks for you interest. Togather we should be able to make it happen. > Of course the challenge after that would be to find 4 spare PTE > bits, I'm sure we can find them on the 8xx, at least when using 16k > pages we have 2 bits already available, then by merging PAGE_SHARED > and PAGE_USER and by reducing PAGE_RO to only one bit we can get the > 4 spare bits. yes. This needs to happen parallely. RP > > Therefore I think it would be great if you could implement a > framework common to both PPC32 and PPC64. From 1583703680449924553@xxx Fri Nov 10 18:12:04 +0000 2017 X-GM-THRID: 1583309178351971083 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread