lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Jul 2018 10:19:18 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Waiman Long <longman@...hat.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        x86@...nel.org, Will Deacon <will.deacon@....com>,
        Joe Mario <jmario@...hat.com>
Subject: Re: [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in
 __pv_queued_spin_unlock assembly code

On Tue, Jul 17, 2018 at 04:16:00PM -0400, Waiman Long wrote:
> The LOCK_PREFIX macro should be used in the assembly
> __raw_callee_save___pv_queued_spin_unlock code so that the lock prefix
> can be patched out on UP systems.

True; but does paravirt locking realy make sense on UP guests?

> Signed-off-by: Waiman Long <longman@...hat.com>
> ---
>  arch/x86/include/asm/qspinlock_paravirt.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h
> index 9ef5ee0..159622e 100644
> --- a/arch/x86/include/asm/qspinlock_paravirt.h
> +++ b/arch/x86/include/asm/qspinlock_paravirt.h
> @@ -43,7 +43,7 @@
>  	"push  %rdx;"
>  	"mov   $0x1,%eax;"
>  	"xor   %edx,%edx;"
> -	"lock cmpxchg %dl,(%rdi);"
> +	LOCK_PREFIX "cmpxchg %dl,(%rdi);"
>  	"cmp   $0x1,%al;"
>  	"jne   .slowpath;"
>  	"pop   %rdx;"
> -- 
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