[LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries
Ben Copeland
ben.copeland@linaro.org
Thu Jul 31 10:23:21 CEST 2025
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
More information about the ltp
mailing list