diff options
| author | Maxime Ripard <maxime@cerno.tech> | 2022-04-05 11:37:03 +0200 |
|---|---|---|
| committer | Maxime Ripard <maxime@cerno.tech> | 2022-04-05 11:37:03 +0200 |
| commit | cf5c5763eb531ff5120111ad300126e926fb5a56 (patch) | |
| tree | 41e3d49ad46f08fd6025264451390c7dc204303a /kernel/livepatch/patch.c | |
| parent | 8047f98c8958d0f0c29882298ec293ff09ffea92 (diff) | |
| parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
| download | cachepc-linux-cf5c5763eb531ff5120111ad300126e926fb5a56.tar.gz cachepc-linux-cf5c5763eb531ff5120111ad300126e926fb5a56.zip | |
Merge drm/drm-fixes into drm-misc-fixes
Let's start the 5.18 fixes cycle.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'kernel/livepatch/patch.c')
| -rw-r--r-- | kernel/livepatch/patch.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/livepatch/patch.c b/kernel/livepatch/patch.c index fe316c021d73..c172bf92b576 100644 --- a/kernel/livepatch/patch.c +++ b/kernel/livepatch/patch.c @@ -124,19 +124,6 @@ unlock: ftrace_test_recursion_unlock(bit); } -/* - * Convert a function address into the appropriate ftrace location. - * - * Usually this is just the address of the function, but on some architectures - * it's more complicated so allow them to provide a custom behaviour. - */ -#ifndef klp_get_ftrace_location -static unsigned long klp_get_ftrace_location(unsigned long faddr) -{ - return faddr; -} -#endif - static void klp_unpatch_func(struct klp_func *func) { struct klp_ops *ops; @@ -153,8 +140,7 @@ static void klp_unpatch_func(struct klp_func *func) if (list_is_singular(&ops->func_stack)) { unsigned long ftrace_loc; - ftrace_loc = - klp_get_ftrace_location((unsigned long)func->old_func); + ftrace_loc = ftrace_location((unsigned long)func->old_func); if (WARN_ON(!ftrace_loc)) return; @@ -186,8 +172,7 @@ static int klp_patch_func(struct klp_func *func) if (!ops) { unsigned long ftrace_loc; - ftrace_loc = - klp_get_ftrace_location((unsigned long)func->old_func); + ftrace_loc = ftrace_location((unsigned long)func->old_func); if (!ftrace_loc) { pr_err("failed to find location for function '%s'\n", func->old_name); |
