Received: by 10.192.165.156 with SMTP id m28csp1254392imm; Wed, 18 Apr 2018 06:50:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9lb3dsBvNa/fJXUyVesz+YIDXyZr+Q9Wz3I7hgC4u+MAuH3u2ODtRw3FNDY++59D95JKJ X-Received: by 10.99.123.17 with SMTP id w17mr1830594pgc.8.1524059439428; Wed, 18 Apr 2018 06:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524059439; cv=none; d=google.com; s=arc-20160816; b=Fl1csvTCjGJOmZpL3M7peJyiTGCMjKIv6GB+xW3CIuEavZDmZ8T7lnFpcXTW+rVYAo jAsyVdPBrVH2SzCcNfGH1aFFD220JxRJvqDZBKEFO60FZeq+oFnXXQQ5PLziGoo3RUs9 X/kBem+wdliPAGVOcfseUtA4aSh9rXwfD/UxKQ2fU6d8/eStfeD2PnFvfcWpj8p0uqAJ rfQLsmrHiuh8TM/7ZuJRhDLsL2id0Dwl/VCLGMY92wO/VN3sF8jIjF5J2+AfgVDNyoyM 7A3skOiOllJ60GVnAq1CmX/8h0OpgeELOxPwHyUIZiaD1rPy76tae6KXQpk/1DI6Mry5 /Ilg== 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:arc-authentication-results; bh=BZGUIEHVLbf0Bu3hCR+hzGkeDnLNorPYgD+jv4Dc2/c=; b=BB9hDMirk0V7Koolcnb0pN9FzUirqYrDHXry5+yz91UpcRM8AZ1+Mx5iJFsoUHZvwl Ns3rcaGSuIxZ0r5MT7x+v8xpVwOWG/vhbpo98Z5SlvjoulZRiBiofgURjcSEfdul4bYU yXGpf3ojqajhhRHZ9JqTasypJF1nNOTsfNLRPdtqLeHcPOo5ea/Eu0xJVUjoqVUuWOjH FBgynyo8euJdKY56YX+DbibnSNrslYPaV0FUCXWwa78SFjD2ei5pHrNKx54I+znJ1zqf rElekSp5yNqgsikX9yhXDyq8CTOQCvwzvlJ0lRFNuSWE1GmyhJIk4DdP5XMvxxDJuw2U jwSg== 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 68-v6si1291150pla.531.2018.04.18.06.50.24; Wed, 18 Apr 2018 06:50:39 -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 S1753218AbeDRNrh (ORCPT + 99 others); Wed, 18 Apr 2018 09:47:37 -0400 Received: from foss.arm.com ([217.140.101.70]:55328 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbeDRNrf (ORCPT ); Wed, 18 Apr 2018 09:47:35 -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 1C3601596; Wed, 18 Apr 2018 06:47:35 -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 B77BF3F25D; Wed, 18 Apr 2018 06:47:32 -0700 (PDT) Date: Wed, 18 Apr 2018 14:47:30 +0100 From: Mark Rutland To: Andrew Jones Cc: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, catalin.marinas@arm.com, cdall@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arch@vger.kernel.org, marc.zyngier@arm.com, ramana.radhakrishnan@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, awallis@codeaurora.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCHv3 03/11] arm64/kvm: hide ptrauth from guests Message-ID: <20180418134729.fzu4r7rvgdzlckw7@lakrids.cambridge.arm.com> References: <20180417183735.56985-1-mark.rutland@arm.com> <20180417183735.56985-4-mark.rutland@arm.com> <20180418131926.pbjlbcjspg7azq2j@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418131926.pbjlbcjspg7azq2j@kamzik.brq.redhat.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 Wed, Apr 18, 2018 at 03:19:26PM +0200, Andrew Jones wrote: > On Tue, Apr 17, 2018 at 07:37:27PM +0100, Mark Rutland wrote: > > @@ -1000,6 +1000,15 @@ static u64 read_id_reg(struct sys_reg_desc const *r, bool raz) > > task_pid_nr(current)); > > > > val &= ~(0xfUL << ID_AA64PFR0_SVE_SHIFT); > > + } else if (id == SYS_ID_AA64ISAR1_EL1) { > > + const u64 ptrauth_mask = (0xfUL << ID_AA64ISAR1_APA_SHIFT) | > > + (0xfUL << ID_AA64ISAR1_API_SHIFT) | > > + (0xfUL << ID_AA64ISAR1_GPA_SHIFT) | > > + (0xfUL << ID_AA64ISAR1_GPI_SHIFT); > > + if (val & ptrauth_mask) > > + pr_err_once("kvm [%i]: ptrauth unsupported for guests, suppressing\n", > > + task_pid_nr(current)); > > Marc just changed the equivalent SVE pr_err_once() to kvm_debug(). > So we probably want to do the same here. Good point. Done. > > + val &= ~ptrauth_mask; > > } else if (id == SYS_ID_AA64MMFR1_EL1) { > > if (val & (0xfUL << ID_AA64MMFR1_LOR_SHIFT)) > > pr_err_once("kvm [%i]: LORegions unsupported for guests, suppressing\n", > > -- > > 2.11.0 > > > > Otherwise > > Reviewed-by: Andrew Jones Cheers! Mark.