Commit graph

4453 commits

Author SHA1 Message Date
Tomas Hruby
8d0a1f71bf KERNEL - do_privctl() fix
- after a driver is restarted, do not register permissions
  which are already set again.
2012-01-13 11:29:59 +00:00
Arun Thomas
fecaba7ff1 Increase ramdisk size for clang 2012-01-12 17:01:48 +01:00
Antoine Leca
36d29dedd5 Allow clang for kernel compilation
Remove .ident sections, and force separations of .text and
.data sections into separate program headers, for the benefit
of the check done by MINIX boot monitor in multiboot mode.
2012-01-12 13:36:22 +01:00
Thomas Veerman
a4d01f8a83 Fix tll state bug
When a lock has read-serialized and read-only locks, releasing the read-
serialized lock would not set the state to read-only when no other locks
were pending.
2012-01-12 11:30:24 +00:00
Ben Gras
af6c39fb9b /etc/shells 2012-01-11 15:23:05 +01:00
Ben Gras
7cd4002083 vm: clear map cache after kernel requests
. fixes a dirty tlb situation (i.e. random crashes)
	  on some hardware, seemingly new intel architectures
	  (e.g. my desktop i7 machine)
2012-01-11 01:15:35 +01:00
Ben Gras
0bb4bb9d51 move pax and chmod for useradd 2012-01-11 00:26:09 +01:00
David van Moolenbroek
11c15db517 rc: transitional fix for old fstab 2012-01-10 15:05:50 +01:00
Evgeniy Ivanov
d6c5a1280e Convert s_block_size on MFSv3.
On MFSv3 s_block_size is stored on disk, hence bytes should be converted
on big endian.
2012-01-08 23:52:57 +04:00
Ben Gras
99c3099c32 another UPDATING tweak 2012-01-08 16:34:46 +00:00
Ben Gras
2ea10eeb75 added etcforce to UPDATING 2012-01-08 15:56:31 +00:00
Ben Gras
3e4fa99098 Added UPDATING about mfs clean flag changes. 2012-01-06 00:28:08 +01:00
David van Moolenbroek
c25e2eb0cf avfs: fix for root file system not being unmounted
Also no longer have avfs crash whenever a file system server crashes.
2012-01-04 14:10:10 +01:00
David van Moolenbroek
c21cdd3154 sys/queue.h: add LIST_FOREACH_SAFE to netbsd copy 2011-12-23 19:05:09 +01:00
David van Moolenbroek
3e46876a73 hgfs: fix atime/mtime attribute setting bug
Reported and investigated by Antoine Leca.
2011-12-23 19:02:57 +01:00
David van Moolenbroek
80b03d929d hgfs: resolve gcc -W warnings 2011-12-23 19:01:56 +01:00
David van Moolenbroek
472a91708a Move hgfs.h to minix includes directory 2011-12-23 19:01:14 +01:00
Ben Gras
51de979ed9 fix for checking CLEAN-ness of ramdisk image
. pre-cleanflag ("old") mkfs generates without CLEAN flag,
	  causing boot not working because imgrd disappears after 1st
	  close
	. fixed sanity check for this situation
	. disable imgrd disappearing in memory driver so
	  readonly mount succeeds in case it happens anyway
2011-12-23 15:10:01 +01:00
Ben Gras
94715d8e54 import netbsd ext2fs fsck and newfs 2011-12-22 23:07:23 +01:00
Ben Gras
4d4057d8a2 netbsd fsck driver import
. fsck driver parses /etc/fstab and invokes sub-fscks
	. further simplifies fs handling in rc
2011-12-22 23:07:15 +01:00
Ben Gras
6b6d114a21 import netbsd libprop 2011-12-22 18:03:13 +01:00
Ben Gras
59ff5cbd87 mfs: clean flag
. also implement now-possible fsck -p option
    	. allows unconditional fsck -p invocation at startup,
    	  only checking each filesystem if not marked clean
    	. mounting unclean is allowed but is forced readonly
    	. updating the superblock while mounted is now not
    	  allowed by mfs - must be done (e.g. by fsck.mfs)
    	  on an unmounted fs
	. clean flag is unset by mfs on mounting, and set by
	  mfs on clean unmounting (if clean flag was set at
	  mount time)

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 16:53:32 +01:00
Ben Gras
9a664b4984 mfs: restore readonly mounting
. use dirty marking hooks to check and warn
	  when inodes/bufs are marked dirty on a readonly
	  mounted fs
	. add readonly mount checks to restore readonly
	  mounting

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 01:29:27 +01:00
Ben Gras
9b7d357ca1 mfs: use macros to mark blocks and inodes dirty
. No functional change
	. Only serves to get hooks to do checks in
	. e.g. should things be marked dirty when we are
	  mounted readonly

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 01:29:27 +01:00
Ben Gras
34a8901eb8 vfs,avfs: verify an interpreter was found on #! line
. if not, NULL *interp is dereferenced
2011-12-21 23:44:13 +01:00
Thomas Veerman
3fb6c995e0 Make all tests use common.c
This will make sure that all file descriptors are closed through
the use of the start() function.
2011-12-21 12:59:22 +00:00
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
Thomas Veerman
c89bc85009 Don't repeat out-of-space messages
This patch makes PFS, EXT2 and MFS print only once that they're out of
space. After freeing up space and running out of space again, the message
will be printed again also.
2011-12-21 10:47:28 +00:00
Thomas Veerman
54c0eb9aa6 Compare read/write buf size against SSIZE_MAX instead of "< 0"
The nbyte in read(int fildes, void *buf, size_t nbyte) is unsigned,
so although technically we're doing the same comparison, this is more
in line with POSIX.

