diff options
author | 2015-08-25 19:47:56 +0000 | |
---|---|---|
committer | 2015-08-25 19:47:56 +0000 | |
commit | 1883e91fbbad059f9e4975fdbdd8b055994b3823 (patch) | |
tree | 25a1c79b783e37b01305b7c74766d3c0457b5dac | |
parent | unify versions, so they are easier to diff. (diff) | |
download | wireguard-openbsd-1883e91fbbad059f9e4975fdbdd8b055994b3823.tar.xz wireguard-openbsd-1883e91fbbad059f9e4975fdbdd8b055994b3823.zip |
In sys_kbind(), pages from uvm_map_extract() must be written to with kcopy()
ok kettenis@
-rw-r--r-- | sys/uvm/uvm_mmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 2b7f0c2c463..e0860d19275 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.112 2015/07/20 22:41:41 miod Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.113 2015/08/25 19:47:56 guenther Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -1236,7 +1236,9 @@ sys_kbind(struct proc *p, void *v, register_t *retval) } /* do the update */ - memcpy((char *)kva + pageoffset, data, paramp[i].kb_size); + if ((error = kcopy(data, (char *)kva + pageoffset, + paramp[i].kb_size))) + break; data += paramp[i].kb_size; } |