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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable 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 A54D7C76191 for ; Thu, 18 Jul 2019 13:00:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AB5A2173E for ; Thu, 18 Jul 2019 13:00:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L//ZL1fO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AB5A2173E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b4J39VKBvCIfBFUdHMKaFKEj//rzszlNYODzeZNi6fc=; b=L//ZL1fOhIdprt vDV+WCE6GYtPncjNNPy0kWPFrq/SRRSod4zE4e/hLa95QXzB/tm9GxNomT6YSJfzg95iYoYqT8JeC Ot1KhtV2bk9Sz9/wa0Drkccmu3SZAqZEGqpxJi6yGqo0BfmhEEReWw9QvXv1Akuxmbzvdi5VXdx/v IZ1l6RJlXIZeyoQtiXI2LA/dQjOcL2FgWgD5FUeMjpU+WZ6BKNCzS21qp1FWJ8eezfwVQYHjbVXD1 HYao6Q4F3lwUIMmdhElgoY811FMfWKS7Pejo1Mt2qqnWGYt7LfauYihlv3jZt6waW+lmFjE9y5NXk Fm7fQHaPZhIY+7l3+ovA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1ho61R-0002Wv-AX; Thu, 18 Jul 2019 13:00:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1ho61M-0002W5-S7 for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2019 13:00:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8B8E8344; Thu, 18 Jul 2019 06:00:26 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2859F3F71F; Thu, 18 Jul 2019 06:00:25 -0700 (PDT) Date: Thu, 18 Jul 2019 14:00:22 +0100 From: Andre Przywara To: Dave Martin Subject: Re: [PATCH kvmtool v4 6/8] KVM: arm/arm64: Back out ptrauth command-line arguments Message-ID: <20190718140022.2970c688@donnerap.cambridge.arm.com> In-Reply-To: <1559906789-20936-7-git-send-email-Dave.Martin@arm.com> References: <1559906789-20936-1-git-send-email-Dave.Martin@arm.com> <1559906789-20936-7-git-send-email-Dave.Martin@arm.com> Organization: ARM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190718_060028_999271_8FF76CDA X-CRM114-Status: GOOD ( 17.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoffer Dall , Marc Zyngier , Will Deacon , Kristina Martsenko , Zhang Lei , Amit Daniel Kachhap , Alex =?UTF-8?B?QmVubsOpZQ==?= , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 7 Jun 2019 12:26:27 +0100 Dave Martin wrote: > Will says that the command-line arguments for controlling optional > vcpu features are superfluous: we don't attempt to support > migration, and this isn't QEMU. > > So, remove the command-line arguments and just default pointer auth > to on if supported. > > Signed-off-by: Dave Martin > > --- > > Changes since v3: > > * New patch. This should probably be folded into the previous one. Yes, absolutely! Those two merged become a so much simpler patch. For the stashed version: Reviewed-by: Andre Przywara Cheers, Andre. > --- > arm/aarch64/include/kvm/kvm-config-arch.h | 6 +----- > arm/include/arm-common/kvm-config-arch.h | 2 -- > arm/kvm-cpu.c | 19 ++++--------------- > 3 files changed, 5 insertions(+), 22 deletions(-) > > diff --git a/arm/aarch64/include/kvm/kvm-config-arch.h b/arm/aarch64/include/kvm/kvm-config-arch.h > index 0279b13..04be43d 100644 > --- a/arm/aarch64/include/kvm/kvm-config-arch.h > +++ b/arm/aarch64/include/kvm/kvm-config-arch.h > @@ -8,11 +8,7 @@ > "Create PMUv3 device"), \ > OPT_U64('\0', "kaslr-seed", &(cfg)->kaslr_seed, \ > "Specify random seed for Kernel Address Space " \ > - "Layout Randomization (KASLR)"), \ > - OPT_BOOLEAN('\0', "enable-ptrauth", &(cfg)->enable_ptrauth, \ > - "Enables pointer authentication"), \ > - OPT_BOOLEAN('\0', "disable-ptrauth", &(cfg)->disable_ptrauth, \ > - "Disables pointer authentication"), > + "Layout Randomization (KASLR)"), > > #include "arm-common/kvm-config-arch.h" > > diff --git a/arm/include/arm-common/kvm-config-arch.h b/arm/include/arm-common/kvm-config-arch.h > index 1b4287d..5734c46 100644 > --- a/arm/include/arm-common/kvm-config-arch.h > +++ b/arm/include/arm-common/kvm-config-arch.h > @@ -10,8 +10,6 @@ struct kvm_config_arch { > bool aarch32_guest; > bool has_pmuv3; > u64 kaslr_seed; > - bool enable_ptrauth; > - bool disable_ptrauth; > enum irqchip_type irqchip; > u64 fw_addr; > }; > diff --git a/arm/kvm-cpu.c b/arm/kvm-cpu.c > index acd1d5f..fff8494 100644 > --- a/arm/kvm-cpu.c > +++ b/arm/kvm-cpu.c > @@ -68,16 +68,9 @@ struct kvm_cpu *kvm_cpu__arch_init(struct kvm *kvm, unsigned long cpu_id) > vcpu_init.features[0] |= (1UL << KVM_ARM_VCPU_PSCI_0_2); > } > > - /* Check Pointer Authentication command line arguments. */ > - if (kvm->cfg.arch.enable_ptrauth && kvm->cfg.arch.disable_ptrauth) > - die("Both enable-ptrauth and disable-ptrauth option cannot be present"); > - /* > - * Always enable Pointer Authentication if system supports > - * this extension unless disable-ptrauth option is present. > - */ > + /* Enable pointer authentication if available */ > if (kvm__supports_extension(kvm, KVM_CAP_ARM_PTRAUTH_ADDRESS) && > - kvm__supports_extension(kvm, KVM_CAP_ARM_PTRAUTH_GENERIC) && > - !kvm->cfg.arch.disable_ptrauth) > + kvm__supports_extension(kvm, KVM_CAP_ARM_PTRAUTH_GENERIC)) > vcpu_init.features[0] |= ARM_VCPU_PTRAUTH_FEATURE; > > /* > @@ -118,12 +111,8 @@ struct kvm_cpu *kvm_cpu__arch_init(struct kvm *kvm, unsigned long cpu_id) > die("Unable to find matching target"); > } > > - if (err || target->init(vcpu)) { > - if (kvm->cfg.arch.enable_ptrauth) > - die("Unable to initialise vcpu with pointer authentication feature"); > - else > - die("Unable to initialise vcpu"); > - } > + if (err || target->init(vcpu)) > + die("Unable to initialise vcpu"); > > coalesced_offset = ioctl(kvm->sys_fd, KVM_CHECK_EXTENSION, > KVM_CAP_COALESCED_MMIO); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel