[PATCH 8/8] selftests: livepatch: functions.sh: Extend check for taint flag kernel message

Marcos Paulo de Souza posted 8 patches 3 weeks, 3 days ago
[PATCH 8/8] selftests: livepatch: functions.sh: Extend check for taint flag kernel message
Posted by Marcos Paulo de Souza 3 weeks, 3 days ago
On SLE kernels there is a warning when a livepatch is disabled:
  livepatch: attempt to disable live patch test_klp_livepatch, setting
  NO_SUPPORT taint flag

Extend lightly the detection of messages when a livepatch is disabled
to cover this case as well.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 tools/testing/selftests/livepatch/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index 781346d6e94e0..73a1d4e6acaeb 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -324,7 +324,7 @@ function check_result {
 	# - filter out dmesg timestamp prefixes
 	result=$(dmesg | awk -v last_dmesg="$LAST_DMESG" 'p; $0 == last_dmesg { p=1 }' | \
 		 grep -e 'livepatch:' -e 'test_klp' | \
-		 grep -v '\(tainting\|taints\) kernel' | \
+		 grep -v '\(tainting\|taints\|taint\) \(kernel\|flag\)' | \
 		 sed 's/^\[[ 0-9.]*\] //' | \
 		 sed 's/^\[[ ]*[CT][0-9]*\] //')
 

-- 
2.52.0
Re: [PATCH 8/8] selftests: livepatch: functions.sh: Extend check for taint flag kernel message
Posted by Petr Mladek 2 weeks, 3 days ago
On Fri 2026-03-13 17:58:39, Marcos Paulo de Souza wrote:
> On SLE kernels there is a warning when a livepatch is disabled:
>   livepatch: attempt to disable live patch test_klp_livepatch, setting
>   NO_SUPPORT taint flag
> 
> Extend lightly the detection of messages when a livepatch is disabled
> to cover this case as well.
> 
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> ---
>  tools/testing/selftests/livepatch/functions.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index 781346d6e94e0..73a1d4e6acaeb 100644
> --- a/tools/testing/selftests/livepatch/functions.sh
> +++ b/tools/testing/selftests/livepatch/functions.sh
> @@ -324,7 +324,7 @@ function check_result {
>  	# - filter out dmesg timestamp prefixes
>  	result=$(dmesg | awk -v last_dmesg="$LAST_DMESG" 'p; $0 == last_dmesg { p=1 }' | \
>  		 grep -e 'livepatch:' -e 'test_klp' | \
> -		 grep -v '\(tainting\|taints\) kernel' | \
> +		 grep -v '\(tainting\|taints\|taint\) \(kernel\|flag\)' | \
>  		 sed 's/^\[[ 0-9.]*\] //' | \
>  		 sed 's/^\[[ ]*[CT][0-9]*\] //')

With the upstream maintainer hat on:

I am afraid that we could not take this. It is needed only because
of another out-of-tree patch. It does not describe the upstream
behavior. It might even hide problems.

We should maintain a SUSE-specific patch against the selftests
as a counter-part for the patch adding the tainting.

Or we could try to upstream the patch which adds the tainting.
Well, we might want to limit the tainting only to livepatches
with callbacks or shadow variables. IMHO, only these features
are source of potential problems.

Best Rerards,
Petr
Re: [PATCH 8/8] selftests: livepatch: functions.sh: Extend check for taint flag kernel message
Posted by Marcos Paulo de Souza 2 weeks, 3 days ago
On Fri, 2026-03-20 at 14:26 +0100, Petr Mladek wrote:
> On Fri 2026-03-13 17:58:39, Marcos Paulo de Souza wrote:
> > On SLE kernels there is a warning when a livepatch is disabled:
> >   livepatch: attempt to disable live patch test_klp_livepatch,
> > setting
> >   NO_SUPPORT taint flag
> > 
> > Extend lightly the detection of messages when a livepatch is
> > disabled
> > to cover this case as well.
> > 
> > Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> > ---
> >  tools/testing/selftests/livepatch/functions.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/livepatch/functions.sh
> > b/tools/testing/selftests/livepatch/functions.sh
> > index 781346d6e94e0..73a1d4e6acaeb 100644
> > --- a/tools/testing/selftests/livepatch/functions.sh
> > +++ b/tools/testing/selftests/livepatch/functions.sh
> > @@ -324,7 +324,7 @@ function check_result {
> >  	# - filter out dmesg timestamp prefixes
> >  	result=$(dmesg | awk -v last_dmesg="$LAST_DMESG" 'p; $0 ==
> > last_dmesg { p=1 }' | \
> >  		 grep -e 'livepatch:' -e 'test_klp' | \
> > -		 grep -v '\(tainting\|taints\) kernel' | \
> > +		 grep -v '\(tainting\|taints\|taint\)
> > \(kernel\|flag\)' | \
> >  		 sed 's/^\[[ 0-9.]*\] //' | \
> >  		 sed 's/^\[[ ]*[CT][0-9]*\] //')
> 
> With the upstream maintainer hat on:
> 
> I am afraid that we could not take this. It is needed only because
> of another out-of-tree patch. It does not describe the upstream
> behavior. It might even hide problems.
> 
> We should maintain a SUSE-specific patch against the selftests
> as a counter-part for the patch adding the tainting.
> 
> Or we could try to upstream the patch which adds the tainting.
> Well, we might want to limit the tainting only to livepatches
> with callbacks or shadow variables. IMHO, only these features
> are source of potential problems.

TBH I wasn't expecting this patch to be merged, but I send it anyway
since the change wasn't big. But I agree, we can drop this one from the
patchset.

> 
> Best Rerards,
> Petr
Re: [PATCH 8/8] selftests: livepatch: functions.sh: Extend check for taint flag kernel message
Posted by Miroslav Benes 2 weeks, 3 days ago
On Fri, 13 Mar 2026, Marcos Paulo de Souza wrote:

> On SLE kernels there is a warning when a livepatch is disabled:
>   livepatch: attempt to disable live patch test_klp_livepatch, setting
>   NO_SUPPORT taint flag
> 
> Extend lightly the detection of messages when a livepatch is disabled
> to cover this case as well.

s/lightly/slightly/ ?

Miroslav