]> Zhao Yanbai Git Server - minix.git/log
minix.git
12 years agoInitial import of libsa, libkern, bootxx, boot.
Evgeniy Ivanov [Mon, 9 Jan 2012 14:07:58 +0000 (18:07 +0400)]
Initial import of libsa, libkern, bootxx, boot.

12 years agoAVFS/APFS: small cleanup
Thomas Veerman [Thu, 9 Feb 2012 16:33:24 +0000 (16:33 +0000)]
AVFS/APFS: small cleanup

12 years agoAVFS: fix various system call interruption issues
Thomas Veerman [Thu, 9 Feb 2012 14:24:28 +0000 (14:24 +0000)]
AVFS: fix various system call interruption issues

 - When cancelling ioctls, VFS did not remember which file descriptor
   to cancel and sent bogus to the driver.
 - Select state was not cleaned up when select()ing process was
   interrupted.
 - Process trying to do a system call at the exact same time as a user
   trying to interrupt the process, could cause the system call worker
   thread to overwrite state belonging to the worker thread trying to
   exit the process. This led to hanging threads and eventual system hang
   when this happens often enough.

12 years agolibchardriver: fix open reply for async devices
Thomas Veerman [Thu, 9 Feb 2012 10:32:08 +0000 (10:32 +0000)]
libchardriver: fix open reply for async devices

12 years ago-lminixutil link fixes
Ben Gras [Fri, 3 Feb 2012 13:03:59 +0000 (14:03 +0100)]
-lminixutil link fixes

. not available and not needed for clang

12 years agoEnlarge ramdisk size (blocks).
Evgeniy Ivanov [Fri, 23 Dec 2011 10:56:15 +0000 (14:56 +0400)]
Enlarge ramdisk size (blocks).

12 years agoNBSD INCLUDES - fixed missing vm_remap_ro() proto
Tomas Hruby [Thu, 2 Feb 2012 23:55:38 +0000 (23:55 +0000)]
NBSD INCLUDES - fixed missing vm_remap_ro() proto

12 years agoinet: strncmp() fix
Ben Gras [Fri, 3 Feb 2012 13:49:18 +0000 (14:49 +0100)]
inet: strncmp() fix

12 years agotemporarily disable update-superblock check
Ben Gras [Tue, 31 Jan 2012 15:17:06 +0000 (16:17 +0100)]
temporarily disable update-superblock check

. incompatible with installboot -d FSDEV on mounted filesystems
. should be re-enabled when netbsd boot loader is default

12 years agoAPFS: fix link issue when compiling with Clang
Thomas Veerman [Thu, 2 Feb 2012 15:00:01 +0000 (15:00 +0000)]
APFS: fix link issue when compiling with Clang

12 years agoINET: fix 'improved' assert
Thomas Veerman [Thu, 2 Feb 2012 11:53:52 +0000 (11:53 +0000)]
INET: fix 'improved' assert

12 years agoRemove unused variables
Thomas Veerman [Thu, 2 Feb 2012 10:47:06 +0000 (10:47 +0000)]
Remove unused variables

12 years agoINET: fix a few GCC compilation warnings
Thomas Veerman [Tue, 31 Jan 2012 15:43:00 +0000 (15:43 +0000)]
INET: fix a few GCC compilation warnings

12 years agolibpuffs: make GCC happy
Thomas Veerman [Wed, 1 Feb 2012 11:44:26 +0000 (11:44 +0000)]
libpuffs: make GCC happy

12 years agoAVFS: only put mount point when it was used as one
Thomas Veerman [Wed, 1 Feb 2012 11:34:40 +0000 (11:34 +0000)]
AVFS: only put mount point when it was used as one

When a mount operation fails and the FS exits, free_proc could try and
clean up resources associated with the mount point before the mount
thread itself can do that. However, the clean up procedure should only
clean up resources that were actually in use.

12 years agoservice: allow starting service with user's realuid
Thomas Veerman [Wed, 1 Feb 2012 13:21:56 +0000 (13:21 +0000)]
service: allow starting service with user's realuid

12 years agoe1000: reset hardware before stopping
Thomas Veerman [Mon, 30 Jan 2012 14:32:31 +0000 (14:32 +0000)]
e1000: reset hardware before stopping

12 years agoINET: remove erroneous assert
Thomas Veerman [Mon, 30 Jan 2012 15:14:19 +0000 (15:14 +0000)]
INET: remove erroneous assert

