diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-24 21:05:21 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-24 21:05:21 +0000 |
commit | 410a2cfa8b7417b4d090af83fc0bc8a91f8ada14 (patch) | |
tree | 280be7a9ce034157367b927a179ee963ed514e80 /sys | |
parent | c62fe70bdcd2ae7fa0baa215fef3616f0c340ba1 (diff) |
Allow MD code to setup MD-specific mappings (kinda similar to the signal
trampoline) in sys_execve(), if MD <machine/_types.h> defines
__HAVE_EXEC_MD_MAP.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 5afdacd42d9..555e4cf2163 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.113 2010/07/26 01:56:27 guenther Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.114 2010/11/24 21:05:20 miod Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -616,6 +616,12 @@ sys_execve(struct proc *p, void *v, register_t *retval) if (exec_sigcode_map(p, pack.ep_emul)) goto free_pack_abort; +#ifdef __HAVE_EXEC_MD_MAP + /* perform md specific mappings that process might need */ + if (exec_md_map(p, &pack)) + goto free_pack_abort; +#endif + if (p->p_flag & P_TRACED) psignal(p, SIGTRAP); |