Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
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
benchmarks Fixed unixbench Run script 2010-10-25 08:32:14 +00:00
bin Increase gid_t and uid_t to 32 bits 2011-09-05 13:56:14 +00:00
boot boot e820 memory detection fixes 2011-09-19 13:36:03 +00:00
commands Add fbd -- Faulty Block Device driver 2011-12-11 22:45:46 +01:00
common ahci: NCQ support 2011-12-12 14:13:05 +01:00
dist/bzip2 import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
docs Add fbd -- Faulty Block Device driver 2011-12-11 22:45:46 +01:00
drivers ACPI - fixed initialization of pci briges irqtable 2011-12-20 13:10:36 +00:00
etc Add fbd -- Faulty Block Device driver 2011-12-11 22:45:46 +01:00
include Implement issetugid syscall 2011-11-28 10:03:43 +00:00
kernel SMP - kernel links again 2011-12-20 13:05:25 +00:00
lib libsys: unbreak getidle() 2011-12-16 16:06:09 +00:00
libexec update/fix manpage support 2011-09-28 15:24:15 +00:00
man Add fbd -- Faulty Block Device driver 2011-12-11 22:45:46 +01:00
nbsd_include Fix stat symbols 2011-11-30 11:17:13 +00:00
servers AVFS: Use scratchpad instead of m_in to pass around file descriptors 2011-12-21 10:52:51 +00:00
share add -L for future compiler-rt lib location 2011-12-08 18:07:57 +01:00
test Add fbd -- Faulty Block Device driver 2011-12-11 22:45:46 +01:00
tools nbsd.config: make timezone explicit 2011-12-14 17:02:31 +01:00
usr.bin import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
usr.sbin Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00
.gitignore .gitignore: add more generated files 2011-12-03 23:04:45 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00