Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701117

Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers
Date 2017-08-01 16:40 +0200
Message-ID <u9GuZ-58A-1@gated-at.bofh.it> (permalink)
References <u4ZHZ-2x4-33@gated-at.bofh.it> <u4ZI2-2x4-85@gated-at.bofh.it> <u9DdL-3gc-17@gated-at.bofh.it> <u9Glj-55w-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 01, 2017 at 03:26:07PM +0100, Mark Rutland wrote:
> On Tue, Aug 01, 2017 at 01:00:14PM +0200, Christoffer Dall wrote:
> > On Wed, Jul 19, 2017 at 05:01:31PM +0100, Mark Rutland wrote:
> > > When pointer authentication is supported, a guest may wish to use it.
> > > This patch adds the necessary KVM infrastructure for this to work, with
> > > a semi-lazy context switch of the pointer auth state.
> > > 
> > > When we schedule a vcpu, we disable guest usage of pointer
> > > authentication instructions and accesses to the keys. While these are
> > > disabled, we avoid context-switching the keys. When we trap the guest
> > > trying to use pointer authentication functionality, we change to eagerly
> > > context-switching the keys, and enable the feature. The next time the
> > > vcpu is scheduled out/in, we start again.
> > > 
> > > This is sufficient for systems with uniform pointer authentication
> > > support. For systems with mismatched support, it will be necessary to
> > 
> > What is mismatched support?  You mean systems where one CPU has ptrauth
> > and another one doesn't (or if they both have it but in different ways)?
> 
> Both! Any case where the support is not uniform across all CPUs.
> 
> A CPU can implement address auth and/or generic auth, and either may use
> an architected algorithm or an IMP DEF algorithm.
> 
> Even if all CPUs report an IMP DEF algorithm, the particular algorithm
> may differ across CPUs.

I know you don't like it, but I think we should resort to MIDR at that point
because otherwise IMP DEF algorithms will never be used by Linux and people
will complain.

Will

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers Christoffer Dall <cdall@linaro.org> - 2017-08-01 13:10 +0200
  Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers Mark Rutland <mark.rutland@arm.com> - 2017-08-01 16:30 +0200
    Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers Will Deacon <will.deacon@arm.com> - 2017-08-01 16:40 +0200
    Re: [PATCH 10/11] arm64/kvm: context-switch ptrauth registers Christoffer Dall <christoffer.dall@linaro.org> - 2017-08-01 19:10 +0200

csiph-web