[PATCH 1/1] livepatch: Rename KLP_* to KLP_TRANSITION_*

2024-05-06 Thread zhangwarden
From: Wardenjohn The original macros of KLP_* is about the state of the transition. Rename macros of KLP_* to KLP_TRANSITION_* to fix the confusing description of klp transition state. Signed-off-by: Wardenjohn --- include/linux/livepatch.h | 6 ++-- init/init_task.c | 2 +-

[PATCH 0/1] *** Rename KLP_* to KLP_TRANSITION_* ***

2024-05-06 Thread zhangwarden
From: Wardenjohn This is the v3 of commit " livepatch: Rename KLP_* to KLP_TRANSITION_* " with the suggestion of @Josh v1 -> v2 : Use KLP_TRANSITION_* to replace marcos KLP_* v2 -> v3 : Remove the unnecessary comment and fix one typo in the code. Wardenjohn (1): livepatch: Rename KLP_* to

[PATCH 1/1] livepatch: Rename KLP_* to KLP_TRANSITION_*

2024-05-06 Thread zhangwarden
From: Wardenjohn The original macros of KLP_* is about the state of the transition. Rename macros of KLP_* to KLP_TRANSITION_* to fix the confusing description of klp transition state. Signed-off-by: Wardenjohn --- include/linux/livepatch.h | 6 ++-- init/init_task.c | 2 +-

[PATCH 0/1] *** Replace KLP_* to KLP_TRANSITION_* ***

2024-05-06 Thread zhangwarden
From: Wardenjohn As the previous described, renaming variables is not a good idead becase it will break userspace. This patch rename macros of KLP_* to KLP_TRANSITION_* to fix the confusing description of the klp transition state. With this marcos renamed, comments are not necessary at this

[PATCH] livepatch.h: Add comment to klp transition state

2024-04-29 Thread zhangwarden
From: Wardenjohn livepatch.h use KLP_UNDEFINED\KLP_UNPATCHED\KLP_PATCHED for klp transition state. When livepatch is ready but idle, using KLP_UNDEFINED seems very confusing. In order not to introduce potential risks to kernel, just update comment to these state. --- include/linux/livepatch.h

[PATCH] livepatch: Add KLP_IDLE state

2024-04-01 Thread zhangwarden
From: Wardenjohn In livepatch, using KLP_UNDEFINED is seems to be confused. When kernel is ready, livepatch is ready too, which state is idle but not undefined. What's more, if one livepatch process is finished, the klp state should be idle rather than undefined. Therefore, using KLP_IDLE to

[PATCH] livepatch: Add KLP_IDLE state

2024-04-01 Thread zhangwarden
From: Wardenjohn --- include/linux/livepatch.h | 1 + kernel/livepatch/patch.c | 2 +- kernel/livepatch/transition.c | 24 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index