diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-14 05:52:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-14 05:52:44 +0000 |
commit | 5bb3700dd16c733316a028a1c043420c54184a95 (patch) | |
tree | 530f7a93766f9dacdd6173234f2349383f763927 /sys/uvm/uvm_map.c | |
parent | 563a1342b5aa44186ee6a388ae8b9c0a6f8bc677 (diff) |
The addition of writeable-syscall checking near MAP_STACK checking
damaged the error messages. Repair that, passing distinct format
strings for the two cases.
ok beck
Diffstat (limited to 'sys/uvm/uvm_map.c')
-rw-r--r-- | sys/uvm/uvm_map.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index af911597a61..bd072c50fb0 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.245 2019/06/01 22:42:20 deraadt Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.246 2019/06/14 05:52:43 deraadt Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -1860,8 +1860,8 @@ uvm_map_inentry_fix(struct proc *p, struct p_inentry *ie, vaddr_t addr, } boolean_t -uvm_map_inentry(struct proc *p, struct p_inentry *ie, vaddr_t addr, char *name, - int (*fn)(vm_map_entry_t), u_long serial) +uvm_map_inentry(struct proc *p, struct p_inentry *ie, vaddr_t addr, + const char *fmt, int (*fn)(vm_map_entry_t), u_long serial) { union sigval sv; boolean_t ok = TRUE; @@ -1870,9 +1870,8 @@ uvm_map_inentry(struct proc *p, struct p_inentry *ie, vaddr_t addr, char *name, KERNEL_LOCK(); ok = uvm_map_inentry_fix(p, ie, addr, fn, serial); if (!ok) { - printf("[%s]%d/%d %s %lx not inside %lx-%lx\n", - p->p_p->ps_comm, p->p_p->ps_pid, p->p_tid, - name, addr, ie->ie_start, ie->ie_end); + printf(fmt, p->p_p->ps_comm, p->p_p->ps_pid, p->p_tid, + addr, ie->ie_start, ie->ie_end); sv.sival_ptr = (void *)PROC_PC(p); trapsignal(p, SIGSEGV, 0, SEGV_ACCERR, sv); } |