Commit Graph

3682 Commits

Author SHA1 Message Date
christos d16297df4c PR/23613: Christian Biere: Bogus bounds check in nanosleep. 2003-12-02 01:34:30 +00:00
dbj 37a927564e In vclean(DOCLOSE), if vinvalbuf fails because of a write error,
then redo the vinvalbuf without the V_SAVE which will force
unflushed buffers to be discarded.
2003-12-01 18:53:10 +00:00
provos a0ce863234 fix off by one in find_last_set(); triggered for processes that have no
open file descriptors; found by tim robbins from freebsd
2003-11-30 18:16:45 +00:00
jdolecek ae0ead8db3 fix semaphore ID bound checking
problem pointed and patch provided in kern/23585 by Jeff Ito
2003-11-29 11:43:25 +00:00
matt 7bf0959ab7 Restore a change that made AF_LOCAL sockets block on connect(2) until
accepted.  However, this time this behavor is not the default.  Instead
it must enabled by using the LOCAL_CONNWAIT socket option on either the
connecting or accepting socket.
2003-11-29 10:02:42 +00:00
perry 6032efb56d Revert a change that altered the semantics of AF_LOCAL sockets. Sadly
this made us API incompatible with other Unixes.
2003-11-29 06:08:29 +00:00
scw c65769f7cf Cast to pointer via intptr_t. 2003-11-28 08:18:03 +00:00
manu d662d7555d Make the wakeup optionnal in proc_stop, so that it is possible to stop a
process without waking up its parent.
2003-11-27 23:16:47 +00:00
yamt 49f98b206e fdcopy: copy inline bitmaps properly.
hopefully fixes PR/23469.
2003-11-26 12:42:28 +00:00
cl 4da6cdf9f6 Fix check for pending upcalls after we return stacks.
Noted by yamt@.
2003-11-25 10:05:17 +00:00
manu 1147a0b1e6 Enable tracing of out of line data sent with Mach message 2003-11-24 16:51:33 +00:00
yamt f9d2295ad0 turn ACQUIRE macro into a function by introducing new internal
flags, LK_SHARE_NONZERO and LK_WAIT_NONZERO.  from FreeBSD.
2003-11-23 08:57:16 +00:00
dbj 6a88e9174b add "show mount" ddb command 2003-11-18 18:26:18 +00:00
martin ccd8c9e649 Remove spurious space accidently introduced in last. 2003-11-18 13:13:03 +00:00
martin 63a3b1e4ae Change K&R string literal continuation lines to ANSI C string concatenation.
Fixes PR kern/23474.
2003-11-18 13:01:21 +00:00
cl ac4fd64ba5 - remove blocked/unblocked upcall ordering.
- always wait for unblocked upcall if we have to continue a blocked
  thread.

=> removes wakeup from sys_sa_stacks when a stack is returned.
=> avoids extra sa_unblockyield syscall when unblocked upcall is
   delivered before blocked upcall is processed.
=> avoids double pagefault if we continued a thread before the
   pagefault was resolved.
=> avoids losing unblocked state if we continued a thread after
   skipping the unblocked upcall.
2003-11-17 22:57:52 +00:00
cl 2e11d201c2 - use list to keep track of free stacks.
- use splay tree for the pagefault check if the thread was running on
  an upcall stack.

=> removes the limitation that all upcall stacks need to be
   adjoining and that all upcall stacks have to be loaded with the
   1st sys_sa_stacks call.
=> enables keeping information associated with a stack in the kernel
   which makes it simpler to find out which LWP is using a stack.
=> allows increasing the SA_MAXNUMSTACKS without having to
   allocate an array of that size.
2003-11-17 22:52:09 +00:00
christos d0d2881501 expose proc_stop; needed by mach/darwin emulation 2003-11-17 19:21:56 +00:00
wiz 4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
cube d3730f1c68 o Fix a bug in ksyms that changed the real meaning of st_name entries for
symbols, and made it impossible for the kernel to use that value, and
  correctly find symbols from LKMs.
o Allow LKM users to use DDB to debug the entry function of a LKM by
  loading the symbol table with the temporary name /lkmtemp/ before calling
  it, and then renaming it once we know the module name.

