All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Ben Copeland <ben.copeland@linaro.org>
Cc: dan.carpenter@linaro.org, lkft-triage@lists.linaro.org,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] vma05: Fix false positives from stripped system libraries
Date: Wed, 30 Jul 2025 09:52:54 +0200	[thread overview]
Message-ID: <20250730075254.GA50561@pevik> (raw)
In-Reply-To: <20250730071342.817400-1-ben.copeland@linaro.org>

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

  reply	other threads:[~2025-07-30  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-07-31  8:23   ` Ben Copeland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250730075254.GA50561@pevik \
    --to=pvorel@suse.cz \
    --cc=ben.copeland@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.