* [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
* Re: [LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries
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
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-07-30 7:52 UTC (permalink / raw)
To: Ben Copeland; +Cc: dan.carpenter, lkft-triage, ltp
Hi Ben,
> 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.
Sounds reasonable, but I would prefer Cyril or Jan acked this.
> 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/")
You can pass more regexes to grep to save one pipe:
APP_UNKNOWN=$(echo "$TRACE" | grep -F "??" | grep -v -e "from /lib/" -e "from /usr/lib/")
(or have single more complicated regexp).
> + 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
Suggested changes.
With that you can add:
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
+++ testcases/kernel/mem/vma/vma05.sh
@@ -65,13 +65,12 @@ tst_test()
vma05_vdso ./core* 2> /dev/null)
# 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/")
+ APP_UNKNOWN=$(echo "$TRACE" | grep -F "??" | grep -v -e "from /lib/" -e "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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries
2025-07-30 7:52 ` Petr Vorel
@ 2025-07-31 8:23 ` Ben Copeland
0 siblings, 0 replies; 3+ messages in thread
From: Ben Copeland @ 2025-07-31 8:23 UTC (permalink / raw)
To: Petr Vorel; +Cc: dan.carpenter, lkft-triage, ltp
Hi Petr,
On Wed, 30 Jul 2025 at 08:53, Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Ben,
>
> > 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.
>
> Sounds reasonable, but I would prefer Cyril or Jan acked this.
>
> > 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/")
> You can pass more regexes to grep to save one pipe:
>
> APP_UNKNOWN=$(echo "$TRACE" | grep -F "??" | grep -v -e "from /lib/" -e "from /usr/lib/")
>
> (or have single more complicated regexp).
Great suggestion! Will respin a v2 patch now.
>
> > + 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
I'll remove this too!
Regards,
Ben
>
> Suggested changes.
>
> With that you can add:
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr
>
> +++ testcases/kernel/mem/vma/vma05.sh
> @@ -65,13 +65,12 @@ tst_test()
> vma05_vdso ./core* 2> /dev/null)
>
> # 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/")
> + APP_UNKNOWN=$(echo "$TRACE" | grep -F "??" | grep -v -e "from /lib/" -e "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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [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.