All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries
@ 2025-07-30  7:13 Ben Copeland
  2025-07-30  7:52 ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Copeland @ 2025-07-30  7:13 UTC (permalink / raw)
  To: ltp; +Cc: dan.carpenter, lkft-triage

The vma05 test was producing false positive failures by flagging any
"??" symbols in gdb backtraces as vDSO kernel bugs, including those
from normal stripped system libraries.

This caused widespread false failures in production environments where
system libraries like libc.so.6 are typically stripped of debug symbols.

The fix filters out "??" symbols that originate from system libraries
(paths containing "/lib/" or "/usr/lib/") while still detecting genuine
unresolved symbols in application code that could indicate real vDSO bugs.

Signed-off-by: Ben Copeland <ben.copeland@linaro.org>
---
 testcases/kernel/mem/vma/vma05.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index c560eecbc..09757a0fe 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -64,11 +64,14 @@ tst_test()
 	TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
 		vma05_vdso ./core* 2> /dev/null)
 
-	if echo "$TRACE" | grep -qF "??"; then
-		tst_res TFAIL "[vdso] bug not patched"
+	# Only check for ?? symbols in application code, not system libraries
+	APP_UNKNOWN=$(echo "$TRACE" | grep -F "??" | grep -v "from /lib/" | grep -v "from /usr/lib/")
+	if [ -n "$APP_UNKNOWN" ]; then
+		tst_res TFAIL "[vdso] bug not patched - unknown symbols in application code"
 	else
 		tst_res TPASS "[vdso] backtrace complete"
 	fi
+	fi
 }
 
 . tst_run.sh
-- 
2.50.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-31  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30  7:13 [LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries Ben Copeland
2025-07-30  7:52 ` Petr Vorel
2025-07-31  8:23   ` Ben Copeland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.