Introduce explicit abstractions for different mapping types,
handling the instantiation, forking, pagefaults and freeing of
anonymous memory, direct physical mappings, shared memory and
physically contiguous anonymous memory as separate types, making
region.c more generic.
Also some other genericification like merging the 3 munmap cases
into one.
COW and SMAP safemap code is still implicit in region.c.
- add "edit" menu option, to edit menu commands before executing them;
- add "menu" boot command, to return to the menu from the prompt;
- provide more line editing features when getting input;
- fix a few potential buffer overflows as a side effect.
The check_bsf() macro uses assert(mutex_trylock(&bsf_lock)) and
assumes bsf_lock is locked afterwards. This breaks when compiling
with NOASSERTS="yes". Also: macro to function transition.
lets unstack
(a) know about in-kernel ipc entry points and
(b) be able handle >2GB symbol offsets.
. sort: add -x for hex numerical sort
. unstack: gnm is obsolete
. unstack: datasizes is obsolete (use nm --size-sort instead)
. unstack: add ipc entry points read from procfs (hex)
. unstack: use sort -x to sort symbol order so the procfs ones are
sorted independent of position and original ordering
. add cpufeature detection of both
. use it for both ipc and kernelcall traps, using a register
for call number
. SYSENTER/SYSCALL does not save any context, therefore userland
has to save it
. to accomodate multiple kernel entry/exit types, the entry
type is recorded in the process struct. hitherto all types
were interrupt (soft int, exception, hard int); now SYSENTER/SYSCALL
is new, with the difference that context is not fully restored
from proc struct when running the process again. this can't be
done as some information is missing.
. complication: cases in which the kernel has to fully change
process context (i.e. sigreturn). in that case the exit type
is changed from SYSENTER/SYSEXIT to soft-int (i.e. iret) and
context is fully restored from the proc struct. this does mean
the PC and SP must change, as the sysenter/sysexit userland code
will otherwise try to restore its own context. this is true in the
sigreturn case.
. override all usage by setting libc_ipc=1
rm -rf works just fine no matter what mode bits are set (modulo
file ownership and current user id). Test 43 creates a symlink
to / and the chmod operation would change file permissions outside
of the test directory.
. whenever this function is called, pm will expect
the process to be cleaned up
. so don't abort the process entirely on error
. fixes a later 'forking on top of in-use child' vfs panic
fixes an assert() firing when starting X. thanks to the report by pikpik.
. NO_MEM was 0, which is actually an existing piece
of physical memory. it can't be allocated because it's reserved
for bios data (by the kernel), but it can be mapped in (e.g.
by X), causing sanity check disaster.
. NONCONTIGUOUS is also obsolete as all allocations are single-page
now, i.e. NONCONTIGUOUS is really the default and only mode.
complete munmap implementation; single-page references made
a general munmap() implementation possible to write cleanly.
. memory: let the MIOCRAMSIZE ioctl set the imgrd device
size (but only to 0)
. let the ramdisk command set sizes to 0
. use this command to set /dev/imgrd to 0 after mounting /usr
in /etc/rc, so the boot time ramdisk is freed (about 4MB
currently)
. only reference single pages in process data structures
to simplify page faults, copy-on-write, etc.
. this breaks the secondary cache for objects that are
not one-page-sized; restored in a next commit
. rename minix malloc sources to minix-* so Makefile
references aren't ambiguous
. throw out malloc source file copies in libminc
. make libminc use phkmalloc instead of minix malloc (slightly faster)