diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-17 23:26:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-17 23:26:08 +0000 |
commit | e01148f04fc96c6cc37467ef7feb6fc7e4ae03f4 (patch) | |
tree | 378bb19a1d12461a527e6f0dfa145b5e0525b801 /sys/uvm | |
parent | 0a0e69c9775452de3787693002decb8d8e06fe32 (diff) |
With regret, place mutexes after struct vm_map fields which are inspected
by libkvm and procmap(8). struct mutex can change based upon kernel
compile options, and the fields were dancing around
ok kettenis
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_map.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h index fcfbadb9949..0bc4b821bf7 100644 --- a/sys/uvm/uvm_map.h +++ b/sys/uvm/uvm_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.h,v 1.80 2022/11/04 09:36:44 mpi Exp $ */ +/* $OpenBSD: uvm_map.h,v 1.81 2022/11/17 23:26:07 deraadt Exp $ */ /* $NetBSD: uvm_map.h,v 1.24 2001/02/18 21:19:08 chs Exp $ */ /* @@ -265,8 +265,6 @@ RBT_PROTOTYPE(uvm_map_addr, vm_map_entry, daddrs.addr_entry, */ struct vm_map { struct pmap *pmap; /* [I] Physical map */ - struct rwlock lock; /* Non-intrsafe lock */ - struct mutex mtx; /* Intrsafe lock */ u_long sserial; /* [v] # stack changes */ u_long wserial; /* [v] # PROT_WRITE increases */ @@ -275,7 +273,6 @@ struct vm_map { vsize_t size; /* virtual size */ int ref_count; /* [a] Reference count */ int flags; /* flags */ - struct mutex flags_lock; /* flags lock */ unsigned int timestamp; /* Version number */ vaddr_t min_offset; /* [I] First address in map. */ @@ -311,6 +308,14 @@ struct vm_map { struct uvm_addr_state *uaddr_exe; /* Executable selector. */ struct uvm_addr_state *uaddr_any[4]; /* More selectors. */ struct uvm_addr_state *uaddr_brk_stack; /* Brk/stack selector. */ + + /* + * XXX struct mutex changes size because of compile options, so place + * place after fields which are inspected by libkvm / procmap(8) + */ + struct rwlock lock; /* Non-intrsafe lock */ + struct mutex mtx; /* Intrsafe lock */ + struct mutex flags_lock; /* flags lock */ }; /* vm_map flags */ |