Commit d93f82b6e0c12a4373f2d04b1f92fcb2d175b62c
Committed by
Martin Schwidefsky
1 parent
f3d0a0d96a
Exists in
master
and in
20 other branches
[S390] maccess: add weak attribute to probe_kernel_write
probe_kernel_write() gets used to write to the kernel address space. E.g. to patch the kernel (kgdb, ftrace, kprobes...). Some architectures however enable write protection for the kernel text section, so that writes to this region would fault. This patch allows to specify an architecture specific version of probe_kernel_write() which allows to handle and bypass write protection of the text segment. That way it is still possible to catch random writes to kernel text and explicitly allow writes via this interface. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
mm/maccess.c
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | * Safely write to address @dst from the buffer at @src. If a kernel fault |
40 | 40 | * happens, handle that and return -EFAULT. |
41 | 41 | */ |
42 | -long probe_kernel_write(void *dst, void *src, size_t size) | |
42 | +long notrace __weak probe_kernel_write(void *dst, void *src, size_t size) | |
43 | 43 | { |
44 | 44 | long ret; |
45 | 45 | mm_segment_t old_fs = get_fs(); |