Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp552981imm; Fri, 12 Oct 2018 02:50:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV62zjvY2g9sRn6KEhzZe+qkwy5pyFnOoPc9WdOC19mR5XjwrCWUsl839ybd8qS849IPLasu5 X-Received: by 2002:a63:ff23:: with SMTP id k35-v6mr4879771pgi.62.1539337857280; Fri, 12 Oct 2018 02:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539337857; cv=none; d=google.com; s=arc-20160816; b=m8amhb5b4LRMfErLrh8rCvaOFI5bYz9Jp2aKR2mxhIRri44JNvXxgTKT+ds7P4T36c chzUw55+Vp0cZAEG+KK6+e/NJ7nwiRA1QYK9aPfK8zF9OqNDb7pO/u9EYYBsgue8sYYV gqcCEP5gx7QLB2XptnN5CJ53wfhDwVf7qoqPSR8lzxYt4AfNclbfkLkulaaBqVF7ZHrF IIlujYxdwA/AkujtGG5AGYz9KtVqGpcy1UX9uB+isPvJXxadVLEuCWn/noqoti3HJVEP 12fRWzqUcHkR16deYea4s6OT+U+XFtMqfxmZXekdDhPv7+YJ96y55DuKb21PjGTgY0Go tDDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bC4OBKIG/4XvWqJ/gR2ZvRLnu9QnVpfIAWQ7z4i5cbc=; b=gBmSLJr84zMcfl0z5ceItlQ2rE9Hg+4zrD2vs8WZJxHDTDHXikFznTJuSt+m9I8oLB OAED8dKe2IuH3pEJQydjvJqskTF6OSBLDaxKZCI6hlJDUBukHksVoysBBpGFXvleB76T yQplxUmbl3z83SWOzTkLsOGEK4V2FPVafpj/o0l9IjpENqB/EY6uROQqYIObv+KtI7WQ LAuwzqW6nVUVatYD0t77S3gtO3XNqBapOk+XJ+/0sYXcP1JVKddoDeIq4/+cIoSstvSL NFcW5QyuP98H4nZTAXchbv463v6QZJqYoFJOo9B9AfSugMLOeNfhhBjSL+gyJiM5Qges GmPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10-v6si789150pgg.259.2018.10.12.02.50.42; Fri, 12 Oct 2018 02:50:57 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728331AbeJLRVu (ORCPT + 99 others); Fri, 12 Oct 2018 13:21:50 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48718 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbeJLRVu (ORCPT ); Fri, 12 Oct 2018 13:21:50 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E334F; Fri, 12 Oct 2018 02:50:14 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 495FF3F5B7; Fri, 12 Oct 2018 02:50:11 -0700 (PDT) Date: Fri, 12 Oct 2018 10:50:08 +0100 From: Mark Rutland To: Will Deacon Cc: Kristina Martsenko , linux-arm-kernel@lists.infradead.org, Adam Wallis , Amit Kachhap , Andrew Jones , Ard Biesheuvel , Arnd Bergmann , Catalin Marinas , Christoffer Dall , Dave P Martin , Jacob Bramley , Kees Cook , Marc Zyngier , Ramana Radhakrishnan , "Suzuki K . Poulose" , kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 01/17] arm64: add pointer authentication register bits Message-ID: <20181012095008.swtk4gazlrc6rwdj@lakrids.cambridge.arm.com> References: <20181005084754.20950-1-kristina.martsenko@arm.com> <20181005084754.20950-2-kristina.martsenko@arm.com> <20181011162814.GC17000@arm.com> <20181012085352.xi6rkcpm62iqd6ru@lakrids.cambridge.arm.com> <20181012085605.GB11847@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181012085605.GB11847@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 09:56:05AM +0100, Will Deacon wrote: > On Fri, Oct 12, 2018 at 09:53:54AM +0100, Mark Rutland wrote: > > On Thu, Oct 11, 2018 at 05:28:14PM +0100, Will Deacon wrote: > > > On Fri, Oct 05, 2018 at 09:47:38AM +0100, Kristina Martsenko wrote: > > > > > > +#define ESR_ELx_EC_PAC (0x09) > > > > > > Really minor nit: but shouldn't this be ESR_EL2_EC_PAC, since this trap > > > can't occur at EL1 afaict? > > > > It can also be taken to EL3 dependent on SCR_EL3.API. > > > > We use ESR_ELx_EC_ for other exceptions that can't be taken to EL1 > > (e.g. ESR_ELx_EC_SMC{32,64}), so I think it would be more consistent to > > leave this as ESR_ELx_EC_PAC rather than ESR_EL2_EC_PAC. > > Fair enough, but if we grow a different EC for ESR_EL1 that uses encoding > 0x09, this all falls apart. We haven't had overlapping encodings so far, and if we did, we'd want to apply some policy to all of these definitions, no? > At the very list, maybe we should comment those that are EL2 or higher > with /* EL2 and above */ or just fix the misnomer and drop the useless > _ELx_ part of the names completely. A comment sounds fine to me. I'm not sure that s/_ELx// buys us any clarity, though; I don't think that ESR_EC_PAC is clearly more constrained than ESR_ELx_EC_PAC. Thanks, Mark.