[lkml]   [2019]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC PATCH 0/2] livepatch: Clear relocation targets on a module removal
The second attempt to resolve the issue reported by Josh last year [1]
and also reported earlier this year again [2]. The first attempt [3]
tried to deny the patched modules to be removed. It did not solve the
issue completely. It would be possible, but we decided to try the
arch-specific approach first, which I am sending now.

Sending early as RFC, because I am leaving on holiday tomorrow and it
would be great if you took a look meanwhile.

- I decided not to CC the arch maintainers yet. If we decide that the
approach is feasible first on our livepatch side, I will split the
second patch and resend properly.
- the first patch could go in regardless the rest, I guess.
- I am not sure about the placement in
klp_cleanup_module_patches_limited(). I think it is the best possible,
but I would really appreciate double-checking.
- I am also not sure about the naming, so ideas also welcome

Lightly tested on both x86_64 and ppc64le and it looked ok.

[1] 20180602161151.apuhs2dygsexmcg2@treble

Miroslav Benes (2):
livepatch: Nullify obj->mod in klp_module_coming()'s error path
livepatch: Clear relocation targets on a module removal

arch/powerpc/kernel/Makefile | 1 +
arch/powerpc/kernel/livepatch.c | 75 +++++++++++++++++++++++++++++++++
arch/powerpc/kernel/module.h | 15 +++++++
arch/powerpc/kernel/module_64.c | 7 +--
arch/x86/kernel/livepatch.c | 67 +++++++++++++++++++++++++++++
include/linux/livepatch.h | 5 +++
kernel/livepatch/core.c | 18 +++++---
7 files changed, 177 insertions(+), 11 deletions(-)
create mode 100644 arch/powerpc/kernel/livepatch.c
create mode 100644 arch/powerpc/kernel/module.h


 \ /
  Last update: 2019-07-19 14:28    [W:0.113 / U:6.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site