minix/lib
Ben Gras e8eeebcd47 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-27 13:56:54 +00:00
..
csu libcsu: store argc and argv on the stack 2013-01-25 17:07:02 +00:00
libasyn No more intel/minix segments. 2012-07-15 22:30:15 +02:00
libaudiodriver libaudiodriver: properly deallocate memory 2012-08-24 09:17:27 +00:00
libbdev libbdev: resolve Coverity warnings 2012-07-30 12:10:12 +00:00
libblockdriver Rename "struct partition" to "struct part_geom" 2013-03-20 16:14:21 +00:00
libbz2 Upgrading bzip2 2012-11-21 18:32:06 +01:00
libc vfs: mmap support 2013-05-27 13:56:54 +00:00
libchardriver libchardriver: resolve Coverity warnings 2012-07-30 12:10:13 +00:00
libcompat_minix Removing obsolete _MINIX_COMPAT define 2013-02-26 09:44:23 +00:00
libcrypt Updating lib/libcrypt 2013-01-14 11:36:27 +01:00
libcurses Removing useless __NBSD_LIBC define in libcurses 2013-01-17 10:03:58 +01:00
libddekit libc: add clock_getres()/clock_gettime() system calls. 2013-04-04 15:04:53 +02:00
libdevman retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
libedit Fix command line history in ash 2013-02-01 11:41:47 +01:00
libelf libelf:use self hosted m4. 2013-04-24 17:22:59 +02:00
libexec vfs: mmap support 2013-05-27 13:56:54 +00:00
libfetch Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
libgpio Let the build system manage compilation flags 2013-03-08 09:41:49 +01:00
libhgfs Create SFFS library out of HGFS 2012-04-09 18:08:26 +02:00
liblwip libc: add clock_getres()/clock_gettime() system calls. 2013-04-04 15:04:53 +02:00
libm Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
libminc ldivmod, uldivmod: fix qdivrem calls 2013-02-08 14:09:45 +01:00
libminixfs libminixfs, mfs, ext2: may re-evaluate cache size 2013-04-26 13:57:08 +00:00
libminlib ARM updates 2013-01-17 10:03:58 +01:00
libmthread Let the build system manage compilation flags 2013-03-08 09:41:49 +01:00
libnetdriver retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
libnetsock LWIP - fixed makefiles 2013-03-25 16:51:25 +01:00
libpadconf Let the build system manage compilation flags 2013-03-08 09:41:49 +01:00
libprop Upgrading build system to new NetBSD revision 2012-11-15 16:07:29 +01:00
libpuffs VFS: Implement REQ_BPEEK. 2013-04-24 10:18:16 +00:00
librefuse Let the build system manage compilation flags 2013-03-08 09:41:49 +01:00
librmt Fix warnings trivial warnings. 2013-01-14 11:44:31 +01:00
libsffs VFS: Implement REQ_BPEEK. 2013-04-24 10:18:16 +00:00
libsys arm:omap timers remove hardcoded base address. 2013-05-24 14:03:14 +02:00
libterminfo Re-adding extended keys in minix termcap entry 2013-01-23 21:28:17 +01:00
libtimers
libusb retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
libutil Fixing cross build i386 on minix 2013-01-23 21:03:38 +01:00
libvassert No more intel/minix segments. 2012-07-15 22:30:15 +02:00
libvboxfs libvboxfs: fix setting file mtimes 2012-10-17 23:01:24 +02:00
libvirtio virtio: generic virtio library 2013-01-23 09:03:03 +00:00
libvtreefs VFS: Implement REQ_BPEEK. 2013-04-24 10:18:16 +00:00
libz Downgrading to netbsd zlib version 2013-04-09 16:43:13 +02:00
Makefile Reducing external/bsd/file differences 2013-04-12 13:25:18 +02:00
Makefile.inc Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00