Re: [PATCH 4/4] selftests: livepatch: Add information about minimum kernel support
From: Petr Mladek
Date: Fri Jun 05 2026 - 11:21:08 EST
On Sun 2026-05-24 20:50:33, Marcos Paulo de Souza wrote:
> The current livepatch selftests are compatible with kernel 4.12, so add
> a note about it for future developers willing to contribute with new
> tests.
>
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>
> ---
> tools/testing/selftests/livepatch/README | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/livepatch/README b/tools/testing/selftests/livepatch/README
> index d2035dd64a2b..293f4730b927 100644
> --- a/tools/testing/selftests/livepatch/README
> +++ b/tools/testing/selftests/livepatch/README
> @@ -54,3 +54,6 @@ check_result(). The latter function greps the kernel's ring buffer for
> those strings for result comparison. Other utility functions include
> general module loading and livepatch loading helpers (waiting for patch
> transitions, sysfs entries, etc.)
> +
> +All new tests and test modules MUST be compatible with kernel version 4.12 and
> +later, including current upstream kernels.
I do not have a good feeling about this. One thing is to accept fixes/workarounds
for the backward compatibility. But forcing contributors to keep the
compatibility might be too demanding.
I might be wrong. But I think that you would need a pretty old
userspace to run 4.12 kernel. And most people could not get it easily.
Honestly, I though more about this effort and I am not sure how
complicated it would be in the long term.
I know about two pending patchsets which are breaking the backward
compatibility:
+ Better integration of callbacks and shadow variables with the states API [1]
+ Introduce replace set support [2]
Especially the 1st one is a pain. It is 19th patches and most of them
are fixing/reworking the selftests. I think that it was the reason
why nobody reviewed it yet. And it might be even worse if we wanted
to make it backward compatible.
[1] https://lore.kernel.org/all/20250115082431.5550-1-pmladek@xxxxxxxx/
[2] https://lore.kernel.org/all/20260529034542.68766-1-laoar.shao@xxxxxxxxx/
Best Regards,
Petr