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]
Message-ID: <20181016062556.GA56841@gmail.com>
Date:   Tue, 16 Oct 2018 08:25:56 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Subject: Re: [PATCH] x86: modify inline asm constraints in __cmpxchg_double()


* Juergen Gross <jgross@...e.com> wrote:

> Some gcc versions seem to have problems with the constraints in
> __cmpxchg_double() as they suddenly issue a build error when random
> parts of sources calling __cmpxchg_double() are modified, like e.g.
> slub.c. This has been observed on Debian systems only so far.
> 
> Using "0" instead of "a" in the input constraints has the same
> semantics while avoiding that build error.
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
> I should note that I have observed gcc hangs instead sometimes. Not
> taking any patches modifying users of __cmpxchg_double() due to a gcc
> bug which seems to be distro-specific is a bad move IMO.
> 
> I'd rather make it clear from build behavior that this is a bug in gcc
> by letting the build hang instead of throwing error warnings not in any
> way related to changes in the code.
> 
> The gcc bug is filed under:
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908154
> ---
>  arch/x86/include/asm/cmpxchg.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/cmpxchg.h b/arch/x86/include/asm/cmpxchg.h
> index a55d79b233d3..b3b4d61a8969 100644
> --- a/arch/x86/include/asm/cmpxchg.h
> +++ b/arch/x86/include/asm/cmpxchg.h
> @@ -245,7 +245,7 @@ extern void __add_wrong_size(void)
>  	asm volatile(pfx "cmpxchg%c4b %2; sete %0"			\
>  		     : "=a" (__ret), "+d" (__old2),			\
>  		       "+m" (*(p1)), "+m" (*(p2))			\
> -		     : "i" (2 * sizeof(long)), "a" (__old1),		\
> +		     : "i" (2 * sizeof(long)), "0" (__old1),		\
>  		       "b" (__new1), "c" (__new2));			\

This got changed to +a in -tip:

  c808c09b527c: x86/asm: Use CC_SET()/CC_OUT() in __cmpxchg_double()

Mind sending a patch on top of -tip?

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