diff options
| author | 2011-05-24 15:27:36 +0000 | |
|---|---|---|
| committer | 2011-05-24 15:27:36 +0000 | |
| commit | 4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f (patch) | |
| tree | d9bb5c2f86c9031ede4e5ba19468f965cd1ce33e /sys/uvm/uvm_unix.c | |
| parent | Merge pf_scrub_ip() and pf_scrub_ip6() into a single function. Call (diff) | |
| download | wireguard-openbsd-4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f.tar.xz wireguard-openbsd-4e3da9ea5c5c5f4e31e57e65a6f97720cfa2a93f.zip | |
Reimplement uvm/uvm_map.
vmmap is designed to perform address space randomized allocations,
without letting fragmentation of the address space go through the roof.
Some highlights:
- kernel address space randomization
- proper implementation of guardpages
- roughly 10% system time reduction during kernel build
Tested by alot of people on tech@ and developers.
Theo's machines are still happy.
Diffstat (limited to 'sys/uvm/uvm_unix.c')
| -rw-r--r-- | sys/uvm/uvm_unix.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c index ec7922cd9f3..2b8eee79057 100644 --- a/sys/uvm/uvm_unix.c +++ b/sys/uvm/uvm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_unix.c,v 1.40 2009/11/24 10:35:56 otto Exp $ */ +/* $OpenBSD: uvm_unix.c,v 1.41 2011/05/24 15:27:36 ariane Exp $ */ /* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */ /* @@ -167,9 +167,7 @@ uvm_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, offset = chdr->c_hdrsize + chdr->c_seghdrsize + chdr->c_cpusize; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { - + RB_FOREACH(entry, uvm_map_addr, &map->addr) { /* should never happen for a user process */ if (UVM_ET_ISSUBMAP(entry)) { panic("uvm_coredump: user process with submap?"); @@ -261,9 +259,7 @@ uvm_coredump_walkmap(struct proc *p, void *iocookie, vaddr_t top; int error; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { - + RB_FOREACH(entry, uvm_map_addr, &map->addr) { state.cookie = cookie; state.prot = entry->protection; state.flags = 0; |
