Skip to content

Commit 11d2c48

Browse files
author
Alex Shi
committed
Merge branch 'v4.4/topic/mm-kaslr-pax_usercopy' into linux-linaro-lsk-v4.4
2 parents 1408a46 + 351068f commit 11d2c48

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

fs/proc/kcore.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,12 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
516516
if (kern_addr_valid(start)) {
517517
unsigned long n;
518518

519-
n = copy_to_user(buffer, (char *)start, tsz);
519+
/*
520+
* Using bounce buffer to bypass the
521+
* hardened user copy kernel text checks.
522+
*/
523+
memcpy(buf, (char *) start, tsz);
524+
n = copy_to_user(buffer, buf, tsz);
520525
/*
521526
* We cannot distinguish between fault on source
522527
* and fault on destination. When this happens

0 commit comments

Comments
 (0)