Approved by ragge@.
2003-11-17 10:16:18 +00:00
keihan 0714799990 www.netbsd.org -> www.NetBSD.org 2003-11-17 10:07:58 +00:00
thorpej 48afa79adc We have CVS; there is no reason to make .bak files when generating the
syscall table and vnode interface tables.
2003-11-15 20:26:02 +00:00
thorpej 001102c808 Regen: fsync_range(2) system call. 2003-11-15 01:20:48 +00:00
thorpej 857f24339f Kernel portion of the fsync_range(2) system call. Written by Bill
Studenmund, and contributed by Wasabi Systems, Inc.
2003-11-15 01:19:38 +00:00
jonathan a03a5696d5 include <sys/mbuf.h> before FAST_IPSEC-dependent headers. 2003-11-14 07:13:25 +00:00
yamt 5ee0718f8f plug memory leak on error. 2003-11-13 11:59:46 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
chs 709a3b4e52 two changes in improve scalability:
(1) split the single list of pages allocated to a pool into three lists:
     completely full, partially full, and completely empty.
     there is no longer any need to traverse any list looking for a
     certain type of page.

 (2) replace the 8-element hash table for out-of-page page headers
     with a splay tree.

these two changes (together with the recent enhancements to the wait code)
give us linear scaling for a fork+exit microbenchmark.
2003-11-13 02:44:01 +00:00
jonathan fa24e6f3f8 Add m_tag_delete_nonpesrsistent(), for deleting all packet tags on
mbuf chains which are recycled (e.g., ICMP reflection, loopback
interface).  A consensus was reached that such recycled packets should
behave (more-or-less) the same way if a new chain had been allocated
and the contents copied to that chain.

Some packet tags may in future be marked as "persistent" (e.g., for
mandatory access controls) and should persist across such deletion.
NetBSD as yet hos no persistent tags, so m_tag_delete_nonpersistent()
just deletes all tags. This should not be relied upon.
2003-11-13 01:48:12 +00:00
cl e2c29624f5 Prevent sa_newcachelwp() from creating new LWPs when the process is exiting.
This should fix PR 23418 which was also reported by Thomas Klausner and
Ian Fry (who also provided core dumps for analysis - thanks!).

Also g/c sa_yieldcall since it's now safe to put LWPs back into the cache.
Also return stacks in failure case.
2003-11-12 21:27:46 +00:00
dsl 0342c9586a - Count number of zombies and stopped children and requeue them at the top
of the sibling list so that find_stopped_child can be optimised to avoid
  traversing the entire sibling list - helps when a process has a lot of
  children.
- Modify locking in pfind() and pgfind() to that the caller can rely on the
  result being valid, allow caller to request that zombies be findable.
- Rename pfind() to p_find() to ensure we break binary compatibility.
- Remove svr4_pfind since p_find willnow do the job.
- Modify some of the SMP locking of the proc lists - signals are still stuffed.

