-/* $OpenBSD: kern_fork.c,v 1.237 2021/12/05 22:00:42 cheloha Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.238 2021/12/10 05:34:42 guenther Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
return EINVAL;
#endif /* TCB_INVALID */
- /*
- * kbind(2) can only be used if it is initialized before the
- * process goes multithreaded.
- */
- if (p->p_p->ps_kbind_addr == 0)
- p->p_p->ps_kbind_addr = BOGO_PC;
-
return thread_fork(p, param.tf_stack, param.tf_tcb, param.tf_tid,
retval);
}
-/* $OpenBSD: proc.h,v 1.322 2021/12/09 00:26:10 guenther Exp $ */
+/* $OpenBSD: proc.h,v 1.323 2021/12/10 05:34:42 guenther Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
uint64_t ps_pledge;
uint64_t ps_execpledge;
- int64_t ps_kbind_cookie; /* [K] */
- u_long ps_kbind_addr; /* [K] */
-/* an address that can't be in userspace or kernelspace */
-#define BOGO_PC (u_long)-1
+ int64_t ps_kbind_cookie;
+ u_long ps_kbind_addr;
/* End area that is copied on creation. */
#define ps_endcopy ps_refcnt
-/* $OpenBSD: uvm_mmap.c,v 1.165 2021/12/05 22:00:42 cheloha Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.166 2021/12/10 05:34:42 guenther Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
return error;
}
+/* 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)
{