diff options
| -rw-r--r-- | Documentation/livepatch/livepatch.txt | 19 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/livepatch.h | 7 |
2 files changed, 0 insertions, 26 deletions
diff --git a/Documentation/livepatch/livepatch.txt b/Documentation/livepatch/livepatch.txt index f5967316deb9..7f04e13ec53d 100644 --- a/Documentation/livepatch/livepatch.txt +++ b/Documentation/livepatch/livepatch.txt | |||
| @@ -329,25 +329,6 @@ The current Livepatch implementation has several limitations: | |||
| 329 | by "notrace". | 329 | by "notrace". |
| 330 | 330 | ||
| 331 | 331 | ||
| 332 | + Anything inlined into __schedule() can not be patched. | ||
| 333 | |||
| 334 | The switch_to macro is inlined into __schedule(). It switches the | ||
| 335 | context between two processes in the middle of the macro. It does | ||
| 336 | not save RIP in x86_64 version (contrary to 32-bit version). Instead, | ||
| 337 | the currently used __schedule()/switch_to() handles both processes. | ||
| 338 | |||
| 339 | Now, let's have two different tasks. One calls the original | ||
| 340 | __schedule(), its registers are stored in a defined order and it | ||
| 341 | goes to sleep in the switch_to macro and some other task is restored | ||
| 342 | using the original __schedule(). Then there is the second task which | ||
| 343 | calls patched__schedule(), it goes to sleep there and the first task | ||
| 344 | is picked by the patched__schedule(). Its RSP is restored and now | ||
| 345 | the registers should be restored as well. But the order is different | ||
| 346 | in the new patched__schedule(), so... | ||
| 347 | |||
| 348 | There is work in progress to remove this limitation. | ||
| 349 | |||
| 350 | |||
| 351 | + Livepatch modules can not be removed. | 332 | + Livepatch modules can not be removed. |
| 352 | 333 | ||
| 353 | The current implementation just redirects the functions at the very | 334 | The current implementation just redirects the functions at the very |
diff --git a/arch/powerpc/include/asm/livepatch.h b/arch/powerpc/include/asm/livepatch.h index a402f7f94896..47a03b9b528b 100644 --- a/arch/powerpc/include/asm/livepatch.h +++ b/arch/powerpc/include/asm/livepatch.h | |||
| @@ -28,13 +28,6 @@ static inline int klp_check_compiler_support(void) | |||
| 28 | return 0; | 28 | return 0; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | static inline int klp_write_module_reloc(struct module *mod, unsigned long | ||
| 32 | type, unsigned long loc, unsigned long value) | ||
| 33 | { | ||
| 34 | /* This requires infrastructure changes; we need the loadinfos. */ | ||
| 35 | return -ENOSYS; | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip) | 31 | static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip) |
| 39 | { | 32 | { |
| 40 | regs->nip = ip; | 33 | regs->nip = ip; |
