From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr30056.outbound.protection.outlook.com ([40.107.3.56]:28895 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727352AbeJWQ6m (ORCPT ); Tue, 23 Oct 2018 12:58:42 -0400 From: Ramana Radhakrishnan Subject: Re: [PATCH v5 07/17] arm64: add basic pointer authentication support Date: Tue, 23 Oct 2018 08:36:16 +0000 Message-ID: <5ca5bf92-f2b7-48c9-ea41-5efeff09a799@arm.com> References: <20181005084754.20950-1-kristina.martsenko@arm.com> <20181005084754.20950-8-kristina.martsenko@arm.com> <20181019111542.6wrvjguirglzg7vg@mbp> In-Reply-To: <20181019111542.6wrvjguirglzg7vg@mbp> Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Catalin Marinas , 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 Poulose , Will Deacon , Christoffer Dall , "kvmarm@lists.cs.columbia.edu" , Amit Kachhap , Dave P Martin , "linux-kernel@vger.kernel.org" , Kees Cook nd Message-ID: <20181023083616.mUbaHea03qXnB7J2zxJDxExTtubKk3gkvUGOXvPpSt4@z> On 19/10/2018 12:15, Catalin Marinas wrote: > 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-bi= t >> + * registers (Lo and Hi). >> + */ >> +struct ptrauth_key { >> + unsigned long lo, hi; >> +}; >> + >> +/* >> + * We give each process its own instruction A key (APIAKey), which is s= hared by >> + * all threads. This is inherited upon fork(), and reinitialised upon e= xec*(). >> + * All other keys are currently unused, with APIBKey, APDAKey, and APBA= Key >> + * instructions behaving as NOPs. >> + */ >=20 > 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? Sorry about the slow response, I've been traveling. Ack and Will's response covers the reasons why pretty well. A prctl call=20 would be a good enhancement. regards Ramana