Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp620461yba; Wed, 24 Apr 2019 07:01:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqysyg7wmcAZvn9ssQzGFrXqshLCO3OWe3PvhM8iXp0D8u0YlA95TX2Tl3yy3bSzDQwu/9lL X-Received: by 2002:a17:902:9304:: with SMTP id bc4mr33136911plb.312.1556114515411; Wed, 24 Apr 2019 07:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556114515; cv=none; d=google.com; s=arc-20160816; b=Lx63WQJMjBbLhJAJ/ls2dGe5sBRiyf+eRv7AMVGEkfbt2WJYwyA8QMK8h2qxjHRZbE khvr1Yfn4XXnPM7nk+QklQvMXNvWuE3Qy09B3C9KjONZ474z0plcwFhcY44GxEtS1Jjq 6GZjvZfT4g2bl1lkVpfR7d5izxwFDeTkPTBnzf/26JDWYjO4WbqqPMbAbXxrZ6E9sDFr NGkW9FQrW4zCW32UZ9xZTawJ06ZwclCbIiUmVhsKqwnrhK1kfIh/pzb2VjtaLat1HU5G ar8hRaR1HFdKqLCnrZfNkxJa1KwgCrw25sbd80f/axIerKcdiPaUET0Rcwnl0Z+7ilLL D0Ig== 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=/h6QrY65fFgoYSOlUa821169Oc+LfU4SrUuGEnB0MMQ=; b=uN1YvYlVeTVpLlyilSpRjPz0c9vb5tPQ6NpJxIyAL1pwBuAmeOYOn8J0HykkszLxZI hES+OuorjTW4M4r95QFptebaE5hpgC8Y+muhh0CwZMsDNbkibX48fmO/reeZF9Qtw09w jyc+vMgx7UJ45SwZBNBfWn1bBJIfTLJRq2ni3hHk5844SPBpaUr4GZHP2zflEdoH/lDa ytB+gc+F/HKq23o4gDIi7E098lMOPOZIyVoTOKy/SLTSzEAiX1qm8WHOx9XSu+06NWDH JN5ICZJ9GiA9I5R8OPdcuusuCfxmcdG/PAElik0Nm7qgpJ+lyoQxy0chOczOhngZD95L b83w== 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 f1si19743891pff.158.2019.04.24.07.01.37; Wed, 24 Apr 2019 07:01:55 -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 S1730505AbfDXNk2 (ORCPT + 99 others); Wed, 24 Apr 2019 09:40:28 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43662 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730497AbfDXNk1 (ORCPT ); Wed, 24 Apr 2019 09:40:27 -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 8581E80D; Wed, 24 Apr 2019 06:40:27 -0700 (PDT) Received: from e103592.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 CB1D03F238; Wed, 24 Apr 2019 06:40:25 -0700 (PDT) Date: Wed, 24 Apr 2019 14:40:23 +0100 From: Dave Martin To: Marc Zyngier Cc: Amit Daniel Kachhap , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Kristina Martsenko , Ramana Radhakrishnan , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v10 2/5] KVM: arm/arm64: context-switch ptrauth registers Message-ID: <20190424134023.GV3567@e103592.cambridge.arm.com> References: <1555994558-26349-1-git-send-email-amit.kachhap@arm.com> <1555994558-26349-3-git-send-email-amit.kachhap@arm.com> <8636m9awmu.wl-marc.zyngier@arm.com> <20190423154430.GM3567@e103592.cambridge.arm.com> <09bd4e79-c507-1f00-01c5-38afb2a62077@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09bd4e79-c507-1f00-01c5-38afb2a62077@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 11:29:37AM +0100, Marc Zyngier wrote: > On 23/04/2019 16:44, Dave Martin wrote: > > On Tue, Apr 23, 2019 at 03:54:32PM +0530, Amit Daniel Kachhap wrote: > >> Hi Mark, > >> > >> On 4/23/19 3:09 PM, Marc Zyngier wrote: > >>> On Tue, 23 Apr 2019 05:42:35 +0100, > >>> Amit Daniel Kachhap wrote: [...] > >>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > >>>> index 7e34b9e..3cfe2eb 100644 > >>>> --- a/arch/arm64/Kconfig > >>>> +++ b/arch/arm64/Kconfig > >>>> @@ -1301,8 +1301,9 @@ config ARM64_PTR_AUTH > >>>> context-switched along with the process. > >>>> The feature is detected at runtime. If the feature is not present in > >>>> - hardware it will not be advertised to userspace nor will it be > >>>> - enabled. > >>>> + hardware it will not be advertised to userspace/KVM guest nor will it > >>>> + be enabled. However, KVM guest also require VHE mode and hence > >>>> + CONFIG_ARM64_VHE=y option to use this feature. > >>> > >>> SVE seems to have the exact same requirements, and has > >>> > >>> depends on !KVM || ARM64_VHE > >>> > >>> Why don't we have that for PTR_AUTH too? > >> This point came up earlier also and it was suggested by Dave[1] to leave > >> userspace ptrauth for non-vhe mode as that would bring regression now. > >> [1]:https://lkml.org/lkml/2019/3/27/583 > > > > I see Marc applied this change in > > https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/commit/?h=queue&id=e19b245fa4c61558536bd34f80845f0c41eab65f0 > > That's only for me not to forget anything, and it hasn't been folded > into the original patch yet. Ah, right, misunderstood. > > The risk here is that someone has a custom config from an old kernel > > that explicitly turns CONFIG_ARM64_VHE off, and that try to use that > > config with this patch. > > > > I'm not sure how much we care about that. > > > > Otherwise, blocking this config so that people don't accidentally rely > > on it seems sensible. > > What I'm trying to do is to reduce the amount of valid kernel > configurations that we need to validate independently. > > At this stage, I'm tempted to just restrict it as described above, and > maybe relax it if someone shouts at me. Sounds good to me. Cheers ---Dave