Commit Graph

23 Commits

Author SHA1 Message Date
Dominique Martinet
4d4279121b process/vm; replace vm_range list by a rbtree
This replaces the chained list used to keep track of all memory ranges
of a process by a standard rbtree (no need of interval tree here
because there is no overlap)

Accesses that were done directly through vm_range_list before were
replaced by lookup_process_memory_range, even full list scan (e.g.
coredump).
The full scans will thus be less efficient because calls to rb_next()
will not be inlined, but these are rarer calls that can probably afford
this compared to code simplicity.

The only reference to the actual backing structure left outside of
process.c is a call to rb_erase in xpmem_free_process_memory_range.

v2: fix lookup_process_memory_range with small start address

v3: make vm_range_insert error out properly

Panic does not lead to easy debug, all error paths
are handled to just return someting on error

v4: fix lookup_process_memory_range (again)

That optimistically going left was a more serious bug than just
last iteration, we could just pass by a match and continue down
the tree if the match was not a leaf.

v5: some users actually needed leftmost match, so restore behavior
without the breakage (hopefully)
2017-10-13 10:00:27 +09:00
Tomoki Shirasawa
a2fbe99b60 madvise: support MADV_DONTDUMP/DODUMP
refs #661
2017-09-26 14:21:40 +09:00
Takayuki Okamoto
9989f41fd3 add arm64 support
- add arm64 dependent codes with GICv3 and SVE support
- fix bugs based on architecture separation requests
2017-09-05 15:06:27 +09:00
Masamichi Takagi
fa6f20a3c4 Correct comments in gencore.c 2017-06-16 21:47:23 +09:00
Yoichi Umezawa
593cf98015 add ACSL annotation 2016-03-16 15:42:32 +09:00
Tomoki Shirasawa
343bfbd30a rename back status field 2015-10-22 20:26:50 +09:00
Tomoki Shirasawa
04e193de13 refactoring process structures 2015-10-13 23:04:08 +09:00
NAKAMURA Gou
fab2c2aa97 wrap x86_regs with x86_user_context
and, rename x86_regs to x86_basic_regs.
2015-02-26 17:43:10 +09:00
NAKAMURA Gou
0942bf0ce0 make dkprintf() evaluate its parameters always
Parameters of dkprintf() should be evaluated even if dkprintf() is
disabled.  Because this enables to find expression of parameter obsolete
and to avoid unnecessary compiler warnings such as "unused variable".
2014-12-22 16:58:03 +09:00
Tomoki Shirasawa
3fe7e39607 some variables definition are gathered to fork_tree_node from process.
- remove both-defined: pid, pgid, status
- move to fork_tree_node: tid
- make dummy fork_tree_node for idle_process.
2014-10-29 16:54:09 +09:00
Masamichi Takagi
013d3e95c2 Fix manipulation of fork_tree_node for ptrace 2014-10-15 14:42:17 +09:00
Naoki Hamada
319590910a Almost implemented. 2014-09-03 15:20:39 +09:00
Naoki Hamada
f5b37ef577 Fixed bad offset problem and clarified alignment. 2014-07-25 10:26:24 +09:00
Naoki Hamada
dbdaf0ed32 Fix for demand paging and documentation. 2014-07-23 10:23:02 +09:00
Naoki Hamada
6c3d901069 Include switch for a plain Xeon. 2014-07-17 17:26:54 +09:00
Naoki Hamada
97a74f4692 Fix for core NOTE alignment & al. 2014-07-17 16:56:28 +09:00
Naoki Hamada
3e8083efc1 Prepare for a core file image. 2014-07-17 15:19:25 +09:00
Naoki Hamada
cb9d346567 Fixed wrong %x to %lx. 2014-07-11 18:48:15 +09:00
Naoki Hamada
b3f3932825 Typo fix and removed DUMMY definition. 2014-07-10 17:13:05 +09:00
Naoki Hamada
1d45444d54 Added code for generating core image.
modified:   arch/x86/kernel/gencore.c
	modified:   arch/x86/kernel/include/elfcore.h
	modified:   kernel/include/process.h
	modified:   kernel/process.c
2014-07-10 15:55:35 +09:00
Naoki Hamada
0d7d1ebbd5 Minor fix for semantic correction. 2014-07-07 16:12:06 +09:00
Naoki Hamada
79a72809af Prepare inside of core. Not tested.
modified:   arch/x86/kernel/gencore.c
	modified:   arch/x86/kernel/include/elfcore.h
	modified:   kernel/mem.c
2014-07-07 15:46:10 +09:00
Naoki Hamada
14cc85c207 Added needed files.
new file:   arch/x86/kernel/gencore.c
	new file:   arch/x86/kernel/include/elfcore.h
	new file:   arch/x86/kernel/include/elfcoregpl.h
2014-07-04 15:44:48 +09:00