Commit Graph

7293 Commits

Author SHA1 Message Date
dyoung
0b429bf76a Keep a generation number, mountgen, that increases every time a
filesystem is mounted.  Synchronize access to the number with a
mutex.  When a struct mount, mp, is allocated, assign the current
generation number to mp->mnt_gen.  Introduce vfs_unmount_forceone()
that forcefully unmounts the most recently mounted filesystem.

Refactor: extract vfs_shutdown1() from vfs_shutdown().  Extract
vfs_sync_all() from vfs_shutdown1().

Print more progress indications while we're unmounting all of the
filesystems during shutdown.

We increase the reference count on mp before calling dounmount(mp),
but we do not decrease it if dounmount(mp) fails, and neither does
dounmount(mp).  So decrease the reference count if dounmount(mp)
fails.

Change the loop terminating condition in vfs_unmountall1() to (mp
!= (void *)&mountlist) from !CIRCLEQ_EMPTY(&mountlist), because we
may not ever empty the list, especially if we're not forcing the
filesystems to unmount.
2009-06-26 18:53:07 +00:00
christos
2ee7096547 magic symlink cleanup:
- use size_t for len
- don't call strlen multiple times in macro
- add gid
- off by one in bounds calculation
2009-06-26 15:49:03 +00:00
elad
55f182207a Wow... too much Python.
Fix DIAGNOSTIC build breakage: print -> printf.

Pointed out by Kurt Schreiner on current-users@:

    http://mail-index.netbsd.org/current-users/2009/06/23/msg009815.html
2009-06-23 23:04:11 +00:00
elad
870920260d Move the implementation of vaccess() to genfs_can_access(), in line with
the other routines of the same spirit.

Adjust file-system code to use it.

Keep vaccess() for KPI compatibility and to keep element of least
surprise. A "diagnostic" message warning that vaccess() is deprecated will
be printed when it's used (obviously, only in DIAGNOSTIC kernels).

No objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005310.html
2009-06-23 19:36:38 +00:00
cegger
4765113ada Return type of cpu_number(9) is cpuid_t which is effectively unsigned long.
So cast return type to unsigned long.
Fixes build for alpha GENERIC kernel.
2009-06-20 11:10:40 +00:00
mrg
8520c31093 when printing a ddb stack trace when entering ddb, include the cpu number 2009-06-18 06:26:58 +00:00
dyoung
61fa5bb9be Make kobj_stat() return ENOSYS instead of panicking ("not modular")
on non-MODULAR kernels.  Make a few kobj_stat() callers check for
a non-zero return code and deal gracefully.
2009-06-17 21:04:25 +00:00
kardel
a888100516 Make PPS work with fast time counters (> 2GHz)
by making the pps count time stamp and the update
time stamp u_int64.
The time delta between two PPS events can now
be correctly calculated avoiding any unaccounted
for wraps with 32-bit counters.
2009-06-14 13:16:32 +00:00
plunky
6e74f4625b Writes on the controlling tty were not being awoken from blocks,
use the correct condvar to make this happen.

this fixes PR/41566
2009-06-12 09:26:50 +00:00
yamt
1a7984dbf3 do_posix_fadvise:
- deactivate pages on POSIX_FADV_DONTNEED.
	- more sanity checks.  fix a panic in genfs_getpages
	  introduced by the previous (rev.1.15).
2009-06-10 23:48:10 +00:00
yamt
724fd50176 don't make F_GETLK or the common case of F_UNLCK fail for per-user limit. 2009-06-10 22:34:35 +00:00
yamt
5216f042b0 lf_split: cv_destroy a condvar before clobbering it. 2009-06-10 22:23:15 +00:00
yamt
1763b7795c do_posix_fadvise: on POSIX_FADV_WILLNEED, start prefeching of object's pages. 2009-06-10 01:56:34 +00:00
jnemeth
cbd3656645 Add the MODCTL_NO_PROP flag to tell the kernel to ignore <module>.prop.
Add the '-P' option to modload(8) to set this flag.
2009-06-09 20:35:02 +00:00
jnemeth
32b670979a Add code to merge the modload "command line" with <module>.prop. 2009-06-09 19:09:03 +00:00
yamt
5c0faad4bd fd_free: fix posix advisory locks. PR/41549 from HITOSHI OSADA. 2009-06-08 00:19:56 +00:00
jnemeth
1bdbe18dce Read in a <module>.prop file if it exists and internalize then pass it
to the <module> being loaded.

XXX A <module>.prop file will override anything on the "command line".
This will be fixed in the next commit.
2009-06-07 09:47:31 +00:00
yamt
6f174f1311 shut up the following assertion failure and add a comment.
panic: kernel diagnostic assertion "!fd_isused(fdp, fd)" failed: file "/siro/nbsd/src/sys/kern/kern_descrip.c", line 175
2009-06-07 09:39:02 +00:00
jnemeth
fa6c059bce add KASSERT(p != NULL); to kmem_free() 2009-06-03 22:54:51 +00:00
pooka
48fb37f153 opt for _KERNEL_OPT 2009-06-03 15:07:30 +00:00
pooka
b89c189be7 Declare extern syscallnames in a header. 2009-06-02 23:21:37 +00:00
yamt
de0c01fd1d do_posix_fadvise: turn some KASSERTs into CTASSERTs. 2009-05-31 22:15:13 +00:00
yamt
31a7ec7dc7 sched_pstats_hook: fix estcpu decay.
this makes my desktop usable when running "make -j4".
2009-05-31 04:13:33 +00:00
dyoung
2bc3b9efe1 In config_detach(9), if device deactivation fails with EOPNOTSUPP,
don't treat it as an error.  This should stop the kernel from
panicking in config_detach(9) when sd(4)/wd(4) detach.
2009-05-29 23:27:08 +00:00
yamt
75c4e4fde7 fd_free: reset fd_himap/lomap to make fd_checkmaps comfortable. PR/41487. 2009-05-29 00:10:52 +00:00
yamt
4f22237449 wrap a long line. 2009-05-28 22:17:04 +00:00
pooka
8027ac8f1f Make domaininit() take an argument which determines if it should
add the special PF_ROUTE domain or not (if available).
2009-05-27 23:44:35 +00:00
hannken
5b4e527c76 PR kern/39536: bufq related problem when writing DVDR and DVDRWs.
Remove a race where physio_done() may use memory already freed.