The queue may contain established connections which have
tc_connInprogress clear.

12 years agoDon't panic on a misconfigured machine
Thomas Veerman [Mon, 30 Jan 2012 15:12:12 +0000 (15:12 +0000)]
Don't panic on a misconfigured machine

12 years agoAdd permission test for bind and socket
Thomas Veerman [Fri, 27 Jan 2012 16:06:43 +0000 (16:06 +0000)]
Add permission test for bind and socket

Also, apply forbidden patch to VFS from AVFS (fixes hanging test56 if
it has the permission test).

12 years agoINET: drop privileges upon startup
Thomas Veerman [Fri, 27 Jan 2012 14:21:10 +0000 (14:21 +0000)]
INET: drop privileges upon startup

12 years agoAPFS: drop privileges upon startup
Thomas Veerman [Fri, 27 Jan 2012 14:18:41 +0000 (14:18 +0000)]
APFS: drop privileges upon startup

Move SERVICE_LOGIN to rs.h global header so it's accessible for all.

12 years agoAVFS: make forbidden check for specific proc instead of fp
Thomas Veerman [Fri, 27 Jan 2012 13:54:35 +0000 (13:54 +0000)]
AVFS: make forbidden check for specific proc instead of fp

12 years agoAVFS: initialize root FS before receiving new work
Thomas Veerman [Fri, 27 Jan 2012 13:38:40 +0000 (13:38 +0000)]
AVFS: initialize root FS before receiving new work

12 years agoPM: extend srv_fork to set a specific UID
Thomas Veerman [Fri, 27 Jan 2012 11:50:11 +0000 (11:50 +0000)]
PM: extend srv_fork to set a specific UID

Currently, all servers and drivers run as root as they are forks of
RS. srv_fork now tells PM with which credentials to run the resulting
fork. Subsequently, PM lets VFS now as well.

This patch also fixes the following bugs:
 - RS doesn't initialize the setugid variable during exec, causing the
   servers and drivers to run setuid rendering the srv_fork extension
   useless.
 - PM erroneously tells VFS to run processes setuid. This doesn't
   actually lead to setuid processes as VFS sets {r,e}uid and {r,e}gid
   properly before checking PM's approval.

12 years agoPrevent the ramdisk makefile from failing if the last image is not ELF
Erik van der Kouwe [Fri, 27 Jan 2012 12:09:26 +0000 (13:09 +0100)]
Prevent the ramdisk makefile from failing if the last image is not ELF

12 years agoSMP - clock calibration spurious IRQ deadlock fix
Tomas Hruby [Thu, 26 Jan 2012 11:39:40 +0000 (11:39 +0000)]
SMP - clock calibration spurious IRQ deadlock fix

 - this patch fixes a deadlock which may occur if we get a
   spurious interrupt while calibrating clocks during the boot
   time. Since we never handle interrupts while in the kernel
   (BKL locked) the interrupt code locks the lock. This is a
   different situation, a corner case, boot time only. We do not
   return to userspace but to the kernel, so the BKL is not
   unlocked. So we need irq handler which leaves the BKL
   unlocked.  The clock handler does it already, this patch adds
   a dummy spurious irq handler for the same reason. It is better
   to handle the situation this way to keep the normal runtime
   code simple.

12 years agoSMP - no_apic=0 and acpi=1 set when CONFIG_SMP=y
Tomas Hruby [Wed, 25 Jan 2012 19:02:13 +0000 (19:02 +0000)]
SMP - no_apic=0 and acpi=1 set when CONFIG_SMP=y

- this is a temporary change which makes images compiled for SMP
  boot in SMP mode by default.

- this change is needed until we can configure the multiboot
  images from the boot loader again.

12 years agoRevert 93b9873a562b11dfedf5f4e53ef87bf256d80207
Tomas Hruby [Wed, 25 Jan 2012 18:59:18 +0000 (18:59 +0000)]
Revert 93b9873a562b11dfedf5f4e53ef87bf256d80207

- non need to have free PDEs per CPU since we only run one
  instance of the kernel at any time

12 years agomtree: zoneinfo dirs
Ben Gras [Fri, 20 Jan 2012 18:13:20 +0000 (19:13 +0100)]
mtree: zoneinfo dirs

