From 411fd570f2c6c8c0625e568c318636510eb7c0c0 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Thu, 1 May 2014 12:35:10 -0500 Subject: [PATCH] kmod/core: update a few comments - update the file description comment to be a little more accurate and concise - s/trampoline/ftrace handler/ --- kmod/core/core.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/kmod/core/core.c b/kmod/core/core.c index ddfc6ef..8da6036 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -16,19 +16,19 @@ * along with this program; if not, see . */ -/* Contains the code for the core kpatch module. Each patch module registers - * with this module to redirect old functions to new functions. +/* + * kpatch core module * - * Each patch module can contain one or more new functions. This information - * is contained in the .patches section of the patch module. For each function - * patched by the module we must: + * Patch modules register with this module to redirect old functions to new + * functions. + * + * For each function patched by the module we must: * - Call stop_machine - * - Ensure that no execution thread is currently in the old function (or has - * it in the call stack) - * - Add the new function address to the kpatch_funcs table + * - Ensure that no task has the old function in its call stack + * - Add the new function address to kpatch_func_hash * * After that, each call to the old function calls into kpatch_ftrace_handler() - * which finds the new function in the kpatch_funcs table and updates the + * which finds the new function in kpatch_func_hash table and updates the * return instruction pointer so that ftrace will return to the new function. */ @@ -407,7 +407,7 @@ int kpatch_register(struct kpatch_module *kpmod) } } - /* Register the ftrace trampoline if it hasn't been done already. */ + /* Register the ftrace handler if it hasn't been done already. */ if (!kpatch_num_registered) { ret = register_ftrace_function(&kpatch_ftrace_ops); if (ret) { @@ -424,7 +424,7 @@ int kpatch_register(struct kpatch_module *kpmod) /* * Idle the CPUs, verify activeness safety, and atomically make the new - * functions visible to the trampoline. + * functions visible to the ftrace handler. */ ret = stop_machine(kpatch_apply_patch, kpmod, NULL);