From 0d3488043b40e0a0a45cf630408b410a3266d688 Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 19 Jan 2024 21:20:35 +0000 Subject: [PATCH] remove the guts of pinsyscall(2), it just returns 0 now. It has been made redundant by the introduction of pinsyscalls(2) which handles all system calls, rather than just 1. --- sys/uvm/uvm_extern.h | 4 +--- sys/uvm/uvm_mmap.c | 25 +------------------------ 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index e7701532448..7fd732396c5 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.172 2024/01/17 22:22:25 kurt Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.173 2024/01/19 21:20:35 deraadt Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -214,8 +214,6 @@ struct vmspace { caddr_t vm_daddr; /* [I] user virtual address of data */ caddr_t vm_maxsaddr; /* [I] user VA at max stack growth */ caddr_t vm_minsaddr; /* [I] user VA at top of stack */ - vaddr_t vm_execve; /* [v] execve systemcall stub region */ - vaddr_t vm_execve_end; /* [v] execve systemcall stub region */ }; /* diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index bccfcc10d4f..cc76bfafbba 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.184 2024/01/16 19:05:01 deraadt Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.185 2024/01/19 21:20:35 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -618,29 +618,6 @@ sys_msyscall(struct proc *p, void *v, register_t *retval) int sys_pinsyscall(struct proc *p, void *v, register_t *retval) { - struct sys_pinsyscall_args /* { - syscallarg(int) syscall; - syscallarg(void *) addr; - syscallarg(size_t) len; - } */ *uap = v; - struct vmspace *vm = p->p_vmspace; - vm_map_t map = &p->p_vmspace->vm_map; - vaddr_t start, end; - - if (SCARG(uap, syscall) != SYS_execve) - return (EINVAL); - start = (vaddr_t)SCARG(uap, addr); - end = start + (vsize_t)SCARG(uap, len); - if (start >= end || start < map->min_offset || end > map->max_offset) - return (EFAULT); - vm_map_lock(map); - if (vm->vm_execve) { - vm_map_unlock(map); - return (EPERM); - } - vm->vm_execve = start; - vm->vm_execve_end = end; - vm_map_unlock(map); return (0); } -- 2.20.1