summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-04-02 11:02:01 +0000
committerderaadt <deraadt@openbsd.org>2019-04-02 11:02:01 +0000
commite809e0cb35cf542ecf0e5032e88869e385f3746f (patch)
tree454578c891feed6e4dec083d59bf83f0663b9d96
parentretguard has now replaced the stack protector on clang architectures, (diff)
downloadwireguard-openbsd-e809e0cb35cf542ecf0e5032e88869e385f3746f.tar.xz
wireguard-openbsd-e809e0cb35cf542ecf0e5032e88869e385f3746f.zip
BOGO_PC is an invalid userland address, which indicates kbind() is now
disabled in the process. Rather than tying it to KERNBASE, make it simply -1, which means it even more invalid.. ok tedu
-rw-r--r--sys/uvm/uvm_mmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index b667730e388..149fa967a4c 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.154 2019/03/01 01:46:18 cheloha Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.155 2019/04/02 11:02:01 deraadt Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -1040,8 +1040,8 @@ uvm_mmapfile(vm_map_t map, vaddr_t *addr, vsize_t size, vm_prot_t prot,
return (error);
}
-/* an address that can't be in userspace */
-#define BOGO_PC (KERNBASE + 1)
+/* an address that can't be in userspace or kernelspace */
+#define BOGO_PC (u_long)-1
int
sys_kbind(struct proc *p, void *v, register_t *retval)
{