Re: [PATCH v6 2/2] x86/refcount: Implement fast refcount overflow protection

From: Kees Cook
Date: Wed Jul 19 2017 - 19:15:18 EST


On Wed, Jul 19, 2017 at 12:37 PM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> +#define ASM_UNREACHABLE \
> + "999: .pushsection .discard.unreachable\n\t" \
> + ".long 999b - .\n\t" \
> + ".popsection\n\t"

Will this end up running into the same bug fixed with
3d1e236022cc1426b0834565995ddee2ca231cee and the __LINE__ macro? I
could tell under which conditions gcc would do this kind of merging...

-Kees

--
Kees Cook
Pixel Security