diff options
-rw-r--r-- | sys/kern/exec_subr.c | 13 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_map.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_map.h | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_mmap.c | 4 |
5 files changed, 14 insertions, 17 deletions
diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index 0cf207ae33f..4ed04765788 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.60 2022/10/21 18:11:55 deraadt Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.61 2022/10/21 19:13:31 deraadt Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -214,8 +214,7 @@ vmcmd_map_pagedvn(struct proc *p, struct exec_vmcmd *cmd) } else { if (cmd->ev_flags & VMCMD_IMMUTABLE) uvm_map_immutable(&p->p_vmspace->vm_map, - cmd->ev_addr, round_page(cmd->ev_len), - 1, "pagedvn"); + cmd->ev_addr, round_page(cmd->ev_len), 1); } return (error); @@ -269,8 +268,7 @@ vmcmd_map_readvn(struct proc *p, struct exec_vmcmd *cmd) if (cmd->ev_flags & VMCMD_IMMUTABLE) { //printf("imut readvn\n"); uvm_map_immutable(&p->p_vmspace->vm_map, - cmd->ev_addr, round_page(cmd->ev_len), - 1, "readvn"); + cmd->ev_addr, round_page(cmd->ev_len), 1); } } return (error); @@ -298,8 +296,7 @@ vmcmd_map_zero(struct proc *p, struct exec_vmcmd *cmd) if (cmd->ev_flags & VMCMD_IMMUTABLE) { //printf("imut zero\n"); uvm_map_immutable(&p->p_vmspace->vm_map, - cmd->ev_addr, round_page(cmd->ev_len), - 1, "zero"); + cmd->ev_addr, round_page(cmd->ev_len), 1); } return error; } @@ -317,7 +314,7 @@ vmcmd_mutable(struct proc *p, struct exec_vmcmd *cmd) /* ev_addr, ev_len may be misaligned, so maximize the region */ uvm_map_immutable(&p->p_vmspace->vm_map, trunc_page(cmd->ev_addr), - round_page(cmd->ev_addr + cmd->ev_len), 0, "mutable"); + round_page(cmd->ev_addr + cmd->ev_len), 0); return 0; } diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 3b95c73bc8d..f41c9c61cf2 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.236 2022/10/21 18:11:55 deraadt Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.237 2022/10/21 19:13:31 deraadt Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -864,7 +864,7 @@ exec_sigcode_map(struct process *pr) return (ENOMEM); } uvm_map_immutable(&pr->ps_vmspace->vm_map, pr->ps_sigcode, - pr->ps_sigcode + round_page(sz), 1, "sig"); + pr->ps_sigcode + round_page(sz), 1); /* Calculate PC at point of sigreturn entry */ pr->ps_sigcoderet = pr->ps_sigcode + (sigcoderet - sigcode); @@ -914,7 +914,7 @@ exec_timekeep_map(struct process *pr) return (ENOMEM); } uvm_map_immutable(&pr->ps_vmspace->vm_map, pr->ps_timekeep, - pr->ps_timekeep + timekeep_sz, 1, "time"); + pr->ps_timekeep + timekeep_sz, 1); return (0); } diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 74d5f298ab8..4bfab632046 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.298 2022/10/16 16:16:37 deraadt Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.299 2022/10/21 19:13:32 deraadt Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -4233,7 +4233,7 @@ uvm_map_syscall(struct vm_map *map, vaddr_t start, vaddr_t end) * => map must be unlocked */ int -uvm_map_immutable(struct vm_map *map, vaddr_t start, vaddr_t end, int imut, char *name) +uvm_map_immutable(struct vm_map *map, vaddr_t start, vaddr_t end, int imut) { struct vm_map_entry *entry; diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h index 267300d8d99..1b9a03fc3d1 100644 --- a/sys/uvm/uvm_map.h +++ b/sys/uvm/uvm_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.h,v 1.78 2022/10/16 16:16:37 deraadt Exp $ */ +/* $OpenBSD: uvm_map.h,v 1.79 2022/10/21 19:13:33 deraadt Exp $ */ /* $NetBSD: uvm_map.h,v 1.24 2001/02/18 21:19:08 chs Exp $ */ /* @@ -350,7 +350,7 @@ struct vm_map * uvm_map_create(pmap_t, vaddr_t, vaddr_t, int); vaddr_t uvm_map_pie(vaddr_t); vaddr_t uvm_map_hint(struct vmspace *, vm_prot_t, vaddr_t, vaddr_t); int uvm_map_syscall(struct vm_map *, vaddr_t, vaddr_t); -int uvm_map_immutable(struct vm_map *, vaddr_t, vaddr_t, int, char *); +int uvm_map_immutable(struct vm_map *, vaddr_t, vaddr_t, int); int uvm_map_inherit(struct vm_map *, vaddr_t, vaddr_t, vm_inherit_t); int uvm_map_advice(struct vm_map *, vaddr_t, vaddr_t, int); void uvm_map_init(void); diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index f5aba6a7d40..1b4ad16b035 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.173 2022/10/07 14:59:39 deraadt Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.174 2022/10/21 19:13:33 deraadt Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -675,7 +675,7 @@ sys_mimmutable(struct proc *p, void *v, register_t *retval) if (addr > SIZE_MAX - size) return EINVAL; /* disallow wrap-around. */ - return uvm_map_immutable(&p->p_vmspace->vm_map, addr, addr+size, 1, "sys"); + return uvm_map_immutable(&p->p_vmspace->vm_map, addr, addr+size, 1); } /* |