Re: [PATCH 0/2] livepatch: Do not lose exiting tasks during a transition
From: Ravindran, Binoy
Date: Tue Nov 24 2026 - 10:15:28 EST
Hi Yafang,
Thanks for checking it.
> Is it worth adding yet another separate list for the klp transition?
I don't think so. The exit lists already cover the window we need,
from before exit_notify() until after do_exit() disables preemption,
and any separate list of exiting tasks would need its own insertion
and removal on every task exit.
> If not, I think we should at least make the CONFIG_TASKS_RCU dependency
> explicit:
Agreed. In v7.4, TASKS_RCU defaults to NEED_TASKS_RCU && PREEMPTION.
LIVEPATCH depends on DYNAMIC_FTRACE_WITH_REGS or
DYNAMIC_FTRACE_WITH_ARGS, which need DYNAMIC_FTRACE and therefore
FUNCTION_TRACER, and FUNCTION_TRACER selects NEED_TASKS_RCU. The five
architectures that select HAVE_LIVEPATCH (x86, arm64, powerpc, s390
and loongarch) all select ARCH_HAS_PREEMPT_LAZY, which rules out
PREEMPT_VOLUNTARY, and none of them selects ARCH_NO_PREEMPT, which
PREEMPT_NONE requires. The remaining models all enable PREEMPTION. So
every livepatch kernel already builds TASKS_RCU, and the select changes
no configuration today. It documents the dependency and keeps it if
those defaults change.
I will add it to v2 as a separate patch with your Suggested-by, and
drop the !CONFIG_TASKS_RCU caveat from the changelogs.
Thanks,
Binoy