2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

livepatch: Add comment to clarify klp_add_nops()

Add detailed comments to clarify the purpose of klp_add_nops() function.
These comments are based on Petr's explanation[0].

Link: https://lore.kernel.org/all/Z6XUA7D0eU_YDMVp@pathway.suse.cz/ [0]
Suggested-by: Petr Mladek <pmladek@suse.com>
Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250227024733.16989-2-laoar.shao@gmail.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
Yafang Shao 2025-02-27 10:47:32 +08:00 committed by Petr Mladek
parent 336088234e
commit 376c879e04

View File

@ -601,9 +601,12 @@ static int klp_add_object_nops(struct klp_patch *patch,
} }
/* /*
* Add 'nop' functions which simply return to the caller to run * Add 'nop' functions which simply return to the caller to run the
* the original function. The 'nop' functions are added to a * original function.
* patch to facilitate a 'replace' mode. *
* They are added only when the atomic replace mode is used and only for
* functions which are currently livepatched but are no longer included
* in the new livepatch.
*/ */
static int klp_add_nops(struct klp_patch *patch) static int klp_add_nops(struct klp_patch *patch)
{ {