From: James Morse <james.morse@arm.com>
To: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org,
Kristina Martsenko <kristina.martsenko@arm.com>,
Dave Martin <Dave.Martin@arm.com>,
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 4/6] arm64/kvm: enable pointer authentication cpufeature conditionally
Date: Fri, 4 Jan 2019 17:58:40 +0000 [thread overview]
Message-ID: <33542a00-23f4-b159-91f5-f05d3afa5b9f@arm.com> (raw)
In-Reply-To: <1545119810-12182-5-git-send-email-amit.kachhap@arm.com>
Hi Amit,
On 18/12/2018 07:56, Amit Daniel Kachhap wrote:
> According to userspace settings, pointer authentication cpufeature
> is enabled/disabled from guests.
This reads like the guest is changing something in the host. Isn't this hiding
the id-register values from the guest?
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index 6af6c7d..ce6144a 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -1066,6 +1066,15 @@ static u64 read_id_reg(struct sys_reg_desc const *r, bool raz)
> kvm_debug("SVE unsupported for guests, suppressing\n");
>
> 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 (!kvm_arm_vcpu_ptrauth_allowed(vcpu)) {
> + kvm_debug("ptrauth unsupported for guests, suppressing\n");
> + val &= ~ptrauth_mask;
> + }
I think this hunk should have been in the previous patch as otherwise its a
bisection oddity.
Could you merge this hunk with the previous patch, and move the mechanical bits
that pass vcpu around to a prior preparatory patch.
(I'm still unsure if we need to hide this as a user-controlled policy)
Thanks,
James
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-01-04 17:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 7:56 [PATCH v4 0/6] Add ARMv8.3 pointer authentication for kvm guest Amit Daniel Kachhap
2018-12-18 7:56 ` [PATCH v4 1/6] arm64/kvm: preserve host HCR_EL2 value Amit Daniel Kachhap
2019-01-04 17:50 ` James Morse
2019-01-08 5:16 ` Amit Daniel Kachhap
2018-12-18 7:56 ` [PATCH v4 2/6] arm64/kvm: context-switch ptrauth registers Amit Daniel Kachhap
2019-01-04 17:57 ` James Morse
2019-01-09 10:01 ` Amit Daniel Kachhap
2018-12-18 7:56 ` [PATCH v4 3/6] arm64/kvm: add a userspace option to enable pointer authentication Amit Daniel Kachhap
2019-01-04 17:57 ` James Morse
2019-01-09 10:13 ` Amit Daniel Kachhap
2019-01-31 16:19 ` James Morse
2018-12-18 7:56 ` [PATCH v4 4/6] arm64/kvm: enable pointer authentication cpufeature conditionally Amit Daniel Kachhap
2019-01-04 17:58 ` James Morse [this message]
2019-01-09 10:16 ` Amit Daniel Kachhap
2019-01-28 7:02 ` Amit Daniel Kachhap
2018-12-18 7:56 ` [PATCH v4 5/6] arm64/kvm: control accessibility of ptrauth key registers Amit Daniel Kachhap
2018-12-18 7:56 ` [PATCH v4 6/6] arm/kvm: arm64: Add a vcpu feature for pointer authentication Amit Daniel Kachhap
2019-01-04 17:59 ` James Morse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33542a00-23f4-b159-91f5-f05d3afa5b9f@arm.com \
--to=james.morse@arm.com \
--cc=Dave.Martin@arm.com \
--cc=amit.kachhap@arm.com \
--cc=catalin.marinas@arm.com \
--cc=kristina.martsenko@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=ramana.radhakrishnan@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).