linux-next/kernel/livepatch
Wardenjohn 3dae09de40 livepatch: Add stack_order sysfs attribute
Add "stack_order" sysfs attribute which holds the order in which a live
patch module was loaded into the system. A user can then determine an
active live patched version of a function.

cat /sys/kernel/livepatch/livepatch_1/stack_order -> 1

means that livepatch_1 is the first live patch applied

cat /sys/kernel/livepatch/livepatch_module/stack_order -> N

means that livepatch_module is the Nth live patch applied

Suggested-by: Petr Mladek <pmladek@suse.com>
Suggested-by: Miroslav Benes <mbenes@suse.cz>
Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Wardenjohn <zhangwarden@gmail.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lore.kernel.org/r/20241008014856.3729-2-zhangwarden@gmail.com
[pmladek@suse.com: Updated kernel version and date in the ABI documentation.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
2024-12-09 11:44:03 +01:00
..
core.c livepatch: Add stack_order sysfs attribute 2024-12-09 11:44:03 +01:00
core.h livepatch: Keep replaced patches until post_patch callback is called 2019-11-01 13:08:08 +01:00
Kconfig livepatch: Use the default ftrace_ops instead of REGS when ARGS is available 2020-11-13 12:15:28 -05:00
Makefile livepatch: Basic API to track system state changes 2019-11-01 13:08:14 +01:00
patch.c livepatch: Rename KLP_* to KLP_TRANSITION_* 2024-05-09 15:48:01 +02:00
patch.h livepatch: Remove Nop structures when unused 2019-01-11 20:51:24 +01:00
shadow.c Documentation: livepatch: Add livepatch API page 2021-12-23 11:35:53 +01:00
state.c kernel/: fix repeated words in comments 2020-10-16 11:11:19 -07:00
state.h livepatch: Allow to distinguish different version of system state changes 2019-11-01 13:08:19 +01:00
transition.c livepatch: Rename KLP_* to KLP_TRANSITION_* 2024-05-09 15:48:01 +02:00
transition.h livepatch: Remove signal sysfs attribute 2019-01-16 22:09:33 +01:00