Observed by Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>.
2009-05-26 14:59:31 +00:00
jnemeth
d73b80a12b Move all namei flags handling into kobj_load_file().
When I originally wrote this, I was going for maximum flexibility.
However, after a private discussion with dholland@, I see how this
will cause problems with the future world order of namei whenever
that might be.  At the moment, I don't need the extra flexibility,
but if something comes up this may have to be revisited.
2009-05-26 08:34:22 +00:00
elad
ae660023a4 PR/41489: Stathis Kamperis: etpriority(2) returns EACCES instead of EPERM
Per discussion on the PR's audit trail, put back original checks for now.
2009-05-26 06:57:38 +00:00
ad
0913d2e2f5 PR kern/41487: kern_descrip.c assertion failure
Remove bogus assertion.
2009-05-26 00:42:33 +00:00
rmind
75f55a05eb - Slightly rework the way permissions are checked. Neither mq_receive() not
mq_send() should fail due to permissions.  Noted by Stathis Kamperis!
- Check for empty message queue name (POSIX does not allow this for regular
  files, and it's weird), check for DTYPE_MQUEUE, fix permission check in
  mq_unlink(), clean up.
2009-05-26 00:39:14 +00:00
jnemeth
a15ece476a Phase 0.5 of my options MODULAR enhancements. As suggested by ad@,
these commits move all path handling into module_do_load() from
kobj_load_file().  This way the final path used to load a module
is available for loading <module>.plist, which will store parameters
for a module.  The end goal of this project is good support for
MODULAR device drivers.
2009-05-25 22:33:00 +00:00
ad
d991fcb3b6 More changes to improve kern_descrip.c.
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
ad
193d553767 Split out kobj structures so crash/ddb can get at them. 2009-05-24 15:00:24 +00:00
ad
27695c89cb ddb: don't try to stat builtin modules. 2009-05-24 14:54:17 +00:00
ad
7d20bf2a9e Bus scans can make it appear as if the system has paused, so
twiddle constantly while config_interrupts() jobs are running.
2009-05-24 12:27:50 +00:00
ad
3cb7a24bec Make descriptor access and file allocation cheaper in many cases,
mostly by avoiding a bunch of atomic operations.
2009-05-23 18:28:05 +00:00
ad
f0545a5e5b - Add lwp_pctr(), get an LWP's preemption/ctxsw counter.
- Fix a preemption bug in CURCPU_IDLE_P() that can lead to a bogus
  assertion failure on DEBUG kernels.
- Fix MP/preemption races with timecounter detachment.
2009-05-23 18:21:20 +00:00
ad
2fc2b08001 - Add lwp_pctr(), get an LWP's preemption/ctxsw counter.
- Fix a preemption bug in CURCPU_IDLE_P() that can lead to a bogus
  assertion failure on DEBUG kernels.
- Fix MP/preemption races with timecounter detachment.
2009-05-23 17:08:04 +00:00
ad
cb95ab6e35 Fix a crash observed when trying to load a corrupted ELF image. 2009-05-23 15:13:57 +00:00
dyoung
85d8d1fcdd On second thought, let's call disk_predetach() disk_begindetach().
Verbs are good.
2009-05-20 03:26:21 +00:00
dyoung
a76a7fd159 Encapsulate the checks that I do before detaching a disk(9) provider
in a pre-detachment routine, disk_predetach().
2009-05-19 23:42:05 +00:00
bouyer
8ebd73cde8 Back out rev 1.27 now that MD implementations of spl*() have been fixed
to be a memory barrier.
2009-05-18 21:31:27 +00:00
ad
77e6671be0 - Remove unneded uvm_lwp_hold(), uvm_lwp_rele().
- Make physio_concurrency tuneable via crash(8).
- Update comments.
2009-05-18 21:12:33 +00:00
ad
92ee1731b0 Updates to f_flag need to be made with atomics. 2009-05-17 10:08:38 +00:00
yamt
7e13bf31c7 remove FILE_LOCK and FILE_UNLOCK. 2009-05-17 05:54:42 +00:00
rmind
ba3fa2c82f sys_mq_open: remove broken access flag check.
Noted by Stathis Kamperis.
2009-05-16 23:58:09 +00:00
yamt
5368015c69 sysctl_doeproc:
- simplify.
	- KERN_PROC: fix possible stale proc pointer dereference.
	- KERN_PROC: don't do copyout with proc_lock held.
2009-05-16 12:02:00 +00:00
yamt
805df27570 rw_vector_exit: remove a redundant condition. 2009-05-16 08:36:32 +00:00
yamt
513f4955a7 put a flag bit into v_usecount to prevent vtryget during getcleanvnode.
this fixes the following deadlock.

	a thread doing getcleanvnode:
	pick a vnode
	acqure v_interlock
	v_usecount++
	call vclean

		now, another thread doing cache_lookup:
		picks the vnode
		vtryget succeed
		vn_lock succeed

	now in vclean:
	set VI_XLOCK (too late to be noticed by the competing thread)
	wait on the vnode lock (this might violate locking order)

the use of a flag bit was suggested by Andrew Doran.  PR/41374.
2009-05-16 08:29:53 +00:00
pooka
e8f5dfa79e regen: pad -> PAD 2009-05-15 15:52:39 +00:00
pooka
6c68c84345 Use argname PAD to signal that an argument is used only for padding
and not part of the C interface.  Use this information for rump
syscalls to generate syscall interfaces without the extra parameter.
2009-05-15 15:51:27 +00:00
pooka
500fdd36a7 In addition to off_t alignment, check for dev_t and time_t too
(we don't currently have any syscalls passing time_t, though)
2009-05-15 14:52:47 +00:00
yamt
d4da6c3d2e don't forget to skip marker processes. 2009-05-12 11:42:12 +00:00
yamt
bed2400e59 lockdebug fixes for rw_tryupgrade/rw_downgrade. 2009-05-09 03:33:10 +00:00
yamt
9031548af6 exit1: fix a race with do_sys_wait/proc_free. 2009-05-08 13:32:59 +00:00
bouyer
f48b5c49cc Declare sh_flags volatile.
Without it, on ports where splhigh() is inline, the compiler will optimise
the second SOFTINT_PENDING test in softint_schedule(). A dissasembly
of softint_schedule() with and without the volatile sh_flags confirm this
on sparc.
Because of this there is a race that could lead to the softhand_t
being enqueued twice on si_q, leading to a corrupted queue and
some handler being SOFTINT_PENDING but never called.

Should fix PR kern/38637
2009-05-05 20:26:36 +00:00
yamt
183ff8793d sysctl_doeproc: fix a bug in rev.1.135.
don't forget to mark our marker process PK_MARKER.
this fixes crashes in sched_pstats, etc.
2009-05-04 14:52:33 +00:00
yamt
6f0983460b when freeing cn_pnbuf, make it NULL if DIAGNOSTIC. 2009-05-04 06:05:19 +00:00
yamt
706e6928e0 tweak some assertions on so_head to make them more meaningful. 2009-05-04 06:02:40 +00:00
elad
414eb0a314 Move dovfsusermount to secmodel_bsd44, where it really belongs.
The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

    http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
    http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html
2009-05-03 21:25:44 +00:00
pooka
ec3ee0abf9 Include some debug print routines if DEBUGPRINT is defined. This
way they can be included without having to include DDB.
(arguably all print routines should be behind #ifdef DEBUGPRINT
and options DDB should define that macro, but I'll tackle that later)
2009-05-03 16:52:54 +00:00
elad
b1bd59c577 Fix locking around mountlist usage, as pointed out by ad@ in:
http://mail-index.netbsd.org/source-changes-d/2009/04/22/msg000322.html
  http://mail-index.netbsd.org/tech-kern/2009/04/22/msg004897.html

Use vfs_busy() and vfs_unbusy(), and properly iterate the mountlist.
2009-05-02 21:47:12 +00:00
pooka
fb42667d02 Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)
2009-05-02 14:13:28 +00:00
cegger
f2c0b025dc remove useless parenthesis 2009-05-01 08:27:41 +00:00
ad
922436b4c6 PR kern/41311: Mutex error: mutex_vector_enter: locking against myself 2009-04-30 20:41:33 +00:00
dyoung
662437b2c3 Remove extraneous parentheses. Fix spelling/grammar. No functional
change intended.
2009-04-30 20:39:08 +00:00
nonaka
3c6a17f5ff include sys/lwp.h for curlwp. 2009-04-30 05:15:36 +00:00
dyoung
dfec23a174 Extract vfs_unmountall1() from vfs_unmountall() for reuse. 2009-04-29 15:44:55 +00:00
dyoung
3e0a641f96 Extract common code from vfs_rootmountalloc(9) and mount_domount() into
a new struct mount-allocation routine, vfs_mountalloc(9).  Documentation
updates will follow.

Attention: Synchronization Oversight Committee!  In mount_domount(),
I postpone the call mutex_enter(&mp->mnt_updating) until right before
the VFS_MOUNT(9) call because (1) that looks to me like the earliest
possible opportunity for mp to become visible to any other LWP, because
it was just kmem_zalloc(9)'d and (2) it made extracting the common code
much easier.  Tell me if my reasoning is faulty.
2009-04-29 01:03:43 +00:00
dyoung
5c35d469c9 Cosmetic: remove unnecessary parentheses. 2009-04-28 20:56:40 +00:00
dyoung
9777865b42 Extract sockaddr_any_by_family() from sockaddr_any() for looking up a
wildcard ("any") address by protocol family instead of by sockaddr.
2009-04-28 20:54:50 +00:00
skrll
15c5c4397e copyin the modctl_load_t for the non-x86 world. Fixes PR/41294. 2009-04-28 17:57:00 +00:00
yamt
a6f64ec082 do_sys_utimes: fix a bug introduced by rev.1.367.
VA_UTIMES_NULL is in va_vaflags, not va_flags.
2009-04-28 03:01:15 +00:00
elad
bab57db991 Replace a NULL check that can never fire with a KASSERT().
Okay ad@.

(this change was originally part of the following commit:
    http://mail-index.netbsd.org/source-changes/2009/04/25/msg220346.html)
2009-04-25 18:53:43 +00:00
rmind
440e5485e0 - Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.
2009-04-25 15:06:31 +00:00
ad
9b7896c50a A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.

For rwlocks, always enable the explicit membars. They were disabled only
on x86, and since they are not in the fast-path it's not a big deal.
TODO: convert these to an atomic_membar_foo() or similar that does ordering
between regular data references and atomic references.
2009-04-24 17:53:06 +00:00
elad
f68b0219b0 Per discussion on tech-kern@:
- Replace use of label/goto with returns

  - Rename, change prototype of, and move functions from vfs_subr.c to
    genfs_vnops.c
2009-04-22 22:57:08 +00:00
yamt
091b54f602 fix an indentation error. no functional change. 2009-04-21 00:02:37 +00:00
elad
d4cc1b437c PR/41251: YAMAMOTO Takashi: veriexec locking seems broken
Part 1: Take the mountlist_lock before traversing the mount list.
2009-04-20 22:09:54 +00:00
elad
386808d4a0 Refactor some duplicated file-system code.
Proposed and received no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/18/msg004843.html
2009-04-20 18:06:26 +00:00
ad
4d8f47ae2f cpuctl:
- Add interrupt shielding (direct hardware interrupts away from the
  specified CPUs). Not documented just yet but will be soon.

- Redo /dev/cpu time_t compat so no kernel changes are needed.

x86:

- Make intr_establish, intr_disestablish safe to use when !cold.

- Distribute hardware interrupts among the CPUs, instead of directing
  everything to the boot CPU.

- Add MD code for interrupt sheilding. This works in most cases but there is
  a bug where delivery is not accepted by an LAPIC after redistribution. It
  also needs re-balancing to make things fair after interrupts are turned
  back on for a CPU.
2009-04-19 14:11:36 +00:00
ad
d857e7b19e call rw_obj_init() 2009-04-19 14:04:51 +00:00
ad
a8bd3c39aa Add rw_obj_*() functions to mirror the existing mutex functions.
Proposed on tech-kern quite some time ago.
2009-04-19 08:36:04 +00:00
tsutsui
d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
dyoung
d2a5799226 Do not interleave device detachment with device shutdown. Instead, try
over and over to detach all of the devices.  Stop when we cannot detach
even a single device in a cycle.  Call shutdown hooks on all of the
devices that remain attached.

This is another step toward the detach/unmount cycle that will help us
tear down arbitrary stacks of filesystems, ccd(4), raid(4), and vnd(4).
2009-04-17 20:45:09 +00:00
dyoung
b29e491b07 Make vfs_unmountall() return true if it was able to unmount any
filesystem at all, false otherwise.  This will support tearing down
stacks of filesystems, ccd(4), raid(4), and vnd(4).

Change the misleading variable name 'allerror' to 'any_error'.  Make it
a bool.
2009-04-17 20:22:52 +00:00
ad
acf9701a7e kpreempt: fix another bug, uintptr_t -> bool truncation. 2009-04-16 21:19:23 +00:00
rmind
d062d5d72b - Manage pid_table with kmem(9).
- Remove M_PROC and unused M_SESSION.
2009-04-16 14:56:41 +00:00
rmind
71923f262a Replace malloc with kmem(9). 2009-04-16 14:55:44 +00:00
skrll
cc65188940 0 -> NULL 2009-04-16 07:47:16 +00:00
rmind
523acc7d68 Avoid few #ifdef KSTACK_CHECK_MAGIC. 2009-04-16 00:17:19 +00:00
elad
2d1c968399 Remove a few KAUTH_GENERIC_ISSUSER in favor of more descriptive
alternatives.

Discussed on tech-kern:

	http://mail-index.netbsd.org/tech-kern/2009/04/11/msg004798.html

Input from ad@, christos@, dyoung@, tsutsui@.

Okay ad@.
2009-04-15 20:44:24 +00:00
yamt
87984ef060 pool_cache_put_paddr: add an assertion. 2009-04-15 11:45:18 +00:00
yamt
f0cdb5ac8d kpreempt: report a failure of cpu_kpreempt_enter. otherwise x86 trap()
loops infinitely.  PR/41202.
2009-04-15 11:44:20 +00:00
christos
86ba58fd64 Fix locking as Andy explained. Also fill in uid and gid like sys_pipe did. 2009-04-11 23:05:26 +00:00
christos
b859fbe7cb Fix PR/37878 and PR/37550: Provide stat(2) for all devices and don't use
fbadop_stat.
2009-04-11 15:47:33 +00:00
christos
bb55634e9d rename ctime to btime for consistency. 2009-04-11 15:46:18 +00:00
christos
bb2d65e097 - maintain timespec internally.
- set birthtime too.
2009-04-11 14:42:28 +00:00
yamt
bdeb01233f 0 -> NULL 2009-04-09 00:57:15 +00:00
yamt
e29a551d79 remove an unnecessary cast. 2009-04-09 00:44:32 +00:00
yamt
a227a1194c sonewconn: add an assertion. 2009-04-09 00:43:38 +00:00
yamt
2c68552273 0 -> NULL where appropriate 2009-04-09 00:37:32 +00:00
ad
48320d4cd3 soo_ioctl:
- cosmetic change after merge of socket locking patch.
- add a comment.
2009-04-08 21:02:09 +00:00
ad
9635fa6829 Patch out soo_drain until I fix it to work correctly. 2009-04-08 20:58:40 +00:00
dyoung
0873e7f203 Cosmetic: join lines. 2009-04-07 18:16:28 +00:00
tsutsui
3d4412216c Explicitly pass a specific buffer length to format_bytes() to
make it print memory sizes in humanized readable digits.
2009-04-07 10:49:54 +00:00
dyoung
ac5f968c78 Fix spelling. 2009-04-06 21:22:47 +00:00
bouyer
f8059f7e67 m_split0(): If the newly allocated mbuf holds only the header,
don't forget to set m_len to 0. Otherwise whatever will compute the size
of this chain (including s_split() itself if called again on this chain)
will get it wrong, leading to various issues.

Bug exposed by the NFS server code with linux clients using TCP mounts.
2009-04-05 16:31:21 +00:00
lukem
2b2f4703f2 fix sign-compare issues 2009-04-05 11:48:02 +00:00
ad
ddf65d893c Update the big comment block. 2009-04-04 22:34:03 +00:00
joerg
3cb902383f Allow querying for root devices in the tree by specifying an empty
device name. Ensure that l_devname is NUL-terminated and fail otherwise.
OK cube@
2009-04-04 21:49:05 +00:00
ad
c6367674d6 Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)
2009-04-04 10:12:51 +00:00
ad
4307e10df2 Add disk_isbusy(), iostat_isbusy(). 2009-04-04 07:30:09 +00:00
ad
117500b9b2 workqueue_finiqueue: our stack could be swapped out while enqueued to
a worker thread.
2009-04-03 19:34:19 +00:00
dyoung
e5320b0a17 Take out a noisy debug statement that slipped in with device-detachment
at shutdown.
2009-04-02 22:19:48 +00:00
ad
bbb900dedf banner: fix a minor bug. 2009-04-02 19:43:11 +00:00
drochner
eb4f9278bc In humanize_number(), avoid an integer overflow if the buffer
provided is "too large" (log10(2^64) = 19).
(It can still overflow if the input value is close to 2^64 but I don't
consider this a problem.)
fixes nonsense displayed as "total memory" on boot
2009-04-02 17:25:24 +00:00
dyoung
0d1ba3e899 During shutdown, detach devices in an orderly fashion.
Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.
2009-04-02 00:09:32 +00:00
christos
b5c4aec40f fix erroneously deleted assignment. 2009-03-30 22:22:44 +00:00
yamt
197e2d1b30 ARRAY_PRINT: 0 is a valid index. 2009-03-30 16:38:05 +00:00
christos
2b1b4bc6ef Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).
2009-03-29 19:21:19 +00:00
pooka
ad23953a5a protect allevents list with a mutex 2009-03-29 18:21:06 +00:00
christos
6e1db6cea1 - use itimespecfix to detect invalid timespecs
- use tstohz instead of mstohz to prevent overflow.
2009-03-29 17:54:12 +00:00
christos
94f59b4d43 PR/41094: Matteo Beccati: sigtimedwait returns EAGAIN instead of EINVAL if
timeout is invalid
2009-03-29 16:23:23 +00:00
ad
5d4e966fd0 Remove debug code from previous. 2009-03-29 15:23:54 +00:00
ad
f07d0eaa2d Add a cental banner() function to print the copyright and version info. 2009-03-29 10:58:28 +00:00
ad
f51a17bccf kernel memory guard for DEBUG kernels, proposed on tech-kern.
See kmem_alloc(9) for details.
2009-03-29 10:51:53 +00:00
ad
ead83a47c8 _lwp_setprivate: provide the value to MD code if a hook is present.
This will be used to support TLS. The MD method must match the ELF TLS spec
for that CPU architecture (if there is a spec).

At this time it is only implemented for i386, where it means setting the
per-thread base address for %gs. Please implement this for your platform!
2009-03-29 09:24:52 +00:00
pooka
2941a7af6e Include some headers to make rump_syscalls.h self-contained.
(not strictly correct wrt portability, but there are bigger fish
to saltgrill in that area)
2009-03-29 07:56:19 +00:00
rmind
be5c9950c6 kpsignal2: do not start process (when it is stopped) for all termination
signals (i.e. SA_KILL), just if SIGKILL (or SIGCONT).  Improve comments.

Make some functions static, remove unused sigrealloc() prototype.

Fixes PR/39814.  Similar patch reviewed by <ad>.
2009-03-29 05:02:46 +00:00
rmind
6b0e9f0301 fownsignal: pre-check for zero pgid, avoids locking of proc_lock. 2009-03-29 04:40:01 +00:00
mrg
fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
rmind
f70325ee02 - kpreempt_disabled: constify l.
- Few predictions.
- KNF.
2009-03-28 21:43:16 +00:00
rmind
4aca8329b0 sys_fcntl: use FD_CLOEXEC, instead of magic number '1'. 2009-03-28 21:42:19 +00:00
rmind
9c724ebaca Make inferior() function static, rename to p_inferior(), return bool. 2009-03-28 21:41:05 +00:00
rmind
ea3400a4b7 - proc_free(): no need assign 'p->p_pptr' to 'parent' many times,
re-use it where appropriate (proc_lock is held across usages).
- Undefine DEBUG_EXIT.
2009-03-28 21:38:55 +00:00
christos
0ca4fa8e5b revert previous; ctags has been fixed. 2009-03-28 18:43:20 +00:00
pooka
5e0d2571db mark a bunch of syscalls as RUMP 2009-03-28 16:33:40 +00:00
drochner
083fa0419a In sigput(), save the siginfo no matter whether SA_SIGINFO is set or not.
There are also sigtimedwait(2) et al. to catch signals without invoking
a signal handler. Fixes PR kern/41076 by Matteo Beccati (the first
test case, where the signal is sent before sigwaitinfo(2) gets called).
2009-03-27 10:58:38 +00:00
dyoung
6506e7a17d ctags(1) gets confused by 'typedef struct X { } X_t', so break 'typedef
struct pmf_private { ... } pmf_private_t' into a struct definition and a
typedef definition.
2009-03-25 21:48:36 +00:00
dyoung
5a65a2f318 DVF_ACTIVE is unconditionally set when we attach a device, so
unconditionally clear it after we give a device's deactivate() routine a
chance.
2009-03-25 21:43:42 +00:00
dyoung
c42425328d When we attach a pseudo-device, set its cfdata_t's cf_fstate to
FSTATE_FOUND, as we do in config_attach_loc(), in order to avoid a
DIAGNOSTIC panic in config_detach() if we detach the device.
2009-03-25 21:28:50 +00:00
christos
c29e9578af use kauth instead of uid != 0 2009-03-24 21:00:05 +00:00
ad
7c4a91a3e5 uid_init: maxproc -> maxcpus 2009-03-22 00:49:13 +00:00
ad
3c11640e0d Fix 'boot -z' bogons. 2009-03-21 15:01:56 +00:00
ad
d16d704d62 PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash
Fix numerous problems:

1. LDT updates are not atomic.

2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.

3. LDTR can be leaked over context switch.

4. GDT slot allocations can race, giving the same LDT slot to two procs.

5. Incomplete interrupt/trap frames can be stacked.

6. In some rare cases segment faults are not handled correctly.
2009-03-21 14:41:29 +00:00
ad
7364cd36a3 Allocate sleep queue locks with mutex_obj_alloc. Reduces memory usage
on !MP kernels, and reduces false sharing on MP ones.
2009-03-21 13:11:14 +00:00
ad
912b4160fd Make 'show event', 'dmesg' work with crash(8).
XXX dmesg fails exactly the same way as /sbin/dmesg.
2009-03-21 13:06:39 +00:00
pooka
226a234960 make mount() a rump call 2009-03-19 09:08:35 +00:00
pooka
ddf9eb29c5 kqueue and kevent for rump 2009-03-18 17:51:17 +00:00
pooka
0ef29cbdba Rename rump argument marshalling structure variable to "callarg" to
avoid collision with system calls which use "arg".
2009-03-18 17:27:04 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cegger
b8817e4aed ansify function definitions 2009-03-15 17:14:40 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
ad
0fa70e9b6f 'boot -z' bogons 2009-03-14 11:08:28 +00:00
yamt
6fb9967219 do_sys_unlink: remove an unused credential. 2009-03-13 11:05:26 +00:00
mrg
9ba87b8cc3 completely rework the way that orphaned sockets that are being fdpassed
via SCM_RIGHTS messages are dealt with:

1. unp_gc: make this a kthread.

2. unp_detach: go not call unp_gc directly. instead, wake up unp_gc kthread.

3. unp_scan: do not close files here. instead, put them on a global list
   for unp_gc to close, along with a per-file "deferred close count". if
   file is already enqueued for close, just increment deferred close count.
   this eliminates the recursive calls.

3. unp_gc: scan files on global deferred close list. close each file N
   times, as specified by deferred close count in file. continue processing
   list until it becomes empty (closing may cause additional files to be
   queued for close).

4. unp_gc: add additional bit to mark files we are scanning. set during
   initial scan of global file list that currently clears FMARK/FDEFER.
   during later scans, never examine / garbage collect descriptors that
   we have not marked during the earlier scan. do not proceed with this
   initial scan until all deferred closes have been processed. be careful
   with locking to ensure no races are introduced between deferred close
   and file scan.

5. unp_gc: use dummy file_t to mark position in list when scanning. allow
   us to drop filelist_lock. in turn allows us to eliminate kmem_alloc()
   and safely close files, etc.

6. prohibit transfer of descriptors within SCM_RIGHTS messages if
   (num_files_in_transit > maxfiles / unp_rights_ratio)

7. fd_allocfile: ensure recycled filse don't get scanned.


this is 97% work done by andrew doran, with a couple of minor bug fixes
and a lot of testing by yours truly.
2009-03-11 06:05:29 +00:00
mrg
ce98775552 like KERN_FILE2: *do* update "needed" when there is no count. we want
userland to know what sort of size to provide..

while here, slightly normalise the previous to init_sysctl.c.
2009-03-11 05:55:22 +00:00
mrg
47fb2b7401 always calculate "needed" for KERN_FILE2 calls. this allows a caller
to get an estimate of the needed space, like the intention is.
2009-03-11 01:30:27 +00:00
mlelstv
046c06b035 Make curlwp accesses conditional on wether the data structures
have been initialized. Fixes PR kern/38599.
2009-03-10 10:48:09 +00:00
uebayasi
7c002f258b KNF. ANSI'fy. 2009-03-09 16:19:22 +00:00
ad
69f9e17075 Don't bother with file_t::f_iflags any more, as it's not used.
Noted by mrg@.
2009-03-08 12:52:08 +00:00
christos
4dbda5da97 don't enforce maxproc resource limits for root. 2009-03-07 19:23:02 +00:00
joerg
f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
uebayasi
c8f1efab53 xc_lowpri: don't truncate `where' from uint64_t to u_int. 2009-03-05 13:18:51 +00:00
yamt
c75123c99b main: disable kerenel preemption during early on boot. namely, between
configure() and configure2().  some kernel threads are not expected
to be run before "cold = 0".  fixes cache_thread() busy-loop.
2009-03-05 06:37:03 +00:00
skrll
5ccc095a3e Fix the posix_fadvise return value... finally.
Tested martin on sparc64/m68k and me on hppa.
2009-03-04 18:11:24 +00:00
rmind
4f1720c349 lwp_create: fix the locking bugs on affinity ingerition path (mea culpa).
pset_assign: traverse the list of LWPs safely.
sched_setaffinity: free cpuset (unused path) outside the lock.

Reviewed (with feedback) by <ad>.
2009-03-03 21:55:06 +00:00
ad
822f68cc07 If DEBUG is enabled, drop kpreempt_pri to zero. It means that every
wakeup will cause a kernel preemption, simulating massive concurrency.

Proposed on tech-kern@.
2009-03-02 21:17:29 +00:00
rmind
4bd0e7cebc fd_copy: fix off-by-one bug in a race condition path and assert.
Should fix PR/40625.  OK by <ad>.
2009-03-02 19:28:08 +00:00
kenh
dc5d469510 If sys/param.h is not included, the kernel compile fails on some platforms
with SOFTINT_COUNT undefined (I noticed it on some evbarm kernels)
2009-02-26 05:50:54 +00:00
ad
b2dec392e0 Fix some comments. 2009-02-23 20:33:30 +00:00
ad
59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
ad
430f67aa17 PR kern/39564 wapbl performance issues with disk cache flushing
PR kern/40361 WAPBL locking panic in -current
PR kern/40361 WAPBL locking panic in -current
PR kern/40470 WAPBL corrupts ext2fs
PR kern/40562 busy loop in ffs_sync when unmounting a file system
PR kern/40525 panic: ffs_valloc: dup alloc

- A fix for an issue that can lead to "ffs_valloc: dup" due to dirty cg
  buffers being invalidated. Problem discovered and patch by dholland@.

- If the syncer fails to lazily sync a vnode due to lock contention,
  retry 1 second later instead of 30 seconds later.

- Flush inode atime updates every ~10 seconds (this makes most sense with
  logging). Presently they didn't hit the disk for read-only files or
  devices until the file system was unmounted. It would be better to trickle
  the updates out but that would require more extensive changes.

- Fix issues with file system corruption, busy looping and other nasty
  problems when logging and non-logging file systems are intermixed,
  with one being the root file system.

- For logging, do not flush metadata on an inode-at-a-time basis if the sync
  has been requested by ioflush. Previously, we could try hundreds of log
  sync operations a second due to inode update activity, causing the syncer
  to fall behind and metadata updates to be serialized across the entire
  file system. Instead, burst out metadata and log flushes at a minimum
  interval of every 10 seconds on an active file system (happens more often
  if the log becomes full). Note this does not change the operation of
  fsync() etc.

- With the flush issue fixed, re-enable concurrent metadata updates in
  vfs_wapbl.c.
2009-02-22 20:10:25 +00:00
pooka
b50bd8632e Instead of linking rump system call entry points directly to the
backend, perform all calls through a syscall table.  This makes it
possible to make system calls to non-local rump kernels.
(requires a bit support code.  it's written but quite messy currently)
2009-02-20 17:56:36 +00:00
yamt
777ded00ac cache_lookup_entry: add an assertion. 2009-02-18 13:36:11 +00:00
yamt
c69852d701 vmem_rehash_all: remove a debug printf slipped in with the previous changes. 2009-02-18 13:33:46 +00:00
yamt
f68e4571e5 - fix vmem unittest. rename VMEM_DEBUG so that it won't be abused again.
- reimplement vmem sanity checks with less code duplication.
- reimplement ddb vmem-related commands in a more consistent ways.
  remove automatic whatis.
2009-02-18 13:31:59 +00:00
yamt
947efbeab9 cache_purge1: consistently unlock ncp a little earlier. 2009-02-18 13:24:18 +00:00
yamt
4c5a0bb384 redo rev.1.19 correctly. 2009-02-18 13:22:10 +00:00
yamt
a13bb3bef4 whitespace 2009-02-18 13:12:00 +00:00
yamt
feff5384df use %zu for size_t 2009-02-18 13:04:59 +00:00
rmind
3de401ae19 Make sched_getrq() inline (gcc does not optimize it), avoids call. 2009-02-17 22:00:14 +00:00
ad
81525af92d Fix min/max confusion that causes a problem with DEBUG on some
architectures. Independently spotted by yamt@. /brick ad
2009-02-17 21:54:30 +00:00
enami
fb8633d4a9 Simplify the code; we already have a hint to decide which string to copy.
(And at least gcc generates better code.)
2009-02-15 03:52:49 +00:00
enami
60ebbc4e81 The knote objects attached by peer will still be linked in our list
if we are closed before the peer.  So, remove them.  It didn't matter
when pipe objects are directly returned to pool, but nowadays they
are cached.
2009-02-15 00:07:54 +00:00
christos
24587463c9 remove 2038 comment 2009-02-14 20:45:29 +00:00
christos
bd1260c5ff from enami: Only apply rootdir changes if the chroot dir != / 2009-02-14 17:06:35 +00:00
christos
78a45c73e9 PR/40634: Christoph Badura: "chroot / /sbin/mount" shows only / as mounted 2009-02-14 16:55:25 +00:00
pooka
3e656734b8 cosmetic: don't print empty line at end of init_sysent.c 2009-02-14 16:21:23 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
christos
160a37667a Unbreak ssp kernels. The issue here that when the ssp_init() call was deferred,
it caused the return from the enclosing function to break, as well as the
ssp return on i386. To fix both issues, split configure in two pieces
the one before calling ssp_init and the one after, and move the ssp_init()
call back in main. Put ssp_init() in its own file, and compile this new file
with -fno-stack-protector. Tested on amd64.
XXX: If we want to have ssp kernels working on 5.0, this change needs to
be pulled up.
2009-02-12 18:24:18 +00:00
enami
d5b0f6df4c s/NOFOLLOW/FOLLOW/ in NDINIT so that it matches actual behavior
which is controlled by NO_FOLLOW bit passed in 2nd arg of vn_open().
2009-02-11 00:32:45 +00:00
enami
7efd6dbe73 Make module (auto)loading under chroot envrionment actually work:
- NOCHROOT flag must be assigned to different bit from TRYEMULROOT
  since the code expected to be executed is in the else clase of
  if (flags & TRYEMULROOT).
- Necessary variables aren't set.
2009-02-11 00:19:11 +00:00
rmind
db4ca04011 dosetrlimit: remove the checks which are no longer needed since rlim_t
is unsigned again.  Hi <christos>!
2009-02-09 11:13:20 +00:00
pooka
8e52b87ec3 Don't try to fd_putfile() descriptors we didn't manage to fd_getfile().
Fixes local DoS panic described in kern/40570.
2009-02-08 16:38:12 +00:00
enami
e3b99073fb Previous code ususally works since compiler won't put gap between
those struct members but there is no reason to rely on that.
While here, I rewrite the loop using an usual idiom.  It shaves
both source and object code.
2009-02-06 23:56:26 +00:00
enami
e1be06d405 Instead of missing NULL check in pipe_create, let the pipe_ctor to wait
on buffer allocation.  The other allocation is simply an optimization,
so leave it as is.
2009-02-06 23:04:57 +00:00
enami
60b229d2eb Use same expression to decide to use pool cache or not in both
kmem_alloc/free.
2009-02-06 22:58:49 +00:00
dyoung
b4f3367acd Extract a subroutine pmf_device_resume_descendants() from
pmf_device_resume_subtree(), for re-use later.
2009-02-06 01:19:33 +00:00
enami
e6aec5115a Make revoke(2) works as before:
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
  then-clause and else-clause is swapped.  Since then, revoke(2) fails
  if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
  applied to non-device file and drops kernel into ddb.
2009-02-05 13:37:24 +00:00
ad
2015b56df5 Warn once and no more about backwards monotonic clock. 2009-02-04 21:29:54 +00:00
ad
3c32363107 PR kern/36183 problem with ptrace and multithreaded processes
Fix the crashy test case that Thor provided.
2009-02-04 21:17:39 +00:00
haad
07b62696b9 Add support for loading pseudo-device drivers. Try to autoload modules from
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.

For now only dm drivervcan be loaded, other pseudo drivers needs more work.

Ok by ad@.
2009-02-02 14:00:27 +00:00
enami
ad526ef003 - An errno is missed in rev. 1.11 while converting return statement to
goto statement.
- A local variable still in use is intercepted in rev. 1.6.  Define and
  use variable of its own.
2009-02-02 11:19:29 +00:00
yamt
5e978bf3b6 remove a non-ascii comment. 2009-02-02 00:10:18 +00:00
yamt
e1146d7ee9 back to malloc for now as wapbl_biodone is called by softint. 2009-02-02 00:07:06 +00:00
ad
c26577a1b0 Apply kmem patch posted to tech-kern.
- Add another level of caches, for max quantum cache size -> PAGE_SIZE.
- Add debug code to verify that kmem_free() is given the correct size.
2009-02-01 18:51:07 +00:00
ad
58fb9db514 Apply pipe patch posted to tech-kern, slightly updated:
- Cache kva.
- Convert to use mutex_obj_alloc().
- Make better use of pool_cache.

Also:

Disable direct transfers for the moment. I believe there may be a bug that
can cause transfers to stall when switching between direct/buffered access.
I think this has most recently been run into on 'denver' but I have seen it
as far back as 3.1.

(As an aside, direct is a not a clear win on modern systems with large cache
and high TLB invalidation overhead. Particularly so on MP systems, although
micro benchmarks may report otherwise because they typically do not tax the
system. Anyone want to write a decent benchmark?)
2009-02-01 18:23:04 +00:00
yamt
fc774e4e61 settime1: fix a bug i introduced when i made l_stime use monotonic time.
from Matthias Drochner on tech-kern@.  PR/40511 from Martin Husemann.
2009-01-31 15:53:36 +00:00
yamt
740c75e25d - malloc -> kmem_alloc
- kill WAPBL_UVM_ALLOC.
- kill wapbl_blk_pool to reduce #ifdef.
2009-01-31 09:33:36 +00:00
ad
697e4adf70 timer_intr: hold proc_lock across the loop, otherwise the process we are
about to signal could disappear.
2009-01-30 23:11:27 +00:00
pooka
42356a10b5 Quote PR number in XXX comment. No functional change. 2009-01-30 21:16:51 +00:00
agc
276ab299a6 Fix a tyop in the previous commit 2009-01-30 04:09:35 +00:00
drochner
338f42d97e put back a range check in setrlimit() for now
(thanks to Andrew Doran for remembering)
rlim_t _should_ be unsigned, but this needs more work
2009-01-29 22:27:23 +00:00
ad
a9743c2461 - Allow creating timeshard kthreads. To be used to fix the RAIDframe
parity rewrite issue.
- Create kthreads in the SCHED_RR class by default, not SCHED_FIFO.
2009-01-29 22:00:26 +00:00
rmind
a487ff992f sched_pstats: add few checks to catch the problem. OK by <ad>. 2009-01-28 22:59:46 +00:00
reinoud
69f4b23bdc Don't claim its an ISO partitioning scheme too early in the label. An MBR
might me there instead.
2009-01-28 15:26:28 +00:00
njoly
f024404c50 Do not call put_type() but use copyout() when returning the message
segments to the user.

ok by rmind.
2009-01-28 00:59:03 +00:00
njoly
122f627e90 Make msgsnd(2)/msgrcv(2) fail with EINVAL for messages larger than
SSIZE_MAX. Adjust man pages accordingly.

ok by christos.
2009-01-26 13:08:48 +00:00
pooka
89fa47c428 Tag a few more socket syscalls with RUMP:
recvmsg, sendmsg, recvfrom, getpeername, getsockname, sendto,
shutdown, socketpair
2009-01-26 12:20:05 +00:00
yamt
f4fa6bbef9 bump VMEM_HASHSIZE_MAX from 8192 to 65536. 2009-01-25 13:08:56 +00:00
rmind
5a84a46b8c mutex_vector_enter: few predictions. 2009-01-25 04:45:14 +00:00
rmind
66063c53a6 Set l_psid to PS_NONE for lwp0 (consistency change). 2009-01-24 22:42:32 +00:00
rmind
6d73ddd355 Revert path of modules back to "/stand". 2009-01-24 22:14:44 +00:00
rmind
f0e51651e4 Change path to kernel modules from "/stand" to "/kernel".
Needs to go in before 5.0.  Proposed on <tech-kern>.
2009-01-24 00:29:12 +00:00
pooka
06abc8c3f9 Remove debug print -- this is what happens when there's several
hours between implementation and commit.
2009-01-23 19:29:38 +00:00
pooka
c7e5a8be4e Remove the "int *error" parameter from rump syscalls. Instead use
rumpuser_seterrno() to set the errno for the caller.  This makes
the difference between real and rump syscalls way less intrusive
in calling code.
2009-01-23 19:27:18 +00:00
pooka
f6724ea74f solock() in compat code error branch to avoid panic 2009-01-23 15:40:19 +00:00
rmind
9e43fad609 sys__pset_bind: obviously, sched_takecpu() should take "t" LWP, not "l". 2009-01-23 13:58:08 +00:00
pooka
8b32829eeb Change VMEM_HASHSIZE_INIT from 1 to 128. This mainly benefits
quick-running or non-threaded rump jobs, where the rehash algorithm
does not have a chance to run.  For other cases it doesn't make
much difference, since the size will grow or decrease when the
rehash algorithm runs for the first time (t=10*hz currently).
2009-01-23 13:45:06 +00:00
jmmv
f084134ae9 Initialize SYMTAB_SPACE ksyms during ksyms_init. Per PR port-evbarm/40311. 2009-01-23 09:22:25 +00:00
drochner
cf45120117 Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
2009-01-22 20:40:20 +00:00
yamt
cb1e92d5d5 malloc -> kmem_alloc 2009-01-22 14:38:34 +00:00
yamt
812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
enami
3d21969dbd Fix a bug introduced by rev. 1.311. Make the kern.vnode sysctl to expose
correct address of each vnode to userland again.
2009-01-21 00:54:05 +00:00
drochner
dc83650fb8 add __gcc__ __format__ __string__ __attributes__ to catch mistakes early 2009-01-20 20:12:41 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
yamt
e80f4e9ccb fix inverted POLL_ directions. 2009-01-20 14:51:43 +00:00
yamt
62bd2e85ef pipeselwakeup: now POLL_HUP != POLL_ERR. remove unnecessary #if. 2009-01-20 14:50:22 +00:00
rmind
909e7f4259 - Make thread-affinity and processor-set interfaces mutually exlusive.
- pset_assign: when CPU is assigned, migrate out all LWPs from it.
2009-01-20 01:57:35 +00:00
njoly
97781244ee Clear error value on exit for IOC_CPU_OGETSTATE ioctl command. 2009-01-19 23:04:26 +00:00
christos
143e6033a9 Provide compatibility for pre-christos-time_t sysv sysctls. 2009-01-19 19:39:41 +00:00
christos
d610baec20 provide compat_50 2009-01-19 17:39:02 +00:00
yamt
3e196b68ff malloc -> kmem_alloc 2009-01-19 14:54:28 +00:00
christos
14ba6c67a5 Provide compatibility to the old timeval SCM_TIMESTAMP messages. 2009-01-19 02:27:57 +00:00
rmind
d1efa8f729 - Avoid calling sched_catchlwp() if CPUs have different processor-sets.
- sched_takecpu: check for psid earlier (be more strict).

PR/40419.
2009-01-18 05:07:51 +00:00
cegger
cc23319cdd whitespace nit 2009-01-17 09:00:24 +00:00
yamt
cea19a4d14 malloc -> kmem_alloc. 2009-01-17 07:02:35 +00:00
yamt
ae07703384 cache_prune: use (a - b > 0) rather than (a > b) to compare ticks. 2009-01-16 06:59:21 +00:00
yamt
3e54d28391 use TAILQ_FOREACH where appropriate, rather than rolling their own. 2009-01-16 01:48:09 +00:00
yamt
46b53b5f94 replace clearly broken bufq_priocscan_cancel with
something which might work.  (hi reinoud)
2009-01-16 01:44:27 +00:00
yamt
b9b9c67db2 bufq_cancel: KNF. 2009-01-15 16:11:19 +00:00
christos
dfcfa95743 check for error in the COMPAT_50 case. 2009-01-15 15:29:10 +00:00
christos
a46d2217e9 reverse the polarity of the use of the error variable. Using a different
variable would be cleaner but it would require more ifdefs.
2009-01-15 15:25:37 +00:00
christos
6e8bc6579f correct previous, fix reversed test, remove memset. 2009-01-14 23:28:23 +00:00
cegger
16f884ca6d make this compile: fix gcc warning about uninitialized use of tv.sec and tv.usec. 2009-01-14 20:33:19 +00:00
pooka
32713ca49c Generate local prototypes in rump_syscalls.c and disallow using
the rump_syscalls.h interface from inside the rump kernel.
2009-01-14 19:40:30 +00:00
christos
6d87d90fe9 version get/set send/recv timeout setsockopt. 2009-01-14 18:09:00 +00:00
pooka
09ba2d6689 Regen to prove I didn't screw up the conversion: purely RCSID changes. 2009-01-13 22:33:11 +00:00
pooka
a9a2ce837b Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat).  Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
2009-01-13 22:27:43 +00:00
pooka
71ef2103a7 Print delimiters around expected string in parse error message. 2009-01-13 16:29:19 +00:00
pooka
b2acbf4328 fix error message: expecting (, not ) 2009-01-13 16:25:43 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
christos
3153db9a35 remove !NTP stub. 2009-01-11 21:00:11 +00:00
christos
cbac073161 regen. 2009-01-11 19:41:12 +00:00
christos
87e24cb708 fix lutimes. 2009-01-11 19:40:38 +00:00
christos
e625b403dd - fix leaked lock, thanks ad@ for noticing.
- remove unneeded cast.
2009-01-11 15:57:29 +00:00
tsutsui
427f482fda Regen to pull proper "created from" revision strings. 2009-01-11 12:22:51 +00:00
cegger
138eec15bb make kgdb_dev a dev_t 2009-01-11 10:20:53 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
reinoud
a0d3b4c9bf Fix the mess i made with the iso partitioning reading due to the fact that
disk_read_sector() wants DEV_BLKSIZE blkno's BUT sectorsize unit lengths
specified... how `logical'.

Real fixup pending on discussion on tech-kern/source-changes.
2009-01-08 14:06:50 +00:00
pooka
e99d5fab49 Sprinkle comments explaining purpose of kobj_machdep(), per email from ad.
no functional change
2009-01-08 01:03:24 +00:00
pooka
150e5cca0b Missed realloc in previous. Ride 5.99.6 bump. 2009-01-07 21:06:31 +00:00
pooka
80508c50c5 Rename malloc() to kern_malloc() to avoid name conflict with libc.
Now it is possible to use the kernel linker with rump.
2009-01-05 21:42:37 +00:00
reinoud
0da18cc3f4 Fix ISO partitioning readin. ISO dictates its descriptors are minimal 2048
bytes long independent of the device block size.
2009-01-03 14:35:27 +00:00
yamt
68b6d8786e remove extra semicolons. 2009-01-03 03:31:23 +00:00
pooka
3c58d5b25f My clever hack was not enough. Disable DELAY via ifndef _RUMPKERN in
subr_prf until I manage to get all archs in line with a proper MI
signature.
2009-01-02 22:03:00 +00:00
pooka
ff1136dede We use CPU_INFO_FOREACH here -> include sys/cpu.h 2009-01-02 11:08:32 +00:00
pooka
167269d42c Include kernel printf routines in rump instead of relying on the
magic libc symbol.  This also allows to bid farewell to subr_prf2.c
and merge the contents back to subr_prf.c.  The host kernel bridging
is now done via rumpuser_putchar().
2009-01-02 02:54:13 +00:00
pooka
2577e51e90 revert previous, disabled aliasing in offending build
(XXX: two evil casts in the original)
2009-01-01 22:17:55 +00:00
pooka
44a89fbb01 Squelch type-punning warnings with void * casts. We are allowed
to do this because the pointers do not have aliases.
2009-01-01 21:35:22 +00:00
pooka
f671460fc0 _KERNEL_OPT 2009-01-01 19:10:17 +00:00
pooka
0e983d35cf * unexpose kprintf locking internals
* migrate from simplelock to kmutex

Don't bother to bump kernel version, since nothing outside of subr_prf
used KPRINTF_MUTEX_ENXIT()
2009-01-01 15:10:20 +00:00
ad
a190625ad7 softint_disestablish: don't pass softint_lock to kpause, it's not held. 2009-01-01 12:26:46 +00:00
reinoud
339f5c5772 Add ISO partition detection enabling auto-detection of iso9660 and UDF
partitions on optical media like CD/DVD/BD but also on all other media if
there is no NetBSD disklabel or MBR label.

Also fix cd's readdisklabel arguments so the ioctl's arrive at the right
device (!) and update its default label to make more sense.
2008-12-30 19:38:36 +00:00
pooka
8583cae233 Rename specfs_lock as device_lock and move it from specfs to devsw.
Relaxes kernel dependency on vfs.
2008-12-29 17:41:18 +00:00
pooka
3cf15d2f4e Librate sysctl_setup_func typedef from the clutches of _MODULE and
stuff it in kern_sysctl.c where its only sensible use is.
2008-12-29 15:35:02 +00:00
ad
ab21fd5c10 Don't need to hold kernel_lock for most of this (and not into the swapper!). 2008-12-29 13:40:11 +00:00
ad
ed25a64ddf Don't do KM_NOSLEEP allocations. 2008-12-29 12:52:50 +00:00
reinoud
2b4d7aaa9a When reusing a directory free space slot and thus finding it on the free space
list, do free it back into the pool!
2008-12-28 17:11:26 +00:00
christos
55d90fae57 - Don't autounload modules loaded during boot. In my case, ffs got unloaded
because my cdrom takes too long to initialize.
- Consistently print error messages in all error cases.
2008-12-28 03:21:02 +00:00
rmind
d2fec2fc4f sys_shmat: initialise shmid of shmmap entry earlier. Now error path,
i.e. shm_delete_mapping, wont use random value.
2008-12-22 13:49:17 +00:00
cegger
beb4d1e5cc undo turn malloc flags to enums.
Requested by christos.

Keep malloc flag defines in kernel section.
2008-12-21 17:49:55 +00:00
ad
74302d0fab Redo previous. Don't count deferrals due to raised IPL. It's not that
meaningful.
2008-12-21 13:26:58 +00:00
ad
ff0249c394 Prevent a potential deadlock from a multithreaded process doing:
t1	dup2(0, 1)
t2	dup2(1, 0)
2008-12-21 10:25:00 +00:00
ad
7ca206492d Don't try to sync if panicing:
- It doesn't work and a dead system that can't be reset from the console is
  worse than a system that has painced and rebooted. If you can make it work
  reliably please do so.

- If the system is paniced there is every reason to suspect VM structures
  and the contents of the buffer cache.
2008-12-21 10:23:10 +00:00
ad
6d599f4e1f - Fix a bug where we trashed descriptor zero in the old open files array
while ironically trying to preserve the same during copy. Would only have
  occurred if a multithreaded program expanded the descriptor table and,
  within a tiny window of exposure, another thread in the program tried to
  access descriptor zero.

- Convert to use kmem_alloc/kmem_free.
2008-12-21 09:58:22 +00:00
ad
82ae73e0b6 Don't increment the 'kpreempt defer: IPL' counter if a preemption is pending
and we try to process it from interrupt context. We can't process it, and
will be handled at EOI anyway. Can happen when kernel_lock is released.
2008-12-20 23:06:14 +00:00
cegger
378da548fc Turn malloc flags into an enum.
While here, move the flags definition into _KERNEL section.
2008-12-19 21:22:01 +00:00
pgoyette
81649575af When checking for "set-up is complete", look for the CTLFLAGS_PERMANENT
in the root of the tree being modified, rather than in the system default
tree.  This permits module compat_netbsd32 to initialize its shadow tree
at load time.

Discussed on tech-kern, with no objections.

Addresses my PR kern/40167
2008-12-19 17:28:59 +00:00
pgoyette
9c68331911 Store config(1)'s root filesystem type as a text string rather than
embedding the address of its xxx_mountroot() in swapnetbsd.c.  This
permits booting of kernels with hard-wired filesystem type even if the
filesystem is in a loadable module (ie, not linked into the kernel
image).

Discussed on current-users.  Tested on amd64 and i386 with both hard-
wired and '?' filesystem times, and on both modular and monolithic
kernels.

Thanks to pooka@ for code review and suggestions.

Addresses my PR kern/40167
2008-12-19 17:11:57 +00:00
thorpej
4730b27d42 Make condvars really opaque -- hide the wait message member from consumers
of the API.
2008-12-19 07:57:28 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
ad
7c89190b50 Start percpu allocation at (ALIGNBYTES + 1) to avoid problem with importing
offset zero to vmem.
2008-12-15 11:59:22 +00:00
ad
c1ef49a66f Back VMEM_ADDR_NULL change. It's too invasive. 2008-12-15 11:42:34 +00:00
ad
b8c27c5dfc Check for VMEM_ADDR_NULL, not NULL. 2008-12-15 11:33:13 +00:00
ad
f9b17a5200 Define VMEM_ADDR_NULL as UINTPTR_MAX, otherwise a vmem that can allocate
a block starting at zero will not work.

XXX pool_cache uses NULL to signify failed allocation.
XXX how did the percpu allocator work before?
2008-12-15 11:29:49 +00:00
ad
50f32f7a93 Put vm_lock into its own cache line. 2008-12-15 10:26:10 +00:00
elad
f4f1989ae8 PR/39559: Juan RP: veriexec(4): too easy to cause a NULL dereference
through it in kernel

Patch from PR applied with tiny modifications, thanks!

Discussed with blymn@ a while ago.
2008-12-14 23:20:23 +00:00
elad
48949a2a2a Fix length passed to strlcpy(): we used to get names one character shorter
than reality.

Should be pulled up to netbsd-5.
2008-12-14 23:12:58 +00:00
ad
024c36f64b vclean: be paranoid and set v_tag, v_op while holding v_interlock.
FS code could check their values while scrolling through mnt_vnodelist.
2008-12-14 11:15:59 +00:00
ad
31420e7959 - vrelel: fix broken "dead but not clean" assertion. The vnode can be
dead and dirty if cleaning is in progress.
- Add an assertion, fix some text.
2008-12-14 11:13:36 +00:00
ad
70a01ab869 softint_disestablish: the soft interrupt could still be running on a CPU
somewhere in the system. If it is, wait for it to complete before tearing
it down. The caller commits to not trigger the interrupt again once
disestablish is set in motion.
2008-12-13 21:13:30 +00:00
ad
7a3593355a Fix a comment. 2008-12-13 20:49:49 +00:00
ad
24da1f6ca4 PR kern/36183 problem with ptrace and multithreaded processes
Fix the famous "gdb + threads = panic" problem.
Also, fix another revivesa merge botch.
2008-12-13 20:43:38 +00:00
ad
2e606b7b1b sigchecktrace: process SIGKILL before everything else. 2008-12-13 18:55:01 +00:00
christos
15e362cca8 fix endif comment 2008-12-10 18:07:30 +00:00
christos
0bff293dd2 disable VMEM_DEBUG by default. 2008-12-10 17:32:32 +00:00
christos
10fdeaec16 vmem_check_sanity is just too expensive for DEBUG. Enable it only for
VMEM_DEBUG.
2008-12-10 16:59:12 +00:00
cegger
33d827105a vmem_check_sanity: refactor overlapping check for better readability.
Move use of vmem_check_sanity into locked sections. Pointed out by ad@
2008-12-09 07:54:59 +00:00
cegger
4dfe7b7870 ddb: make show vmem print exact span type
vmem_check_sanity: print exact span type
vmem_add1: KASSERT span types
2008-12-07 22:39:01 +00:00
pooka
54b9426187 Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.
2008-12-07 20:58:46 +00:00
cegger
f001f650d6 make this compile with MALLOC_DEBUG but w/o DEBUG 2008-12-07 14:24:28 +00:00
cegger
f132fda3fe vmem_check_sanity: fix check to correctly detect even exactly duplicate spans. 2008-12-07 11:49:51 +00:00
ad
7ab182873b Add cpu_softintr_p() for assertions 2008-12-07 11:40:53 +00:00
cegger
bb1d17f443 build fix: make i386 build again 2008-12-07 09:40:42 +00:00
cegger
2aa8aa0f8f Spans may never overlap. Overlapping spans mean memory corruption
when used by kmem(9), for example.
Do sanity checks to detect such spans on DEBUG kernels.
2008-12-07 02:21:04 +00:00
cegger
10de0e2b14 ddb: new 'show vmem' and 'show all vmems' commands.
Useful to inspect vmem(9) structures.
2008-12-07 00:51:15 +00:00
ad
e91b9bcc27 Make the fake ELF object work with gdb.
- Output a .bss section and make all the symbols relative to it, instead
  of making them absolute.
- Output a single load section, no need for two.

'gdb /dev/ksyms' still doesn't work because ksyms doesn't do mmap yet.
2008-12-05 21:38:10 +00:00
ad
8ff4eb83a8 Back out revision 1.35 which is no longer necessary and causes the system
to try autounloading modules perpetually.
2008-12-05 12:55:09 +00:00
ad
6efc20038a PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there) 2008-12-05 12:51:17 +00:00
he
3e2feea4e5 Ksyms are optional, so make the call to ksyms_init() dependent
on the same conditionals which are defined in sys/conf/files.
2008-12-04 23:18:13 +00:00
christos
579a92f63b PR/40097: bouyer@antioche.lip6.fr: MODULAR tries to unload non-module subsystems
Don't try to unload built-in modules, and if a module is busy don't retry
immediately.
2008-12-03 15:15:01 +00:00
ad
11701b3bf7 Add a couple of sysctls:
kern.module.autoload = 1
kern.module.verbose = 0
2008-12-03 12:14:11 +00:00
ad
6cddbf0ca5 Correct error messages added in revision 1.32. In part from drochner@. 2008-12-03 11:23:15 +00:00
ad
7ad98abc71 - Wrap sys/cpu.h contents in _LOCORE.
- Add a RESCHED_LAZY flag and use instead of zero.
2008-12-02 17:57:32 +00:00
martin
719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
elad
67fb7f0d5c PR/40002: Daniel Horecki: sockstat doesn't work for user with sysctl
security.curtain=1

If the kauth call failed, we'd silently continue the loop, but the error
code would remain and eventually "leak" to userspace. Reset the error to
zero when continuing.

Tested by snj@ and myself. Okay snj@.
2008-11-28 18:58:59 +00:00
ad
1a8ada2ed9 exec_add, exec_remove: allow zero entries in case a module provides nothing. 2008-11-28 10:55:10 +00:00
christos
78d77f514f better error messages, and more messages for DIAGNOSTIC. 2008-11-27 21:36:51 +00:00
pooka
3c61b47d93 RUMP some syscalls required by nfsd. 2008-11-26 15:01:17 +00:00
ad
9d09ecfa96 sigaction1: we need to remember if the sigcontext method may be useable,
because libc can use it even if siginfo is available.

Changes are needed in libc to stop this being a performance penalty but
they will come later.
2008-11-25 16:42:44 +00:00
ad
a5a0d68555 Print the size as decimal. 2008-11-25 15:15:28 +00:00