From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F577C10F11 for ; Wed, 24 Apr 2019 13:40:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48FCA21773 for ; Wed, 24 Apr 2019 13:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730509AbfDXNk2 (ORCPT ); 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