12 years agoDon't overwrite old mv, ln, cp, etc man pages with new rm
Antoine Leca [Thu, 19 Jan 2012 10:12:55 +0000 (10:12 +0000)]
Don't overwrite old mv, ln, cp, etc man pages with new rm

12 years agoDon't print events that happen often
Thomas Veerman [Thu, 19 Jan 2012 17:06:14 +0000 (17:06 +0000)]
Don't print events that happen often

12 years agolseek should not yield a negative file position
Thomas Veerman [Mon, 16 Jan 2012 15:09:55 +0000 (15:09 +0000)]
lseek should not yield a negative file position

12 years agoDon't try to find file position beyond double indirect blocks
Thomas Veerman [Mon, 16 Jan 2012 14:46:47 +0000 (14:46 +0000)]
Don't try to find file position beyond double indirect blocks

12 years agoAdd support for survival of crashed FSs
Thomas Veerman [Thu, 19 Jan 2012 14:21:46 +0000 (14:21 +0000)]
Add support for survival of crashed FSs

When an FS crashes, VFS will clean up resources tied to that FS:
 - Pending requests to the FS are canceled (i.e., fail with EIO)
 - Threads waiting for a reply are stopped (i.e., fail with EIO)
 - Open files are marked invalid. Future operations on a file descriptor
   will cause EBADF errors.
 - vmnt entry is cleared, so in-flight system calls that got past the
   file descriptor check but not yet talking to the crashed FS, will
   fail with EIO.
 - The reference counter of the mount point is decreased, effectively
   removing the crashed FS from the file system tree. Descendants of
   this part of the tree are unreachable by means of a path, but can
   still be unmounted by feeding the block special file to unmount(2).

This patch also gets rid of the "not a known driver endpoint" messages
during shutdown.

12 years agomfs: mark blocks clean when invalidated
Ben Gras [Fri, 13 Jan 2012 15:05:32 +0000 (16:05 +0100)]
mfs: mark blocks clean when invalidated

. it could happen that newly filled blocks were still marked
  dirty
. causing unnecessary i/o and the new warning of the superblock
  being written

12 years agoUse correct value for _NSIG
Thomas Veerman [Mon, 16 Jan 2012 11:42:29 +0000 (11:42 +0000)]
Use correct value for _NSIG

User processes can send signals with number up to _NSIG. There are a few
signal numbers above that used by the kernel, but should explicitly not
be included in the range or range checks in PM will fail.

The system processes use a different version of sigaddset, sigdelset,
sigemptyset, sigfillset, and sigismember which does not include a range
check on signal numbers (as opposed to the normal functions used by normal
processes).

This patch unbreaks test37 when the boot image is compiled with GCC/Clang.

12 years agoINET: initialize timer to not-in-use
Thomas Veerman [Fri, 13 Jan 2012 16:48:46 +0000 (16:48 +0000)]
INET: initialize timer to not-in-use

12 years agoNew zoneinfo port from NetBSD
Thomas Veerman [Mon, 16 Jan 2012 11:03:25 +0000 (11:03 +0000)]
New zoneinfo port from NetBSD

12 years agoReplace rm and rmdir with NetBSD version
Thomas Veerman [Mon, 16 Jan 2012 10:46:14 +0000 (10:46 +0000)]
Replace rm and rmdir with NetBSD version

12 years agoRemove unused variable
Thomas Veerman [Thu, 12 Jan 2012 16:58:55 +0000 (16:58 +0000)]
Remove unused variable

12 years agoIncrease thread stack space for GCC compiled images
Thomas Veerman [Thu, 12 Jan 2012 16:35:36 +0000 (16:35 +0000)]
Increase thread stack space for GCC compiled images

12 years agoAVFS: Return actual last dir when path is named by a symlink
Thomas Veerman [Thu, 12 Jan 2012 11:32:31 +0000 (11:32 +0000)]
AVFS: Return actual last dir when path is named by a symlink

