minix/servers/avfs
Thomas Veerman de5a9a3e8b AVFS: Use scratchpad instead of m_in to pass around file descriptors
Some code relies on having the file descriptor in m_in.fd. Consequently,
m_in is not only used to provide syscall parameters from user space to
VFS, but also as a global variable to store temporary data within VFS.
This has the ugly side effect that m_in gets overwritten during core
dumping.*

To work around this problem VFS now uses a so called "scratchpad" to
store temporary data that has to be globally accessible. This is a simple
table indexed by process number, just like fproc. The scratchpad allows
us to store the buffer pointer and buffer size for suspended system calls
(i.e., read, write, open, lock) instead of using fproc. This makes fproc
a bit smaller and fproc iterators a bit faster. Moreover, suspension of
processes becomes simpler altogether and suspended operations on pipes
are now less of a special case.

* This patch fixes a bug where due to unexpected m_in overwriting a
coredump would fail, and consequently resources are leaked. The coredump
was triggered with:
$ a() { a; }
$ a
2011-12-21 10:52:51 +00:00
..
comm.c vfs/avfs: req_newdriver should use fs_sendrec 2011-12-05 16:28:09 +01:00
comm.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
const.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
coredump.c Provide core dumping support for AVFS 2011-12-08 10:47:11 +00:00
device.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
dmap.c Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
dmap.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
exec.c Implement issetugid syscall 2011-11-28 10:03:43 +00:00
exec.h Implement issetugid syscall 2011-11-28 10:03:43 +00:00
file.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
filedes.c Change asserts with side effects into panics 2011-12-09 14:46:10 +00:00
fproc.h AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
fs.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
fscall.c Servers: cleanup of some gcc -W warnings 2011-12-11 22:33:37 +01:00
gcov.c Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
glo.h AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
job.h err_code has to be preserved as well. Short term fix 2011-10-25 12:12:20 +00:00
link.c Fix off-by-one errors and increase PATH_MAX to 1024 2011-09-12 09:00:24 +00:00
lock.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
lock.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
main.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
Makefile Provide core dumping support for AVFS 2011-12-08 10:47:11 +00:00
misc.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
mount.c Properly unlock on mount failure 2011-12-09 15:47:42 +00:00
open.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
param.h Add "expected size" parameter to getsysinfo() 2011-12-11 22:34:14 +01:00
path.c Change asserts with side effects into panics 2011-12-09 14:46:10 +00:00
path.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
pipe.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
protect.c Fix off-by-one errors and increase PATH_MAX to 1024 2011-09-12 09:00:24 +00:00
proto.h AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
read.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
request.c vfs/avfs: req_newdriver should use fs_sendrec 2011-12-05 16:28:09 +01:00
request.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
scratchpad.h AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
select.c Servers: cleanup of some gcc -W warnings 2011-12-11 22:33:37 +01:00
select.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
stadir.c Fix off-by-one errors and increase PATH_MAX to 1024 2011-09-12 09:00:24 +00:00
table.c AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
threads.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
time.c Fix off-by-one errors and increase PATH_MAX to 1024 2011-09-12 09:00:24 +00:00
tll.c Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
tll.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
utility.c Fix off-by-one errors and increase PATH_MAX to 1024 2011-09-12 09:00:24 +00:00
vmnt.c Cleanup more resources upon exit 2011-09-16 10:16:57 +00:00
vmnt.h Reenable backcall detection 2011-10-27 15:29:37 +00:00
vnode.c Make AVFS resilient against failing back calls 2011-09-06 10:38:16 +00:00
vnode.h Merge AVFS and APFS 2011-08-17 13:40:36 +00:00
worker.c Change asserts with side effects into panics 2011-12-09 14:46:10 +00:00
write.c Provide core dumping support for AVFS 2011-12-08 10:47:11 +00:00