From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH v5 07/17] arm64: add basic pointer authentication support Date: Fri, 19 Oct 2018 12:15:43 +0100 Message-ID: <20181019111542.6wrvjguirglzg7vg@mbp> References: <20181005084754.20950-1-kristina.martsenko@arm.com> <20181005084754.20950-8-kristina.martsenko@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20181005084754.20950-8-kristina.martsenko@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Kristina Martsenko Cc: linux-arch@vger.kernel.org, Jacob Bramley , Arnd Bergmann , Ard Biesheuvel , Marc Zyngier , linux-kernel@vger.kernel.org, Adam Wallis , Will Deacon , Dave P Martin , Ramana Radhakrishnan , Amit Kachhap , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Kees Cook List-Id: linux-arch.vger.kernel.org On Fri, Oct 05, 2018 at 09:47:44AM +0100, Kristina Martsenko wrote: > diff --git a/arch/arm64/include/asm/pointer_auth.h b/arch/arm64/include/asm/pointer_auth.h > new file mode 100644 > index 000000000000..2aefedc31d9e > --- /dev/null > +++ b/arch/arm64/include/asm/pointer_auth.h > @@ -0,0 +1,63 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#ifndef __ASM_POINTER_AUTH_H > +#define __ASM_POINTER_AUTH_H > + > +#include > + > +#include > +#include > + > +#ifdef CONFIG_ARM64_PTR_AUTH > +/* > + * Each key is a 128-bit quantity which is split across a pair of 64-bit > + * registers (Lo and Hi). > + */ > +struct ptrauth_key { > + unsigned long lo, hi; > +}; > + > +/* > + * We give each process its own instruction A key (APIAKey), which is shared by > + * all threads. This is inherited upon fork(), and reinitialised upon exec*(). > + * All other keys are currently unused, with APIBKey, APDAKey, and APBAKey > + * instructions behaving as NOPs. > + */ I don't remember the past discussions but I assume the tools guys are ok with a single key shared by multiple threads. Ramana, could you ack this part, FTR? (and it would help if someone from the Android and Chrome camps can confirm) Thanks. -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.101.70]:50590 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbeJSTV0 (ORCPT ); Fri, 19 Oct 2018 15:21:26 -0400 Date: Fri, 19 Oct 2018 12:15:43 +0100 From: Catalin Marinas Subject: Re: [PATCH v5 07/17] arm64: add basic pointer authentication support Message-ID: <20181019111542.6wrvjguirglzg7vg@mbp> References: <20181005084754.20950-1-kristina.martsenko@arm.com> <20181005084754.20950-8-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181005084754.20950-8-kristina.martsenko@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Kristina Martsenko Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland , linux-arch@vger.kernel.org, Andrew Jones , Jacob Bramley , Arnd Bergmann , Ard Biesheuvel , Marc Zyngier , Adam Wallis , "Suzuki K . Poulose" , Will Deacon , Christoffer Dall , kvmarm@lists.cs.columbia.edu, Ramana Radhakrishnan , Amit Kachhap , Dave P Martin , linux-kernel@vger.kernel.org, Kees Cook Message-ID: <20181019111543.3Qz5CKDPkneNL95P09SmU4w6v0oz0cGPzsuHUhGpt0U@z> On Fri, Oct 05, 2018 at 09:47:44AM +0100, Kristina Martsenko wrote: > diff --git a/arch/arm64/include/asm/pointer_auth.h b/arch/arm64/include/asm/pointer_auth.h > new file mode 100644 > index 000000000000..2aefedc31d9e > --- /dev/null > +++ b/arch/arm64/include/asm/pointer_auth.h > @@ -0,0 +1,63 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#ifndef __ASM_POINTER_AUTH_H > +#define __ASM_POINTER_AUTH_H > + > +#include > + > +#include > +#include > + > +#ifdef CONFIG_ARM64_PTR_AUTH > +/* > + * Each key is a 128-bit quantity which is split across a pair of 64-bit > + * registers (Lo and Hi). > + */ > +struct ptrauth_key { > + unsigned long lo, hi; > +}; > + > +/* > + * We give each process its own instruction A key (APIAKey), which is shared by > + * all threads. This is inherited upon fork(), and reinitialised upon exec*(). > + * All other keys are currently unused, with APIBKey, APDAKey, and APBAKey > + * instructions behaving as NOPs. > + */ I don't remember the past discussions but I assume the tools guys are ok with a single key shared by multiple threads. Ramana, could you ack this part, FTR? (and it would help if someone from the Android and Chrome camps can confirm) Thanks. -- Catalin