summaryrefslogtreecommitdiffstats
path: root/mm/maccess.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-06-12 10:26:41 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-12 10:27:37 +0200
commitd93f82b6e0c12a4373f2d04b1f92fcb2d175b62c (patch)
tree622e2232d7ccb3ceba765051ecb9895fa068125f /mm/maccess.c
parentf3d0a0d96a7a2b4e1335437f68b3181ab252050a (diff)
downloadop-kernel-dev-d93f82b6e0c12a4373f2d04b1f92fcb2d175b62c.zip
op-kernel-dev-d93f82b6e0c12a4373f2d04b1f92fcb2d175b62c.tar.gz
[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>
Diffstat (limited to 'mm/maccess.c')
-rw-r--r--mm/maccess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/maccess.c b/mm/maccess.c
index ac40796..9073695 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -39,7 +39,7 @@ EXPORT_SYMBOL_GPL(probe_kernel_read);
* Safely write to address @dst from the buffer at @src. If a kernel fault
* happens, handle that and return -EFAULT.
*/
-long probe_kernel_write(void *dst, void *src, size_t size)
+long notrace __weak probe_kernel_write(void *dst, void *src, size_t size)
{
long ret;
mm_segment_t old_fs = get_fs();
OpenPOWER on IntegriCloud