From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH] pkeys: Introduce PKEY_ALLOC_SIGNALINHERIT and change signal semantics Date: Mon, 14 May 2018 08:32:54 -0700 Message-ID: References: <20180502132751.05B9F401F3041@oldenburg.str.redhat.com> <248faadb-e484-806f-1485-c34a72a9ca0b@intel.com> <822a28c9-5405-68c2-11bf-0c282887466d@redhat.com> <57459C6F-C8BA-4E2D-99BA-64F35C11FC05@amacapital.net> <6286ba0a-7e09-b4ec-e31f-bd091f5940ff@redhat.com> <20180503021058.GA5670@ram.oc3035372033.ibm.com> <927c8325-4c98-d7af-b921-6aafcf8fe992@redhat.com> <314e1a48-db94-9b37-8793-a95a2082c9e2@redhat.com> <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Florian Weimer Cc: linux-arch , Linux-MM , Linux API , X86 ML , linuxram@us.ibm.com, Dave Hansen , linux-x86_64@vger.kernel.org, Andy Lutomirski , linuxppc-dev List-Id: linux-api@vger.kernel.org > On May 14, 2018, at 5:01 AM, Florian Weimer wrote: >=20 >> One thing we could do, though: the current initual state on process >> creation is all access blocked on all keys. We could change it so that >> half the keys are fully blocked and half are read-only. Then we could ad= d >> a PKEY_ALLOC_STRICT or similar that allocates a key with the correct >> initial state*and* does the setsignal thing. If there are no keys left >> with the correct initial state, then it fails. >=20 > The initial PKRU value can currently be configured by the system administr= ator. I fear this approach has too many moving parts to be viable. >=20 >=20 Honestly, I think we should drop that option. I don=E2=80=99t see how we can= expect an administrator to do this usefully.= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com ([74.125.83.53]:40316 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbeENPc5 (ORCPT ); Mon, 14 May 2018 11:32:57 -0400 Received: by mail-pg0-f53.google.com with SMTP id l2-v6so5643159pgc.7 for ; Mon, 14 May 2018 08:32:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] pkeys: Introduce PKEY_ALLOC_SIGNALINHERIT and change signal semantics From: Andy Lutomirski In-Reply-To: <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> Date: Mon, 14 May 2018 08:32:54 -0700 Content-Transfer-Encoding: quoted-printable Message-ID: References: <20180502132751.05B9F401F3041@oldenburg.str.redhat.com> <248faadb-e484-806f-1485-c34a72a9ca0b@intel.com> <822a28c9-5405-68c2-11bf-0c282887466d@redhat.com> <57459C6F-C8BA-4E2D-99BA-64F35C11FC05@amacapital.net> <6286ba0a-7e09-b4ec-e31f-bd091f5940ff@redhat.com> <20180503021058.GA5670@ram.oc3035372033.ibm.com> <927c8325-4c98-d7af-b921-6aafcf8fe992@redhat.com> <314e1a48-db94-9b37-8793-a95a2082c9e2@redhat.com> <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Florian Weimer Cc: Andy Lutomirski , linuxram@us.ibm.com, Dave Hansen , Linux-MM , Linux API , linux-x86_64@vger.kernel.org, linux-arch , X86 ML , linuxppc-dev Message-ID: <20180514153254.KeiVn5gZf_R8g--uDtoobFlIeB57a88EJH1LcByuamg@z> > On May 14, 2018, at 5:01 AM, Florian Weimer wrote: >=20 >> One thing we could do, though: the current initual state on process >> creation is all access blocked on all keys. We could change it so that >> half the keys are fully blocked and half are read-only. Then we could ad= d >> a PKEY_ALLOC_STRICT or similar that allocates a key with the correct >> initial state*and* does the setsignal thing. If there are no keys left >> with the correct initial state, then it fails. >=20 > The initial PKRU value can currently be configured by the system administr= ator. I fear this approach has too many moving parts to be viable. >=20 >=20 Honestly, I think we should drop that option. I don=E2=80=99t see how we can= expect an administrator to do this usefully.= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40l4TY2yPNzF34Z for ; Tue, 15 May 2018 01:33:00 +1000 (AEST) Received: by mail-pg0-x22e.google.com with SMTP id v7-v6so2854790pgs.0 for ; Mon, 14 May 2018 08:33:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] pkeys: Introduce PKEY_ALLOC_SIGNALINHERIT and change signal semantics From: Andy Lutomirski In-Reply-To: <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> Date: Mon, 14 May 2018 08:32:54 -0700 Cc: Andy Lutomirski , linuxram@us.ibm.com, Dave Hansen , Linux-MM , Linux API , linux-x86_64@vger.kernel.org, linux-arch , X86 ML , linuxppc-dev Message-Id: References: <20180502132751.05B9F401F3041@oldenburg.str.redhat.com> <248faadb-e484-806f-1485-c34a72a9ca0b@intel.com> <822a28c9-5405-68c2-11bf-0c282887466d@redhat.com> <57459C6F-C8BA-4E2D-99BA-64F35C11FC05@amacapital.net> <6286ba0a-7e09-b4ec-e31f-bd091f5940ff@redhat.com> <20180503021058.GA5670@ram.oc3035372033.ibm.com> <927c8325-4c98-d7af-b921-6aafcf8fe992@redhat.com> <314e1a48-db94-9b37-8793-a95a2082c9e2@redhat.com> <008010c1-20a1-c307-25ac-8a69d672d031@redhat.com> To: Florian Weimer List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > On May 14, 2018, at 5:01 AM, Florian Weimer wrote: >=20 >> One thing we could do, though: the current initual state on process >> creation is all access blocked on all keys. We could change it so that >> half the keys are fully blocked and half are read-only. Then we could ad= d >> a PKEY_ALLOC_STRICT or similar that allocates a key with the correct >> initial state*and* does the setsignal thing. If there are no keys left >> with the correct initial state, then it fails. >=20 > The initial PKRU value can currently be configured by the system administr= ator. I fear this approach has too many moving parts to be viable. >=20 >=20 Honestly, I think we should drop that option. I don=E2=80=99t see how we can= expect an administrator to do this usefully.=