Re: [PATCH v2 1/2] x86/vdso: fix flip/flop vdso build bug

From: Masahiro Yamada
Date: Fri Jul 12 2019 - 10:55:28 EST


On Fri, Jul 12, 2019 at 7:16 PM Naohiro Aota <naohiro.aota@xxxxxxx> wrote:
>
> Two consecutive "make" on an already compiled kernel tree will show
> different behavior:
>
> $ make
> CALL scripts/checksyscalls.sh
> CALL scripts/atomic/check-atomics.sh
> DESCEND objtool
> CHK include/generated/compile.h
> VDSOCHK arch/x86/entry/vdso/vdso64.so.dbg
> VDSOCHK arch/x86/entry/vdso/vdso32.so.dbg
> Kernel: arch/x86/boot/bzImage is ready (#3)
> Building modules, stage 2.
> MODPOST 12 modules
>
> $ make
> make
> CALL scripts/checksyscalls.sh
> CALL scripts/atomic/check-atomics.sh
> DESCEND objtool
> CHK include/generated/compile.h
> VDSO arch/x86/entry/vdso/vdso64.so.dbg
> OBJCOPY arch/x86/entry/vdso/vdso64.so
> VDSO2C arch/x86/entry/vdso/vdso-image-64.c
> CC arch/x86/entry/vdso/vdso-image-64.o
> VDSO arch/x86/entry/vdso/vdso32.so.dbg
> OBJCOPY arch/x86/entry/vdso/vdso32.so
> VDSO2C arch/x86/entry/vdso/vdso-image-32.c
> CC arch/x86/entry/vdso/vdso-image-32.o
> AR arch/x86/entry/vdso/built-in.a
> AR arch/x86/entry/built-in.a
> AR arch/x86/built-in.a
> GEN .version
> CHK include/generated/compile.h
> UPD include/generated/compile.h
> CC init/version.o
> AR init/built-in.a
> LD vmlinux.o
> <snip>
>
> This is causing "LD vmlinux" once every two times even without any
> modifications. This is the same bug fixed in commit 92a4728608a8
> ("x86/boot: Fix if_changed build flip/flop bug"). We cannot use two
> "if_changed" in one target. Fix this build bug by merging two commands into
> one function.
>
> Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Fixes: 7ac870747988 ("x86/vdso: Switch to generic vDSO implementation")
> Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>
> ---

Reviewed-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>


--
Best Regards
Masahiro Yamada