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:   Mon, 11 Jun 2018 10:03:14 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Nadav Amit <namit@...are.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v3 4/9] x86: alternatives: macrofy locks for better
 inlining

On Sun, Jun 10, 2018 at 07:19:06AM -0700, Nadav Amit wrote:
>  #ifdef CONFIG_SMP
> +.macro LOCK_PREFIX_HERE
>  	.pushsection .smp_locks,"a"
>  	.balign 4
> +	.long 671f - .		# offset
>  	.popsection
> +671:
> +.endm
> +
> +.macro LOCK_PREFIX insn:vararg
> +	LOCK_PREFIX_HERE
> +	lock \insn
> +.endm

Hurmph, the only reason we need to preserve that LOCK_PREFIX_HERE thing
is arch_cmpxchg64 in cmpxchg_32.h. Is there really no other way we can
write that one?

I suppose the problem with using LOCK_PREFIX inside the alternative is
that the .smp_locks fixup address gets computed wrong (inside the
alternative_text section instead of in the regular text)?

Oh well..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