Re: [PATCH 20/24] objtool: Another static block fail

From: Josh Poimboeuf
Date: Mon Jan 29 2018 - 17:53:07 EST


On Tue, Jan 23, 2018 at 04:25:59PM +0100, Peter Zijlstra wrote:
> I've observed GCC generate:
>
> sym:
> NOP/JMP 1f (static_branch)
> JMP 2f
> 1: /* crud */
> JMP 3f
> 2: /* other crud */
>
> 3: RETQ
>
>
> This means we need to follow unconditional jumps; be conservative and
> only follow if its a unique jump.
>
> (I've not yet figured out which CONFIG option is responsible for this,
> a normal defconfig build does not generate crap like this)
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Any chance we can just add a compiler barrier to the assertion macro and
avoid all this grow_static_blocks() mess? It seems a bit... fragile.

--
Josh