Re: [tip: objtool/core] jump_label, x86: Allow short NOPs

From: Josh Poimboeuf
Date: Tue May 18 2021 - 20:44:24 EST


On Tue, May 18, 2021 at 10:24:43PM +0200, Peter Zijlstra wrote:
> OK, willy followed up on IRC, and it turns out there's a kbuild
> dependency missing; then objtool changes we don't rebuild:
>
> arch/x86/entry/vdso/vma.o
>
> even though we should, this led to an unpatched 2 byte jump-label and
> things went sideways. I'm not sure I understand the whole build
> machinery well enough to know where to begin chasing this.
>
> Now, this file is mighty magical, due to:
>
> arch/x86/entry/vdso/Makefile:OBJECT_FILES_NON_STANDARD := y
> arch/x86/entry/vdso/Makefile:OBJECT_FILES_NON_STANDARD_vma.o := n
>
> Maybe that's related.

I'm not exactly thrilled that objtool now has the power to easily brick
a system :-/ Is it really worth it?

Anyway, here's one way to fix it. Maybe Masahiro has a better idea.