From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id AB27C6B0003 for ; Mon, 21 May 2018 07:29:15 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id t24-v6so13996655qtn.7 for ; Mon, 21 May 2018 04:29:15 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id b131-v6si6389257qkg.106.2018.05.21.04.29.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 04:29:14 -0700 (PDT) Subject: Re: pkeys on POWER: Access rights not reset on execve References: <53828769-23c4-b2e3-cf59-239936819c3e@redhat.com> <20180519011947.GJ5479@ram.oc3035372033.ibm.com> <20180519202747.GK5479@ram.oc3035372033.ibm.com> <20180520060425.GL5479@ram.oc3035372033.ibm.com> <20180520191115.GM5479@ram.oc3035372033.ibm.com> From: Florian Weimer Message-ID: Date: Mon, 21 May 2018 13:29:11 +0200 MIME-Version: 1.0 In-Reply-To: <20180520191115.GM5479@ram.oc3035372033.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Ram Pai , Andy Lutomirski Cc: linuxppc-dev , Linux-MM , Dave Hansen On 05/20/2018 09:11 PM, Ram Pai wrote: > Florian, > > Does the following patch fix the problem for you? Just like x86 > I am enabling all keys in the UAMOR register during > initialization itself. Hence any key created by any thread at > any time, will get activated on all threads. So any thread > can change the permission on that key. Smoke tested it > with your test program. I think this goes in the right direction, but the AMR value after fork is still strange: AMR (PID 34912): 0x0000000000000000 AMR after fork (PID 34913): 0x0000000000000000 AMR (PID 34913): 0x0000000000000000 Allocated key in subprocess (PID 34913): 2 Allocated key (PID 34912): 2 Setting AMR: 0xffffffffffffffff New AMR value (PID 34912): 0x0fffffffffffffff About to call execl (PID 34912) ... AMR (PID 34912): 0x0fffffffffffffff AMR after fork (PID 34914): 0x0000000000000003 AMR (PID 34914): 0x0000000000000003 Allocated key in subprocess (PID 34914): 2 Allocated key (PID 34912): 2 Setting AMR: 0xffffffffffffffff New AMR value (PID 34912): 0x0fffffffffffffff I mean this line: AMR after fork (PID 34914): 0x0000000000000003 Shouldn't it be the same as in the parent process? Thanks, Florian