The comparison was moved to read_write as that routine is used within
VFS to let it VFS write out coredumps.
2011-12-21 10:46:09 +00:00
Thomas Veerman
9f9f893123 Mark filp as in use on fd dup'ing 2011-12-21 10:45:29 +00:00
Tomas Hruby
71533c8a83 ACPI - fixed initialization of pci briges irqtable
- if no IRQ table is found, we report that ACPI cannot map IRQ
  correctly

- fixes mapping of IRQs in KVM because in this case we just fall
  through and use the IRQ configured by BIOS. PCI still reports
  that it failed to use ACPI. It is a hint if things go wrong.
2011-12-20 13:10:36 +00:00
Tomas Hruby
b73089ce3e ACPI extended irq - fixed uninitialized variable 2011-12-20 13:08:45 +00:00
Tomas Hruby
aca5862db1 SMP - kernel links again 2011-12-20 13:05:25 +00:00
Tomas Hruby
9cd53f1cc0 SMP - fixed compilation and removed warnings 2011-12-20 12:58:20 +00:00
David van Moolenbroek
84662ec4b3 libsys: unbreak getidle() 2011-12-16 16:06:09 +00:00
Ben Gras
eccb2d685c tty timeout bugfix
. timeouts were always delivered to console
	. Fix by Lucio Tomarchio
2011-12-16 09:54:20 +01:00
Ben Gras
668fa5cf2a nbsd.config: make timezone explicit 2011-12-14 17:02:31 +01:00
Ben Gras
194e51aff0 workaround for cvs not handling many args 2011-12-14 01:14:36 +01:00
David van Moolenbroek
c5fae8a617 dec21140A: change debugging key to Shift+F7 2011-12-12 16:45:45 +01:00
Raja Appuswamy
8ab7667da4 ahci: NCQ support 2011-12-12 14:13:05 +01:00
Thomas Veerman
94da86cbee Discard process' pending request upon incoming PM request
When a process wants something done from VFS, but VFS has no worker
threads available, the request is stored and executed later. However,
when PM also sends a request for that process at the same time, discard
the pending request from the process and give priority to PM. The request
PM sends is either an EXIT or a DUMPCORE request, so we're not interested
in executing the pending request anyway.
2011-12-12 08:20:35 +00:00
David van Moolenbroek
e7db2d3588 Add fbd -- Faulty Block Device driver
This driver can be loaded as an overlay on top of a real block
device, and can then be used to generate block-level failures for
certain transfer requests. Specifically, a rule-based system allows
the user to introduce (overt and silent) data corruption and errors.

It exposes itself through /dev/fbd, and a file system can be mounted
on top of it. The new fbdctl(8) tool can be used to control the
driver; see ``man fbdctl'' for details. It also comes with a test
set, located in test/fbdtest.
2011-12-11 22:45:46 +01:00
David van Moolenbroek
f65e531ee4 blocktest: support for stateless driver restarts 2011-12-11 22:41:51 +01:00
David van Moolenbroek
4005bba437 libblockdriver: clear IPC only on stateful restart
This removes a race condition when the block driver performs a
complete restart after a crash (the new default). If any user of
the driver finds out its new endpoint and sends a request to the
new driver instance before this instance has had the chance to
initialize, then its initialization would clear all IPC state and
thereby erroneously cancel the incoming request. Clearing IPC
state is only desired upon a stateful restart (where the driver's
endpoint is retained). This information is now passed to and used
by libblockdriver accordingly.
2011-12-11 22:36:19 +01:00
David van Moolenbroek
95d1f25b28 blocktest: resolve label/minor in userland
The test script now resolves the device node into a <label,minor>
pair, so that the blocktest driver itself no longer has to. This
removes blocktest's dependency on VFS' internal data structures.

Also allow blocktest to be linked using with gcc/clang.
2011-12-11 22:35:37 +01:00
David van Moolenbroek
35cf8beb33 procfs: add /proc/dmap 2011-12-11 22:35:33 +01:00
David van Moolenbroek
aa712e7e73 IS: unbreak F6 2011-12-11 22:34:54 +01:00
David van Moolenbroek
6f374faca5 Add "expected size" parameter to getsysinfo()
This patch provides basic protection against damage resulting from
differently compiled servers blindly copying tables to one another.
In every getsysinfo() call, the caller is provided with the expected
size of the requested data structure. The callee fails the call if
the expected size does not match the data structure's actual size.
2011-12-11 22:34:14 +01:00
David van Moolenbroek
9701e9dfd2 Servers: cleanup of some gcc -W warnings 2011-12-11 22:33:37 +01:00
David van Moolenbroek
c6459e8ec1 acpi: resolve warnings 2011-12-10 16:14:23 +01:00