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:	Thu, 10 Oct 2013 13:56:17 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Jakub Jelinek <jakub@...hat.com>, Oleg Nesterov <oleg@...hat.com>,
	Fengguang Wu <fengguang.wu@...el.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Richard Henderson <rth@...ddle.net>
Subject: Re: [PATCH, -v2] compiler/gcc4: Add quirk for 'asm goto'
 miscompilation bug

On Thu, Oct 10, 2013 at 10:55:06AM +0200, Ingo Molnar wrote:
> +/*
> + * GCC 'asm goto' miscompiles certain code sequences:
> + *
> + *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
> + *
> + * Work it around via quirk suggested by Jakub Jelinek.
> + * Fixed in GCC 4.8.2 and later versions.
> + */
> +#if GCC_VERSION <= 40801

We didn't do version checks for CC_HAVE_ASM_GOTO because of vendor
backports; can't we detect this in the same way?

> +# define __asm_goto(vol, x...) do { asm vol goto(x); asm (""); } while (0)
> +#else
> +# define __asm_goto(vol, x...) do { asm vol goto(x); } while (0)
> +#endif

This places the asm("") in the fallthrough case; but Jakub wrote:

> @@ -8,6 +8,7 @@ foo (int a, int b)
>    asm volatile goto ("bts $1, %0; jc %l[lab]" : : "m" (b) : "memory" : lab);
>    return 0;
>  lab:
> +  asm ("");
>    return 0;
>  }

Which places the asm ("") after the label, these two are not the same.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