From: Yafang Shao <laoar.shao@gmail.com>
To: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
pmladek@suse.com, joe.lawrence@redhat.com, song@kernel.org
Cc: live-patching@vger.kernel.org, Yafang Shao <laoar.shao@gmail.com>
Subject: [RFC PATCH 0/6] livepatch: Introduce replace set support
Date: Wed, 13 May 2026 22:33:15 +0800 [thread overview]
Message-ID: <20260513143321.26185-1-laoar.shao@gmail.com> (raw)
We previously proposed a BPF+livepatch method to enable rapid
experimentation with new kernel features without interrupting production
workloads:
https://lore.kernel.org/live-patching/20260402092607.96430-1-laoar.shao@gmail.com/
In the resulting discussion, Song and Petr suggested adding a "replace set"
to support scenarios where specific livepatches can be selectively replaced
or skipped.
- Patch #1:
Adds replace set support for livepatch functions.
- Patch #2~#5:
Derived from Petr's original patchset:
https://lore.kernel.org/all/20250115082431.5550-3-pmladek@suse.com/
All the selftests are not included in this RFC.
Note: Due to a significant refactor in Patch #5, I have omitted Petr's
Signed-off-by for that specific patch. Please let me know if this is not
the preferred approach.
- Patch #6:
Adds replace set support for the shadow variable API.
Petr Mladek (3):
livepatch: Add callbacks for introducing and removing states
livepatch: Allow to handle lifetime of shadow variables using the
livepatch state
livepatch: Remove "data" from struct klp_state
Yafang Shao (3):
livepatch: Support scoped atomic replace using replace set
livepatch: Remove obsolete per-object callbacks
livepatch: Support replace_set in shadow variable API
.../livepatch/cumulative-patches.rst | 17 +-
Documentation/livepatch/livepatch.rst | 23 ++-
include/linux/livepatch.h | 30 ++--
include/linux/livepatch_external.h | 62 ++++---
kernel/livepatch/core.c | 51 ++----
kernel/livepatch/core.h | 33 ----
kernel/livepatch/shadow.c | 70 +++++---
kernel/livepatch/state.c | 165 +++++++++++++++++-
kernel/livepatch/state.h | 8 +
kernel/livepatch/transition.c | 29 +--
scripts/livepatch/init.c | 9 +-
scripts/livepatch/klp-build | 14 +-
tools/include/linux/livepatch_external.h | 62 ++++---
tools/objtool/klp-diff.c | 16 +-
14 files changed, 373 insertions(+), 216 deletions(-)
--
2.47.3
next reply other threads:[~2026-05-13 14:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 14:33 Yafang Shao [this message]
2026-05-13 14:33 ` [RFC PATCH 1/6] livepatch: Support scoped atomic replace using replace set Yafang Shao
2026-05-13 14:33 ` [RFC PATCH 2/6] livepatch: Add callbacks for introducing and removing states Yafang Shao
2026-05-13 14:33 ` [RFC PATCH 3/6] livepatch: Allow to handle lifetime of shadow variables using the livepatch state Yafang Shao
2026-05-13 14:33 ` [RFC PATCH 4/6] livepatch: Remove "data" from struct klp_state Yafang Shao
2026-05-13 14:33 ` [RFC PATCH 5/6] livepatch: Remove obsolete per-object callbacks Yafang Shao
2026-05-13 14:33 ` [RFC PATCH 6/6] livepatch: Support replace_set in shadow variable API Yafang Shao
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=20260513143321.26185-1-laoar.shao@gmail.com \
--to=laoar.shao@gmail.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=song@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox