linux/arch/powerpc/kernel/vdso32
Masahiro Yamada bce74491c3 powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o
vgettimeofday.o is unnecessarily rebuilt. Adding it to 'targets' is not
enough to fix the issue. Kbuild is correctly rebuilding it because the
command line is changed.

PowerPC builds each vdso directory twice; first in vdso_prepare to
generate vdso{32,64}-offsets.h, second as part of the ordinary build
process to embed vdso{32,64}.so.dbg into the kernel.

The problem shows up when CONFIG_PPC_WERROR=y due to the following line
in arch/powerpc/Kbuild:

  subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

In the preparation stage, Kbuild directly visits the vdso directories,
hence it does not inherit subdir-ccflags-y. In the second descend,
Kbuild adds -Werror, which results in the command line flipping
with/without -Werror.

It implies a potential danger; if a more critical flag that would impact
the resulted vdso, the offsets recorded in the headers might be different
from real offsets in the embedded vdso images.

Removing the unneeded second descend solves the problem.

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/linuxppc-dev/87tuslxhry.fsf@mpe.ellerman.id.au/
Link: https://lore.kernel.org/r/20201223171142.707053-1-masahiroy@kernel.org
2021-01-30 22:23:42 +11:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
cacheflush.S powerpc/vdso: Merge __kernel_sync_dicache_p5() into __kernel_sync_dicache() 2020-12-04 01:01:17 +11:00
datapage.S powerpc/vdso: Remove __kernel_datapage_offset 2020-12-04 01:01:18 +11:00
gen_vdso_offsets.sh powerpc/vdso: Retrieve sigtramp offsets at buildtime 2020-12-04 01:01:17 +11:00
getcpu.S powerpc/vdso32: miscellaneous optimisations 2020-01-23 21:31:16 +11:00
gettimeofday.S powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32 2020-12-04 01:01:11 +11:00
Makefile powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o 2021-01-30 22:23:42 +11:00
note.S powerpc: Add build salt to the vDSO 2018-07-18 01:18:05 +09:00
sigtramp.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
vdso32.lds.S powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro 2020-12-04 01:01:20 +11:00
vgettimeofday.c powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32 2020-12-04 01:01:11 +11:00