Last_dir didn't consider paths that end in a symlink and hence didn't
actually return the last_dir when provided with one. For example,
/var/log is a symlink to /usr/log. Issuing `>/var/log' would trigger
an assert in AVFS, because /var/ is not the actual last directory; /usr/
is.

Last_dir now verifies the final component is not a symlink. If it is, it
follows the symlink and restarts finding of the last the directory.

12 years agovfs/avfs: renumber stat calls so as to be unique
David van Moolenbroek [Thu, 12 Jan 2012 23:49:37 +0000 (00:49 +0100)]
vfs/avfs: renumber stat calls so as to be unique

The old stat call numbers are still supported for a while.

12 years agoCut PM out of the adddma/deldma/getdma call path
David van Moolenbroek [Thu, 12 Jan 2012 23:23:04 +0000 (00:23 +0100)]
Cut PM out of the adddma/deldma/getdma call path

12 years agoRemove obsolete PROCSTAT/getsigset call.
David van Moolenbroek [Thu, 12 Jan 2012 22:33:46 +0000 (23:33 +0100)]
Remove obsolete PROCSTAT/getsigset call.

12 years agoImplement AcpiOsStall, AcpiOsSleep, AcpiOsGetTimer
Jan Wieck [Fri, 13 Jan 2012 18:35:13 +0000 (18:35 +0000)]
Implement AcpiOsStall, AcpiOsSleep, AcpiOsGetTimer

- change AcpiOsRemoveInterruptHandler() to print a warning
  instead of panic.

- we do the same in AcpiOsInstallInterruptHandler().

Signed-off-by: Tomas Hruby <thruby@few.vu.nl>
12 years agovm_remap_ro
Ben Gras [Mon, 28 Nov 2011 18:05:50 +0000 (19:05 +0100)]
vm_remap_ro

- allows shared memory to be mapped in readonly

- ben@minix3.org & tom@minix3.org

12 years agoVM - vm_unmap() takes SELF as valid argument
Tomas Hruby [Tue, 18 Oct 2011 18:21:07 +0000 (18:21 +0000)]
VM - vm_unmap() takes SELF as valid argument

12 years agoVM - clear vminhibit iff it was set
Tomas Hruby [Sun, 6 Nov 2011 21:37:34 +0000 (21:37 +0000)]
VM - clear vminhibit iff it was set

12 years agoSMP - asyn send SMP safe
Tomas Hruby [Tue, 25 Oct 2011 18:32:30 +0000 (18:32 +0000)]
SMP - asyn send SMP safe

- we must not deliver messages from/to unstable address spaces.
  In such a case, we must postpone the delivery. To make sute
  that a process which is expecting an asynchronous message does
  not starve, we must remember that we skipped delivery of some
  messages and we must try to deliver again once the source
  address space is stable again.

12 years agoSMP - smp_schedule()
Tomas Hruby [Fri, 4 Nov 2011 17:59:31 +0000 (17:59 +0000)]
SMP - smp_schedule()

- always issues an IPI

12 years agoSMP - cpu_is_idle made volatile
Tomas Hruby [Fri, 4 Nov 2011 17:47:45 +0000 (17:47 +0000)]
SMP - cpu_is_idle made volatile

12 years agoSMP - fixed usage of stale TLB entries
Tomas Hruby [Fri, 4 Nov 2011 17:33:07 +0000 (17:33 +0000)]
SMP - fixed usage of stale TLB entries

- when kernel copies from userspace, it must be sure that the TLB
  entries are not stale and thus the referenced memory is correct

- everytime we change a process' address space we set p_stale_tlb
  bits for all CPUs.

- Whenever a cpu finds its bit set when it wants to access the
  process' memory, it refreshes the TLB

- it is more conservative than it needs to be but it has low
  overhead than checking precisely

12 years agoSMP - fixed IPI livelock
Tomas Hruby [Wed, 26 Oct 2011 15:43:36 +0000 (15:43 +0000)]
SMP - fixed IPI livelock

- two CPUs can issue IPI to each other now without any hazzard

- we must be able to handle synchronous scheduling IPIs from
  other CPUs when we are waiting for attention from another one.
  Otherwise we might livelock.

- necessary barriers to prevent reordering

12 years agoSMP - do_update fix
Tomas Hruby [Sun, 16 Oct 2011 22:05:40 +0000 (22:05 +0000)]
SMP - do_update fix

- adjust_proc_slot() must preserve scheduling info, for example
  on which cpu the process should run

- do_update() - consitency check

12 years agoKERNEL - cause SIGSEGV if bad pointer to kernel
Tomas Hruby [Mon, 5 Dec 2011 01:08:48 +0000 (01:08 +0000)]
KERNEL - cause SIGSEGV if bad pointer to kernel

12 years agoKERNEL - mini_senda simplification
Tomas Hruby [Fri, 4 Nov 2011 18:25:27 +0000 (18:25 +0000)]
KERNEL - mini_senda simplification

12 years agoKERNEL - has_pending() not exposed
Tomas Hruby [Mon, 31 Oct 2011 15:21:08 +0000 (15:21 +0000)]
KERNEL - has_pending() not exposed

- has_pending() takes a special argument that tells the code
  whether we are scanning for asynchronous message or something
  else.

- has_pending() is not used directly anymore

- the new functions are wrappings around has_pending() to make
  the use more comfortable.

- these functions should become static inline eventually

12 years agoKERNEL - do_privctl() fix
Tomas Hruby [Tue, 18 Oct 2011 18:19:24 +0000 (18:19 +0000)]
KERNEL - do_privctl() fix

- after a driver is restarted, do not register permissions
  which are already set again.

12 years agoIncrease ramdisk size for clang
Arun Thomas [Thu, 12 Jan 2012 16:01:48 +0000 (17:01 +0100)]
Increase ramdisk size for clang

12 years agoAllow clang for kernel compilation
Antoine Leca [Mon, 26 Dec 2011 16:33:18 +0000 (17:33 +0100)]
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.

12 years agoFix tll state bug
Thomas Veerman [Wed, 11 Jan 2012 10:20:44 +0000 (10:20 +0000)]
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.

12 years ago/etc/shells
Ben Gras [Wed, 11 Jan 2012 14:20:48 +0000 (15:20 +0100)]
/etc/shells

12 years agovm: clear map cache after kernel requests
Ben Gras [Mon, 2 Jan 2012 17:20:02 +0000 (18:20 +0100)]
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)

12 years agomove pax and chmod for useradd
Ben Gras [Tue, 10 Jan 2012 23:26:09 +0000 (00:26 +0100)]
move pax and chmod for useradd

12 years agorc: transitional fix for old fstab
David van Moolenbroek [Tue, 10 Jan 2012 14:05:28 +0000 (15:05 +0100)]
rc: transitional fix for old fstab

12 years agoConvert s_block_size on MFSv3.
Evgeniy Ivanov [Sun, 8 Jan 2012 19:52:57 +0000 (23:52 +0400)]
Convert s_block_size on MFSv3.

On MFSv3 s_block_size is stored on disk, hence bytes should be converted
on big endian.

12 years agoanother UPDATING tweak
Ben Gras [Sun, 8 Jan 2012 16:34:46 +0000 (16:34 +0000)]
another UPDATING tweak

12 years agoadded etcforce to UPDATING
Ben Gras [Sun, 8 Jan 2012 15:56:31 +0000 (15:56 +0000)]
added etcforce to UPDATING

12 years agoAdded UPDATING about mfs clean flag changes.
Ben Gras [Thu, 5 Jan 2012 23:28:08 +0000 (00:28 +0100)]
Added UPDATING about mfs clean flag changes.

12 years agoavfs: fix for root file system not being unmounted
David van Moolenbroek [Wed, 4 Jan 2012 13:10:10 +0000 (14:10 +0100)]
avfs: fix for root file system not being unmounted

Also no longer have avfs crash whenever a file system server crashes.

12 years agosys/queue.h: add LIST_FOREACH_SAFE to netbsd copy
David van Moolenbroek [Fri, 23 Dec 2011 18:05:09 +0000 (19:05 +0100)]
sys/queue.h: add LIST_FOREACH_SAFE to netbsd copy

12 years agohgfs: fix atime/mtime attribute setting bug
David van Moolenbroek [Fri, 23 Dec 2011 18:02:57 +0000 (19:02 +0100)]
hgfs: fix atime/mtime attribute setting bug

Reported and investigated by Antoine Leca.

12 years agohgfs: resolve gcc -W warnings
David van Moolenbroek [Fri, 23 Dec 2011 18:01:56 +0000 (19:01 +0100)]
hgfs: resolve gcc -W warnings

12 years agoMove hgfs.h to minix includes directory
David van Moolenbroek [Fri, 23 Dec 2011 18:01:14 +0000 (19:01 +0100)]
Move hgfs.h to minix includes directory

12 years agofix for checking CLEAN-ness of ramdisk image
Ben Gras [Fri, 23 Dec 2011 14:02:35 +0000 (15:02 +0100)]
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

12 years agoimport netbsd ext2fs fsck and newfs
Ben Gras [Thu, 22 Dec 2011 16:54:36 +0000 (17:54 +0100)]
import netbsd ext2fs fsck and newfs

12 years agonetbsd fsck driver import
Ben Gras [Thu, 22 Dec 2011 21:51:26 +0000 (22:51 +0100)]
netbsd fsck driver import

. fsck driver parses /etc/fstab and invokes sub-fscks
. further simplifies fs handling in rc

12 years agoimport netbsd libprop
Ben Gras [Thu, 22 Dec 2011 16:42:19 +0000 (17:42 +0100)]
import netbsd libprop

12 years agomfs: clean flag
Ben Gras [Thu, 22 Dec 2011 00:29:27 +0000 (01:29 +0100)]
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>
12 years agomfs: restore readonly mounting
Ben Gras [Thu, 22 Dec 2011 00:29:27 +0000 (01:29 +0100)]
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>
12 years agomfs: use macros to mark blocks and inodes dirty
Ben Gras [Thu, 22 Dec 2011 00:29:27 +0000 (01:29 +0100)]
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>
12 years agovfs,avfs: verify an interpreter was found on #! line
Ben Gras [Tue, 20 Dec 2011 15:20:32 +0000 (16:20 +0100)]
vfs,avfs: verify an interpreter was found on #! line

. if not, NULL *interp is dereferenced

12 years agoMake all tests use common.c
Thomas Veerman [Fri, 16 Dec 2011 14:45:53 +0000 (14:45 +0000)]
Make all tests use common.c

This will make sure that all file descriptors are closed through
the use of the start() function.

12 years agoAVFS: Use scratchpad instead of m_in to pass around file descriptors
Thomas Veerman [Wed, 21 Dec 2011 10:52:51 +0000 (10:52 +0000)]
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

12 years agoDon't repeat out-of-space messages
Thomas Veerman [Fri, 16 Dec 2011 09:17:37 +0000 (09:17 +0000)]
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.

12 years agoCompare read/write buf size against SSIZE_MAX instead of "< 0"
Thomas Veerman [Fri, 16 Dec 2011 08:45:04 +0000 (08:45 +0000)]
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.

12 years agoMark filp as in use on fd dup'ing
Thomas Veerman [Fri, 16 Dec 2011 08:43:01 +0000 (08:43 +0000)]
Mark filp as in use on fd dup'ing

12 years agoACPI - fixed initialization of pci briges irqtable
Tomas Hruby [Tue, 20 Dec 2011 08:03:43 +0000 (08:03 +0000)]
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.

12 years agoACPI extended irq - fixed uninitialized variable
Tomas Hruby [Tue, 20 Dec 2011 08:01:21 +0000 (08:01 +0000)]
ACPI extended irq - fixed uninitialized variable

12 years agoSMP - kernel links again
Tomas Hruby [Mon, 19 Dec 2011 14:17:26 +0000 (14:17 +0000)]
SMP - kernel links again

12 years agoSMP - fixed compilation and removed warnings
Tomas Hruby [Thu, 15 Dec 2011 09:56:08 +0000 (09:56 +0000)]
SMP - fixed compilation and removed warnings

12 years agolibsys: unbreak getidle()
David van Moolenbroek [Fri, 16 Dec 2011 16:06:09 +0000 (16:06 +0000)]
libsys: unbreak getidle()

12 years agotty timeout bugfix
Ben Gras [Fri, 16 Dec 2011 08:54:20 +0000 (09:54 +0100)]
tty timeout bugfix

. timeouts were always delivered to console
. Fix by Lucio Tomarchio

12 years agonbsd.config: make timezone explicit
Ben Gras [Wed, 14 Dec 2011 16:02:31 +0000 (17:02 +0100)]
nbsd.config: make timezone explicit

12 years agoworkaround for cvs not handling many args
Ben Gras [Wed, 14 Dec 2011 00:14:11 +0000 (01:14 +0100)]
workaround for cvs not handling many args

12 years agodec21140A: change debugging key to Shift+F7
David van Moolenbroek [Mon, 12 Dec 2011 15:45:45 +0000 (16:45 +0100)]
dec21140A: change debugging key to Shift+F7

12 years agoahci: NCQ support
Raja Appuswamy [Wed, 7 Dec 2011 14:44:28 +0000 (15:44 +0100)]
ahci: NCQ support

12 years agoDiscard process' pending request upon incoming PM request
Thomas Veerman [Fri, 9 Dec 2011 10:43:13 +0000 (10:43 +0000)]
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.