Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2676712imu; Sun, 9 Dec 2018 07:00:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/V0SgXbN/NgCTGaVvawVZ0l59oS0LGE2Y6uVE931KDYmJ5TzwyYZjeb8y02KcJJvG4KtrTx X-Received: by 2002:a17:902:6b0c:: with SMTP id o12mr9009215plk.291.1544367642693; Sun, 09 Dec 2018 07:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544367642; cv=none; d=google.com; s=arc-20160816; b=HwnyMtAV6rN++nUtyOb6AoxPWbSYppP8PLp/c0mhrmFch0aJn5XeGaw+gDX0a0DCvh 77olYIZSR436+OxLh8CD6997HE+jnac1WbstgEQSaT3jDDNlj3lSr1g6XeqVrDajAh8A 4Z3H4oy//FVt8EFzrzxHBQ5OzOsr+xXJrgV+4/Oj56F0iwGfwdgj7fzQPMInxDXg2fvX CWEsvuJBCTNVwEfy0+C9ANkYnRLn+V0mjnVTWR7mTio1axR74g1dUpE2XTJJ8KbUrv2N 0L/a/r0CMLclvY/poHWf1hEGAvmIMpJ0wx1P/pTiod32IOUEi58HrERIwxaAjirs2ebk GD4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=cNDhZFMf/+5Sbma1vzSzIDHZ8WGRRV+Q1JX55LNm8NU=; b=KGlPxAdMHhYra6OC3JTMeCtXYMCueWE829MpyPWWcWIo+nqObDmtpoOOBKgIASbZo1 OG1zkOnef9tCjI4Uvcs6kz4yMs/goC+wPdxx5CJORu0bBuctpIkC5wb3TETZj1rUUkWn je3jQvwiQbxo3+kq2drxqgbZ4PPLw+/CjwHsl3KmMaF9eagqPyrrD/rOCG2baYTGkof6 SqOzx8BiN+VU6RkceWiPtMWGQaFkTTVx+URd097SSRGrDhU0l1kIspaqjtbkXVAk78rG D2hhsAFsyR8j4NbWR0bm1UfceOe3O2T/2zixw9t79GR0TCpN3MiXvWh12PmzcPsEKaTc zDgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QkwNnTPW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si6977621pls.326.2018.12.09.07.00.27; Sun, 09 Dec 2018 07:00:42 -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; dkim=pass header.i=@linaro.org header.s=google header.b=QkwNnTPW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbeLIO7s (ORCPT + 99 others); Sun, 9 Dec 2018 09:59:48 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:43611 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbeLIO7r (ORCPT ); Sun, 9 Dec 2018 09:59:47 -0500 Received: by mail-ot1-f66.google.com with SMTP id a11so8089225otr.10 for ; Sun, 09 Dec 2018 06:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cNDhZFMf/+5Sbma1vzSzIDHZ8WGRRV+Q1JX55LNm8NU=; b=QkwNnTPW7guKA6TNhaSpmx5XBNdLO9Tvl2Ihnn9dEn7DMEPOjDoAH5kBI5p/gEU+z+ qwLFSx4c9ztkQaABHSRZ/m3KDz7RvGZoaT+cMjKOegI/ViayN3vN1uDJyd9HtsM5TosX EeZx/s1nhUahsgkzxAs56Vq92fEWUEOCFoV00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cNDhZFMf/+5Sbma1vzSzIDHZ8WGRRV+Q1JX55LNm8NU=; b=DVrqtbLrMvJ4jpaKdL0cHc8o1N2xUGpIxfy2nTsRkx55X4GGP4L4rd+VmBvMEMEjSC OJMjCFd6LsJgtQEwVL9eEgPK9b+id0XQNSefUgk1qFGWgPN9FwRymplQcTh0XXD90vYv knWYvyEJHo/QfCJAavtEbmvn/3mdJ3ZhKxLOEknIJ5kwV4v1LEiflkI7ElXo6m6qQ2ql XMd+2dyjck9AKU+SaiKNYUl/E8IOu9i6e+6FeLgFJ0GBpUElBiy6OYjizXctMjff/hH0 hpwsMDL8ZptKAQVK4ngWyM+BYcvx1Nm2WF8aTNe8CQ3Q2pkULPI85MdTssRe07sYgYUY 2UQw== X-Gm-Message-State: AA+aEWZ9s2YlOh0yp/ZLjuLMkEG2d+c+pQ6Bgzvj9aerQBVfGgE+cDe3 FJZMxTYmqaMqvOVEol0hgwQEarkXvFJIcQ== X-Received: by 2002:a9d:72a:: with SMTP id 39mr6888134ote.134.1544367586327; Sun, 09 Dec 2018 06:59:46 -0800 (PST) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id h24sm6360742otm.72.2018.12.09.06.59.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 06:59:45 -0800 (PST) Subject: Re: [PATCH v6 07/13] arm64: add basic pointer authentication support To: Kristina Martsenko , linux-arm-kernel@lists.infradead.org Cc: Adam Wallis , Amit Kachhap , Andrew Jones , Ard Biesheuvel , Catalin Marinas , Christoffer Dall , Cyrill Gorcunov , Dave P Martin , Jacob Bramley , Kees Cook , Marc Zyngier , Mark Rutland , Ramana Radhakrishnan , Suzuki K Poulose , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org References: <20181207183931.4285-1-kristina.martsenko@arm.com> <20181207183931.4285-8-kristina.martsenko@arm.com> From: Richard Henderson Openpgp: preference=signencrypt Message-ID: <0cd3ea5e-c705-7e14-bac0-900a4ca7782c@linaro.org> Date: Sun, 9 Dec 2018 08:59:42 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181207183931.4285-8-kristina.martsenko@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/7/18 12:39 PM, Kristina Martsenko wrote: > From: Mark Rutland > > This patch adds basic support for pointer authentication, allowing > userspace to make use of APIAKey, APIBKey, APDAKey, APDBKey, and > APGAKey. The kernel maintains key values for each process (shared by all > threads within), which are initialised to random values at exec() time. > > The ID_AA64ISAR1_EL1.{APA,API,GPA,GPI} fields are exposed to userspace, > to describe that pointer authentication instructions are available and > that the kernel is managing the keys. Two new hwcaps are added for the > same reason: PACA (for address authentication) and PACG (for generic > authentication). > > Signed-off-by: Mark Rutland > Signed-off-by: Kristina Martsenko > Tested-by: Adam Wallis > Cc: Catalin Marinas > Cc: Ramana Radhakrishnan > Cc: Suzuki K Poulose > Cc: Will Deacon > --- > arch/arm64/include/asm/pointer_auth.h | 75 +++++++++++++++++++++++++++++++++++ > arch/arm64/include/asm/thread_info.h | 4 ++ > arch/arm64/include/uapi/asm/hwcap.h | 2 + > arch/arm64/kernel/cpufeature.c | 13 ++++++ > arch/arm64/kernel/cpuinfo.c | 2 + > arch/arm64/kernel/process.c | 4 ++ > 6 files changed, 100 insertions(+) > create mode 100644 arch/arm64/include/asm/pointer_auth.h Reviewed-by: Richard Henderson r~