Welcome to 1.6ZF
2003-11-12 21:07:37 +00:00
dbj d3bad238a2 XXX an impossible malloc failure check in set_statfs_info 2003-11-12 20:38:24 +00:00
yamt c337d7540c fix typos in comments. 2003-11-09 07:57:15 +00:00
yamt 29352ed442 - fix an use-after-free bug in /dev/fd/* handling.
specifically, don't keep a stale pointer in fd_ofiles.
  it isn't needed anymore as fd allocation is now done using bitmaps.
- clean up dupfdopen() a little.
- don't call fd_used() unnecessarily.
2003-11-09 07:55:38 +00:00
yamt 1fc953c5e2 in the non-overwritten case of sys_dup2(),
call fd_used() by itsself rather than leaving it to finishdup().
2003-11-09 07:52:26 +00:00
dbj 84865d5d4f protect a few uses of buf's b_flags with b_interlock 2003-11-08 04:22:35 +00:00
cl 4d3b1ee6dc always set L_SA_UPCALL if the LWP on the VP is asleep 2003-11-07 18:37:41 +00:00
cl 716d179db5 make lwp running again if we don't switch away in sa_switch(), return is
not enough.  (noticed by yamt@)
2003-11-07 11:59:48 +00:00
ragge c556165f92 Do not try to enter more than MAX_INT16 symbols into the patricia tree;
the not-entered symbols will be found anyway but via a linear-search.
This only happens if something is wrong when linking the kernel.
Fixes problems reported on port-hp700.
2003-11-06 18:22:01 +00:00
dsl aed7f069e5 Ensure that the controlling tty is unlinked from the session and pgrp.
Due to the way the console is handled, neither the revoke() nor vrele()
is guaranteed to be seen by the real, underlying tty.
2003-11-06 09:30:13 +00:00
dsl 96e2f904d9 Remove a pile of redundant (caddr_t) casts. 2003-11-06 09:16:22 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
cl 66c8bc7693 Reimplement VP donation such that multiple unblocked upcalls can be
combined.  Also prepare for adding VP repossession later.

- kern_sa.c: sa_yield/sa_switch: detect if there are pending unblocked
  upcalls.
- kern_sa.c: sa_unblock_userret/sa_setwoken: queue LWPs about to invoke
  an unblocked upcall on the sa_wokenq.  put queued LWPs in a state where
  they can be put in the cache.  notify LWP on the VP about pending
  upcalls.
- kern_sa.c: sa_upcall_userret: check sa_wokenq for pending upcalls,
  generate unblocked upcalls with multiple event sas
- kern_sa.c: sa_vp_repossess/sa_vp_donate: g/c, restore original
  sa_vp_repossess
2003-11-03 22:34:51 +00:00
jdolecek a2ed003b8b sa_yield(): 'sa' is used only for KDASSERT(), so make it #ifdef DEBUG 2003-11-02 17:04:05 +00:00
jdolecek 1cfc34d60f use LIST_FOREACH() as appropriate 2003-11-02 16:42:22 +00:00
cl 763d8350f0 perform indention change left out of previous commit 2003-11-02 16:30:55 +00:00
cl 350dd95eff Cleanup signal delivery for SA processes:
General idea:  only consider the LWP on the VP for signal delivery, all
other LWPs are either asleep or running from waking up until repossessing
the VP.

- in kern_sig.c:kpsignal2: handle all states the LWP on the VP can be in
- in kern_sig.c:proc_stop: only try to stop the LWP on the VP.  All other
  LWPs will suspend in sa_vp_repossess() until the VP-LWP donates the VP.
  Restore original behaviour (before SA-specific hacks were added) for
  non-SA processes.
- in kern_sig.c:proc_unstop: only return the LWP on the VP
- handle sa_yield as case 0 in sa_switch instead of clearing L_SA, add an
  L_SA_YIELD flag
- replace sa_idle by L_SA_IDLE flag since it was either NULL or == sa_vp

Also don't output itimerfire overrun warning if the process is already
exiting.
Also g/c sa_woken because it's not used.
Also g/c some #if 0 code.
2003-11-02 16:26:10 +00:00
jdolecek b74c137c2a use LIST_FOREACH() where appropriate 2003-11-02 12:01:40 +00:00
wiz 0aca09fbc0 Fix two typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:49:20 +00:00
provos c224a63428 use fdremove to remove kqueue file descriptor so that bitmap information
is maintained correctly; found by Juergen Hannken-Illjes
2003-11-01 18:47:16 +00:00
jdolecek 8f8952e2b1 add a macro to copy ksiginfo_t, and use it in kern_sig.c:ksiginfo_put()
change suggested by Christian Limpach
2003-11-01 17:59:57 +00:00
jdolecek 3abecdb88d avoid stong words in comments 2003-11-01 17:35:42 +00:00
cl 5d2db86263 cleanup whitespace and debugging output 2003-11-01 15:36:35 +00:00
jdolecek 0b33ae64cb in sigtimedwait(), use malloc(9)ed (and thus wired) memory for the waitset
we pass via sigctx, so that it guaranteed that the memory wouldn't be
paged out at the time the signal arrives

potential problem pointed out by YAMAMOTO Takashi
2003-11-01 07:44:14 +00:00
christos ddb8b44bce include opt_malloclog.h 2003-11-01 07:07:31 +00:00
cl f6e633af3a - add missing P_WEXIT check
- assign lwp to sa_vp before setting P_SA/L_SA flags
- don't unlock/lock the kernel lock around mi_switch unnecessarily
2003-11-01 02:09:52 +00:00
cl b936d40f39 Avoid sneaking past signal delivery in sa_upcall_userret():
generate unblocked upcalls in sa_unblock_userret(), before signal
delivery/p_userret handling in userret().

Also defer getting state for preempted upcalls because on some ports
preemption can happen between sa_unblock_userret() and sa_upcall_userret().
2003-11-01 01:38:46 +00:00
cl 8edffb7356 Avoid race condition where an LWP is put into the cache before
its state is saved:
- don't sa_putcachelwp() in sa_vp_repossess/sa_vp_donate
- only defer saving the event LWP's state
- sa_putcachelwp() after the interrupted LWP's state is saved
2003-10-31 23:36:50 +00:00
cl 8904362ede Allow defer of event and interrupted LWP state independently.
Removes code duplication in sa_upcall_getstate() and allows
sa_upcall_getstate() to be used to get state of a single LWP.
2003-10-31 22:47:44 +00:00
cl def5d22a63 Don't PHOLD() in sa_putcachelwp() because the scheduler lock is held.
PHOLD() before grabbing the scheduler lock unless the lwp is curlwp.
2003-10-31 22:03:18 +00:00
drochner f1aa108dd8 -fix ELF_INTERP_NON_RELOCATABLE:
-obey ELF_LINK_ADDR in ELF_load_file()
 -set ELF_LINK_ADDR in the probe() function if needed
-make ELF_NULL_ADDR the default, so that probe() functions dont need
 to set it explicitely
-allocate buffer for interpreter name only if needed
2003-10-31 14:00:52 +00:00
simonb 183066a619 Remove some assigned-to but otherwise unused variables. 2003-10-31 03:32:19 +00:00
simonb 6d85c5e0d5 Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
cl 68a0d153d2 Don't grab the sched lock in lwp_continue() because lwp_continue() is
called from kpsignal2() with the sched lock held.  Get the lock in
sys__lwp_continue() instead.
2003-10-30 23:31:21 +00:00
jdolecek 5a9f1cf173 ksiginfo_put(): only copy what's needed of ksiginfo_t, to slightly optimize
the operation, and improve code readability at the same time
2003-10-30 16:32:58 +00:00
provos 4b425670af use a two-level bitmap as suggested by mogul and banga for fdalloc;
approved thorpej@
2003-10-30 07:27:02 +00:00
thorpej 67f69c1c63 Make callout_setfunc() a CPP macro. Suggested by enami. 2003-10-30 04:32:56 +00:00
simonb b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
thorpej db71356cd1 - Change callout_setfunc() to require that the callout handle is already
initialized.  Update the txp(4) to compensate.
- Statically initialize the TCP timer callout handles in the tcpcb
  template.  We still use callout_setfunc(), but that call is now much
  less expensive.  Add a comment that the compiler is likely to unroll
  the loop (so don't sweat that it's there).
2003-10-27 16:52:01 +00:00
fvdl 404fa205d1 Fix (bogus) unitialized variable warning. 2003-10-26 20:55:57 +00:00
jdolecek ad67de5ad8 move ALLOCSYS() macro from <sys/systm.h> to kern_alloc.c - it's the
only place which uses it
2003-10-26 10:45:03 +00:00
jdolecek 2e59e9ae06 allocate virtual memory for SYSV shm, msg and semaphore structures
separately from the bufpages, so that it would be possible to eventually
make their limits changeable in runtime

make static all local variables which do not need to be exported to other
kernel parts
2003-10-26 10:32:24 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
christos 2017bf9a94 Fix uninitialized variable warning 2003-10-25 18:31:59 +00:00
jdolecek 0c303462c5 modify sigtimedwait(2) to return full siginfo if available, and pass the wait
set using a pointer, to save couple bytes in struct sigctx

also fix fallout from recent lwp_wakeup() change, where we failed to properly
detect if tsleep() returned as result of lwp_wakeup() or signal outside
our wait set; could have caused problems for threaded apps using sigwait(2)
et.al.
2003-10-25 16:50:37 +00:00
yamt 01de53d5f4 don't assume the order of upcall stacks in the array from userland.
(it's reversed in the case of topdown vm.)

kern/23266 from Kouichirou Hiratsuka and tested by him.
2003-10-25 12:08:45 +00:00
christos cb02efca51 fix uninitialized variable 2003-10-25 09:06:51 +00:00
christos 9ff8e797c6 fix uninitialized variables. one of them is a compiler bug. 2003-10-25 09:03:59 +00:00
kleink 661f76699f POSIX: when attempting to fdatasync(2) a file which is not open for
writing, fail with EBADF.
2003-10-25 01:18:01 +00:00
yamt a526db13df sa_unblockyield:
don't assert that syscall arguments are sane.
return an appropriate error instead.
2003-10-24 16:11:21 +00:00
yamt 3f32c6ab70 don't use NULL as vaddr_t. 2003-10-24 00:53:43 +00:00
thorpej 4011fcfefd Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.
2003-10-21 22:55:47 +00:00
manu a591d65ec7 One more section type in the Mach-O format. Now /usr/X11R6/bin/quartz-wm links
and run (it aborts because the dock is not launched).
2003-10-20 22:42:40 +00:00
wiz 48f28cea9e sa_vp_faultaddr, sa_vp_ofaultaddr, sa_vp_stacks_low, and sa_vp_stacks_high
are vaddr_t (and thus unsigned long).
Initialize them with 0 instead of NULL.
Closes PR 23204 by Dheeraj Reddy.
2003-10-20 07:15:26 +00:00
manu d77ec799a5 Support Darwin static binaries (I should say: support the only Darwin
static binary: otool). Dynamic binaires have a pointer to the Mach-O
header on the top of the stack, static binaries don't have this, and
having it produced a crash.

One bugfix: the EXEC_MACHO code assumes that entry = NULL means that
the entry point has not been found in the load commands seen so far.
Therefore we need to initialized entry to NULL if we want a static binary
to discover it. (dynamic binaries were forced to iscover it because when
the intepreter load command is found, entry is updated whatever its
value was before).

One hack: Both COMPAT_MACH and COMPAT_DARWIN are willing to run Mach-O
binaries. COMPAT_MACH fails for dynamic binaries because it cannot find
the interpreter in /emul/mach. For static binaires, it will accept them
(and for Darwin static binaries, this will cause a failure). Until we
rite a test for matchinf Darwin static binaries, just swap the order of
COMPAT_MACH and COMPAT_DARWIN in the exec switch so that COMPAT_DARWIN
is tried first (this will have the advantage of speeding up program
startup). EXECSW_PRIO_{FIRST_LAST} does not seem to work...
2003-10-19 07:52:22 +00:00
simonb 59fb31d7cc Remove unreachable break after return and goto statements. 2003-10-19 01:44:48 +00:00
thorpej eea31306c8 Remove the superuser check for MNT_FORCE on new mounts. It's been
pointed out by several people that it offers no real protection.
2003-10-15 17:26:38 +00:00
hannken a3a898ff0f Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

Approved by: Frank van der Linden <fvdl@netbsd.org>
2003-10-15 11:28:59 +00:00
dbj fe7c786886 add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD
2003-10-14 14:02:56 +00:00
thorpej a58b40631e * Shuffle some flags to make it easier to visually compare lists
of flags.
* In the new mount case, make sure to clear the mount "action" flags.
* Allow MNT_FORCE to be set by root on new mounts.
2003-10-13 18:02:20 +00:00
pk db855cea5a ksiginfo_get/exit hook: protect queue operations with splsoftclock() (noted
by Christos).
2003-10-12 20:09:50 +00:00
pk a749472593 ksiginfo_put: protect queue operation with splsoftclock(), since it can
be called from timer interrupts.
2003-10-12 14:32:05 +00:00
chs d2835f509a use "poll" as the wmesg for poll. 2003-10-10 15:24:28 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
thorpej bcf389773b Whitespace nits. 2003-10-07 00:23:17 +00:00
christos e59ff2cb68 Don't look for file descriptor matches when a process is exiting. From
Andrey Petrov.
2003-10-04 03:45:49 +00:00
itojun 98d5598feb when dropping M_PKTHDR, need to free m_tag associated with it. 2003-10-03 20:56:11 +00:00
christos 754bffb7e7 Fix problem with signal trampoline version checking that did not take into
account that emulations usually use version 0 and provide their own in kernel
trampolines.
2003-10-03 17:51:13 +00:00
christos 1f6ab188f9 If the user passes enough space, output the per cpu states instead of
aggregating them.
2003-10-03 15:33:42 +00:00