minix/servers/is
Ben Gras 35a83eadc0 vfs: mmap support
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
	  This is a good special case to have as vfs is a slightly
	  different client from regular user processes. It doesn't do it
	  for itself, and has the dev & inode info already so the callback
	  to VFS for the lookup isn't necessary. So it has different info
	  to have to give to VM.
	. libc: also add minix_mmap64() that accepts a 64-bit offset, even
	  though our off_t is still 32 bit now.
	. to support mmap, we need to create new references to FD's (such
	  as an FD) so that the mmapped object can never be removed even if
	  all FD's are closed. To do that we conceptually dup the
	  filedescriptor into a new range that is only visible to the system.
	  So there are FDS_PER_PROCESS fd's, which is more than OPEN_MAX,
	  per process, and user processes can still use up to OPEN_MAX
	  FD's. mmap()ped objects then get extra reference in the invisible
	  range so user processes can't close them. The in-vfs fd_set is
	  of size FDS_PER_PROCESS.
	. On exec() time, try to mmap() in the executable if available.
	  (It is not yet available in this commit.)
	. To support mmap(), add do_vm_call that allows VM to lookup
	  (to ino+dev), do i/o from and close FD's on behalf of other
	  processes.
	. To make this possible, a few functions have 2 more arguments
	  to make the target process explicit (instead of the implicit
	  global fp) and to specify whether the request is from a user
	  process or the system (which implies whether FD's starting at
	  OPEN_MAX are valid). These are close_fd, common_open, actual_llseek,
	  actual_read_write_peek, get_fd and get_filp2.

Change-Id: I831551e45a6781c74313c450eb9c967a68505932
2013-05-18 16:10:47 +00:00
..
dmp_ds.c drop safemap code 2012-10-30 13:55:42 +01:00
dmp_fs.c IS: resolve Coverity warnings 2012-08-09 00:16:35 +02:00
dmp_kernel.c ARM updates 2013-01-17 10:03:58 +01:00
dmp_pm.c libc: add clock_getres()/clock_gettime() system calls. 2013-04-04 15:04:53 +02:00
dmp_rs.c Libraries updates and cleanup 2013-01-14 11:36:26 +01:00
dmp_vm.c VM: make mapping types explicit 2012-10-12 14:52:01 +02:00
dmp.c tty: non-overlapping code for FKEY_CONTROL 2013-05-01 21:36:43 +00:00
glo.h various coverity-inspired fixes 2012-07-16 14:00:56 +02:00
inc.h vfs: mmap support 2013-05-18 16:10:47 +00:00
main.c retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Makefile Remove MINIXSRCDIR and use NETBSDSRCDIR 2012-06-18 10:53:35 +00:00
proto.h No more intel/minix segments. 2012-07-15 22:30:15 +02:00