Re: [PATCH] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-25 Thread Nathan Chancellor
On Thu, Jul 23, 2020 at 09:17:15AM +0100, Marc Zyngier wrote: > Hi Nathan, > > On 2020-07-23 03:51, Nathan Chancellor wrote: > > On Wed, Jul 22, 2020 at 05:22:31PM +0100, Marc Zyngier wrote: > > > So far, vcpu_has_ptrauth() is implemented in terms of > > > system_supports_*_auth() > > > calls,

Re: [PATCH] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-23 Thread Nathan Chancellor
On Wed, Jul 22, 2020 at 05:22:31PM +0100, Marc Zyngier wrote: > So far, vcpu_has_ptrauth() is implemented in terms of system_supports_*_auth() > calls, which are declared "inline". In some specific conditions (clang > and SCS), the "inline" very much turns into an "out of line", which > leads to a

Re: [PATCH] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-23 Thread Marc Zyngier
Hi Nathan, On 2020-07-23 03:51, Nathan Chancellor wrote: On Wed, Jul 22, 2020 at 05:22:31PM +0100, Marc Zyngier wrote: So far, vcpu_has_ptrauth() is implemented in terms of system_supports_*_auth() calls, which are declared "inline". In some specific conditions (clang and SCS), the "inline"

Re: [PATCH] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-22 Thread Zenghui Yu
Hi Nathan, On 2020/7/23 10:51, Nathan Chancellor wrote: For the future, is there an easy way to tell which type of system I am using (nVHE or VHE)? afaict the easiest way is looking at the kernel log and you will find something like "{VHE,Hyp} mode initialized successfully". I can get the

[PATCH] KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions

2020-07-22 Thread Marc Zyngier
So far, vcpu_has_ptrauth() is implemented in terms of system_supports_*_auth() calls, which are declared "inline". In some specific conditions (clang and SCS), the "inline" very much turns into an "out of line", which leads to a fireworks when this predicate is evaluated on a non-VHE system (right