diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-01-17 18:56:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-01-17 18:56:14 +0000 |
commit | 6c041462bf37e7d9ce9821b7f847281fd9292551 (patch) | |
tree | 0e4db2cfd3a8f20dfeca7f375f3f2133ef09c2aa | |
parent | a22a74ab55187f631e1badd55ebd18ae17ba8bf7 (diff) |
Since pinsyscalls(2) applies to all system calls and does a more precise
check earlier, the pinsyscall(SYS_execve mechanism has become redundant.
It needs to be removed delicately since ld.so and static binaries use it.
As a first step, neuter the checking code in sys_execve(). Further steps
will follow slowly.
ok kettenis
-rw-r--r-- | sys/kern/kern_exec.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 47048040c22..a00e2372145 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.253 2024/01/16 19:05:01 deraadt Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.254 2024/01/17 18:56:13 deraadt Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -268,21 +268,11 @@ sys_execve(struct proc *p, void *v, register_t *retval) #ifdef MACHINE_STACK_GROWS_UP size_t slen; #endif - vaddr_t pc = PROC_PC(p); char *stack; struct ps_strings arginfo; struct vmspace *vm = p->p_vmspace; struct vnode *otvp; - if (vm->vm_execve && - (pc >= vm->vm_execve_end || pc < vm->vm_execve)) { - printf("%s(%d): execve %lx outside %lx-%lx\n", pr->ps_comm, - pr->ps_pid, pc, vm->vm_execve, vm->vm_execve_end); - p->p_p->ps_acflag |= AEXECVE; - sigabort(p); - return (0); - } - /* * Get other threads to stop, if contested return ERESTART, * so the syscall is restarted after halting in userret. |