s390/vdso: check for undefined symbols after build
authorSven Schnelle <svens@linux.ibm.com>
Wed, 21 Jun 2023 07:18:52 +0000 (09:18 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 28 Jun 2023 11:57:09 +0000 (13:57 +0200)
When adding an undefined symbol the build still succeeds, but
userspace is crashing trying to execute vdso because the
undefined symbol is not resolved. Add the check for undefined
symbols to prevent this.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso64/Makefile

index bafd3147eb4efbdc96308a78e9d54cdfe25b82a6..f310e807709d14b12b5a65b0ad907ba99601373c 100644 (file)
@@ -40,8 +40,11 @@ KCSAN_SANITIZE := n
 # Force dependency (incbin is bad)
 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
 
+quiet_cmd_vdso_and_check = VDSO    $@
+      cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check)
+
 $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE
-       $(call if_changed,ld)
+       $(call if_changed,vdso_and_check)
 
 # strip rule for the .so file
 $(obj)/%.so: OBJCOPYFLAGS := -S
index a766d286e15ff6482c29dc2735894088f2aa52c5..279b3bdf98039954af5924f12ce8c0b5f244cb9c 100644 (file)
@@ -44,9 +44,12 @@ KCSAN_SANITIZE := n
 # Force dependency (incbin is bad)
 $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
 
+quiet_cmd_vdso_and_check = VDSO    $@
+      cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check)
+
 # link rule for the .so file, .lds has to be first
 $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj-cvdso64) FORCE
-       $(call if_changed,ld)
+       $(call if_changed,vdso_and_check)
 
 # strip rule for the .so file
 $(obj)/%.so: OBJCOPYFLAGS := -S