Commit Graph

89824 Commits

Author SHA1 Message Date
David E. O'Brien
04ddc5dea6 Run $S/kern/genassym.sh with the correct NM.
Approved by:	re(blanket)
2003-05-16 02:27:17 +00:00
Tim J. Robbins
6e7988b9c5 Catch up with the renaming of the "union" filesystem to "unionfs".
Fixes a problem where directory entries could show up twice: once
on the top layer of the union stack, and once on the bottom layer.

Approved by:	re (rwatson)
2003-05-16 02:15:07 +00:00
David E. O'Brien
8d542cb56d Fix long standing bug that prevents the PT_CONTINUE, PT_KILL and
PT_DETACH ptrace(2) requests from functioning as advertised in the
manual page.  As described in kern/35175, the PT_DETACH request will,
under certain circumstances, pass an unwanted signal on to the traced
process upan detaching from it.  The PT_CONTINUE request will
sometimes fail if you make it pass a signal that has "properties" that
differ from the properties of the signal that origionally caused the
traced process to be stopped.  Since PT_KILL is nothing than
PT_CONTINUE with SIGKILL, it is broken too.  In the PT_KILL case, this
leads to an unkillable process.

PR:		44011
Submitted by:	Mark Kettenis <kettenis@chello.nl>
Approved by:	re(jhb)
2003-05-16 01:34:23 +00:00
Robert Watson
98b2788832 Add a tunable/sysctl "hw.fxp_noflow" which disables flow control support
on if_fxp cards.  When flow control is enabled, if the operating system
doesn't acknowledge the packet buffer filling, the card will begin to
generate ethernet quench packets, but appears to get into a feedback
loop of some sort, hosing local switches.  This is a temporary workaround
for 5.1: the ability to configure flow control should probably be
exposed by some or another management interface on ethernet link layer
devices.

Approved by:	re (bmah)
Reviewed by:	mux
2003-05-16 01:13:16 +00:00
Thomas Moestl
a93b6bf5e9 In cpu_fork(), initialize pcb_psl for the new process to PSL_KERNEL,
instead of taking the (userland) eflags from the trap frame and masking
out PSL_I. There is no need to inherit any flags from the forking process;
the old method however can cause flags set in userland for the forking
process to be bogusly set in kernel mode when the newly forked process
runs for the first time (in particular PSL_T, which is set for userland
when the process is single-stepped; this would cause trace traps in
kernel mode).

Approved by:	re (jhb)
2003-05-16 01:10:33 +00:00
Hiten Pandya
d98ae55eaf Bring the kame(4) manual page closer to reality:
- prefix(8) and gifconfig(8) are deprecated
    - dtcpc, dtcps were never imported (also removed from KAME CVS)
    - pim6dd, pim6sd and racoon are ports
    - inet6d does not exist on FreeBSD

PR: docs/51295
Submitted by: Simon L. Nielsen <simon@nitro.dk>

Content reviewed by: itojun
Approved by: des (mentor), re (bmah)
2003-05-16 00:31:12 +00:00
Robert Watson
c1dca9ab07 VOP_PATHCONF() requires a vnode lock; this patch adds locking to
fpathconf(). The lock is held for direct calls to VOP_PATHCONF() in
pathconf() already.

Approved by:	re (jhb)
Pointed out by:	DEBUG_VFS_LOCKS
2003-05-15 21:13:08 +00:00
Robert Watson
7042ac8cd7 This change grabs the vnode lock for NFS client vnodes when calling
VOP_SETATTR() or VOP_GETATTR(); without these locks (a) VFS_DEBUG_LOCKS
will panic, and (b) it may be possible to corrupt entries in the cached
vnode attributes in the nfsnode, since nfsnode attribute cache data is
also protected by the vnode lock.

Approved by:	re (jhb)
Pointed out by:	VFS_DEBUG_LOCKS
2003-05-15 21:12:08 +00:00
Robert Watson
62d4b85ec1 Jeff added locking assertions that the VV_ flags on vnodes were modified
only while holding appropriate vnode locks.  This patch slides the lock
release for ufs_extattr_enable() to continue to hold the active vnode lock
on a backing file until after the flag change; it also acquires a vnode
lock when disabling an attribute and hence clearing a flag on the backing
vnode.  This permits VFS_DEBUG_LOCKS to run UFS1 extended attributes
without panicking, as well as preventing a potential race and vnode flag
problem.

Approved by:	re (jhb)
Pointed out by:	DEBUG_VFS_LOCKS
2003-05-15 21:07:33 +00:00
Dag-Erling Smørgrav
ccd60d5c3d Explicitly set the sandbox directory (it defaults to ~/tinderbox which is
wrong when running a release tinderbox as root)

Use the setup's COMMENT field in the subject of the failure report, instead
of just "$branch tinderbox".

Tweak the test setups.
2003-05-15 20:33:33 +00:00
Dag-Erling Smørgrav
1a1ab60d64 'make release' should run from src/release, not src. 2003-05-15 20:30:21 +00:00
Bosko Milekic
11583f6c93 Make the mb_alloc low-watermark sysctl-tunable read-only and make
netstat(1) not display it for now because its effects are not yet
completely implemented and we're about to cut 5.2-RELEASE.
This is temporary.

Approved by: re (scottl, rwatson)
2003-05-15 19:05:28 +00:00
Julian Elischer
95f04def4b fix a cut-n-paste error.
in the case where the bridge node was closed down but a timeout
still applied to it, the final reference to the node was freeing the private
data structure using the wrong malloc type.

Approved by:	re@
2003-05-15 18:51:28 +00:00
Mike Makonnen
dd3b229e2c Do some cleanup with respect to condition variables. The implementation
of pthread_cond_timedwait() is moved into cond_wait_common().
Pthread_cond_wait() and pthread_cond_timedwait() are now wrappers around
this function. Previously, the former called the latter with the abstime
pointing to 0 time. This violated Posix semantics should an application
have reason to call it with that argument because instead or returning
immediately it would have waited indefinitely for the cv to be signaled.

Approved by:	markm/mentor, re/blanket libthr
Reviewed by:	jeff
2003-05-15 18:17:13 +00:00
Ruslan Ermilov
50da533c0e Use the installed world's idea of OSRELDATE rather than the kernel.
This was the initial intent anyway, and it became clear that it is
really necessary to treat it this way, as many people happen to run
with kernel newer than the installed world.

Submitted by:	imp, ru
Approved by:	re (scottl)
2003-05-15 17:59:32 +00:00
Mike Makonnen
6da7f4937e o Make the setting/checking of cancel state atomic with
respect to other threads and signal handlers by moving to
  the _thread_critical_enter/exit functions.

o Introduce an static function, testcancel(), that is used by
  the other functions in this module. This allows it to make
  locking assumptions that the top-level functions can't.

o Rework the code flow a bit to reduce indentation levels.

Approved by:	markm/mentor, re/blanket libthr
Reviewed by:	jeff
2003-05-15 17:56:18 +00:00
Nate Lawson
d6061de923 Generalize a quirk for Asahi Optical-based cameras (i.e. Pentax). It appears
all of the Optio series have the same problems.  It might be a better
approach eventually to add wildcard support to USB quirks.

PR:		kern/50271, kern/46369
Approved by:	re (rwatson)
2003-05-15 17:36:22 +00:00
Nate Lawson
f410510b09 Add a quirk for OTi USB flash key.
PR:		kern/51825
Approved by:	re (rwatson)
2003-05-15 17:35:35 +00:00
Thomas Moestl
18100346d1 Miscellaneous fixes:
- Fix compilation without GEM_DEBUG.
- Do not #define GEM_DEBUG by default; it adds overhead (due to bzero()ing
  RX space) and is not needed any more, since the driver is quite stable
  now.
- Fix watchdog timeouts when failing to load TX packets.
- Do not forcibly limit the number of descriptors used for a packet to
  GEM_NTXSEGS, by passing this number to bus_dma_tag_create(). There is
  no requirement for a limit any lower than the total number of
  available descriptors, and the present limit caused network problems
  due to mbuf chains requiring more descriptors.
  GEM_NTXSEGS is still used to estimate the interrupt window size, for
  which we just need an estimate.

Approved by:	re (rwatson)
2003-05-15 16:57:55 +00:00
Martin Blapp
f956e0b3f0 Only use a SIA/SYM media info block if no MII block is detected.
The submitter of PR 32118 told me that this patch also fixes autoselecting
for znyx 4 port cards (10baseT, 100baseTX did work already).

PR:		32118
Reviewed by:	imp
Approved by:	rwatson (re)
2003-05-15 16:53:29 +00:00
Dag-Erling Smørgrav
0fbce30315 Make 'clean' and 'update' commands rather than options. Invoke 'update'
(but not 'clean') in all setups.  Bump tinderbox.pl version to 2.1, mostly
for the 'release' command added in the previous commit.
2003-05-15 13:12:57 +00:00
Dag-Erling Smørgrav
9aad97c0eb Make the ENV configuration variable a hash rather than an array.
Build LINT on -STABLE now that tinderbox.pl knows how.  Also try to build
LINT on powerpc and amd64 (this is a formality as they don't have NOTES
so nothing will be built)

Add two setups for release testing, with plenty of NO* to speed things up.

If the config key was not specified on the command line, try to guess it
from the hostname.
2003-05-15 12:33:46 +00:00
Dag-Erling Smørgrav
91f9508f52 Add a 'release' command which builds a release. It currently sets
NOCDROM, NODOC and NOPORTS to save time and space, but I may remove
those at a later date so we can use the results to populate a snapshot
server.

Document the --machine option.

Make $arch and $machine default to the correct values for the current
system.  This shouldn't make any difference unless you run the
tinderbox on a pc98 machine, since for all other platforms, $arch and
$machine are the same.

Only set kernel-related variables if actually building a kernel or a
release.

Be paranoid and cd to the correct directory in each stage so we're
sure we invoke make(1) in the right place.

To support building LINT on -STABLE, don't try to 'make LINT' unless
NOTES exists, but build LINT if the config file exists even if there
is no NOTES.
2003-05-15 12:26:55 +00:00
Dag-Erling Smørgrav
0d74290be5 use 5.006_001 (for new open() syntax) 2003-05-15 12:17:02 +00:00
Dag-Erling Smørgrav
dbf78dac50 Add a Makefile for the web bits. 2003-05-15 10:48:50 +00:00
Dag-Erling Smørgrav
e9656c097b Untabify string literals. 2003-05-15 08:45:22 +00:00
Dag-Erling Smørgrav
5e62823b5c Don't show platforms for which we have no logs. 2003-05-15 08:44:18 +00:00
Dag-Erling Smørgrav
ac74e878e4 CSS uses C-style comments, not C++-style. 2003-05-15 08:39:00 +00:00
Dag-Erling Smørgrav
3aa990306e These are the sources for the tinderbox summary page. 2003-05-15 08:36:26 +00:00
Marcel Moolenaar
794518cd6d This file creates register sets based on the runtime specification.
The advantage of using register sets is that you don't focus on each
register seperately, but instead instroduce a level of abstraction.
This reduces the chance of errors, and also simplifies the code.
The register sers form the basis of everything register.
The sets in this file are:

struct _special
contains all of the control related registers, such as instruction
pointer and stack pointer. It also contains interrupt specific registers
like the faulting address. The set is roughly split in 3 groups. The
first contains the registers that define a context or thread. This is
the only group that the kernel needs to switch threads.  The second group
contains registers needed in addition to the first group needed to switch
userland threads. This group contains the thread pointer and the FP control
register. The third group contains those registers we need for execption
handling and are used on top of the first two groups.

struct _callee_saved, struct _callee_saved_fp
These sets contain the preserved registers, including the NaT after
spilling. The general registers (including branch registers) are
seperated from the FP registers for ptrace(2).

struct _caller_saved, struct _caller_saved_fp
These sets contain the scratch registers based on SDM 2.1, This means that
both ar.csd and ar.ccd are included here, even though they contain ia32
segment register descriptions. We keep seperate NaT bits for scratch and
preserved registers, because they are never saved/restored at the same
time.

struct _high_fp
The upper 96 FP registers that can be enabled/disabled seperately on
the CPU from the lower 32 FP registers. Due to the size of this set,
we treat them specially, even though they are defined as scratch
registers.

CVS ----------------------------------------------------------------------
2003-05-15 08:36:03 +00:00
Marcel Moolenaar
4bae872201 This file contains elementary context related functions used to
save and restore "sets" of registers in various places.
The restorectx and swapctx functions are used by cpu_switch()
and deal with the special registers, as well as the preserved
registers.
The *callee_saved* functions are used to save and restore the
preserved registers (integer and floating-point). They are
useful for signal delivery and ptrace support.
The save_high_fp and restore_high_fp functions are used to
"load" and "unload" to and from the CPU as part of lazy context
switching.
The ia32 specific context functions have been kept with the ia32
code.

Approved by: re@ (blanket)
2003-05-15 08:08:32 +00:00
Marcel Moolenaar
1d67adffd6 This file contains the code that implements the syscall path based
on the epc instruction. The epc instruction, given the permissions
of the page in which the epc is located, allows the privilege level
to be increased with little or no overhead. The previous privilege
level is recorded in the current frame marker and is restored by
a regular (function) return.
Since the epc instruction has to live in a page with non-standard
properties, we hardwire a "gateway" page in the address space. The
address of the gateway page is exported to userland in ar.k7. This
allows us to rewire the page without breaking the ABI.
The syscall stubs in libc are regular function calls that slightly
differ from the normal runtime. The difference is mostly to simplify
the stubs themselves by by moving some of the logic to the kernel.
The libc stubs call into the gateway page (offset 0), from where the
kernel trampolines to the code that sets up a minimal trapframe and
arranges to execute from the kernel stack.
The way back is basicly the same. The kernel returns to the gateway
page, whereby privilege is dropped, and jumps back to the syscall
stub.
Only the special registers are saved in the trapframe. None of the
scratch registers are preserved and since the kernel follows the
same runtime model, none of the preserved registers are saved.
Future enhancements can include the implementation of lightweight
syscalls, where kernel functions are performed without setting up
a trapframe. Good candidates are the *context syscalls for example.

Now that there's a gateway page from which code can be executed in
a non-privileged context, we also have the ideal place to put the
signal trampolines. By moving the signal trampolines from the user
stack to the gateway page, we open up the doors to unexecutable
stacks. The gateway page contains signal trampolines for both the
"legacy" break-based syscall code and the new and improved epc-
based syscall code.

Approved: re@ (blanket)
2003-05-15 07:51:22 +00:00
Alan Cox
4a0d6dfd2c Initialize logical_cpus_mask when the logical CPUs are enumerated in
the mptable.  (Previously, logical_cpus_mask was only initialized if
the hyperthreading fixup was executed.)

Approved by:	re (jhb)
Reviewed by:	ps
2003-05-15 05:12:24 +00:00
Marcel Moolenaar
2a9fc22645 This commit was generated by cvs2svn to compensate for changes in r115013,
which included commits to RCS files with non-trunk default branches.
2003-05-15 05:04:44 +00:00
Marcel Moolenaar
35859e5946 This is beta4 of libuwx; an ia64 stack unwinder. This code is made
available by Hewlett-Packard under the MIT license. The unwinder is
small, clean and fast and needed little adaptation for use in the
kernel.

This import has embedded in it the changes needed to make it build
in a kernel environment.

To optimize the common case, the kernel will minimize the number
of registers saved by not saving the preserved registers. In case
access to preserved registers is needed (signal handling, ptrace)
the kernel will unwind to the context of the syscall or exception.
For this we need an unwinder.

Approved by: re (blanket)
2003-05-15 05:04:44 +00:00
Robert Watson
eda8b2821f When getting back an NLM DENIED response for a requested lock from the
server, map it to EAGAIN locally rather than EACCES.  The NLM spec
indicates the DENIED corresponds to lock contention, not a permission
failure.  This fixes O_EXLOCK/O_SHLOCK with O_NONBLOCK, which would
previously give a permission error, which in turn fixes things
like mailq(8) and lockf(1) over NFS.

Approved by:	scottl (re)
Reviewed by:	truckman, Andrew P Lentvorski, Jr. <bsder@allcaps.org>
Idea from:	truckman
2003-05-15 03:19:30 +00:00
Warner Losh
18e8d6d786 Allow zero or more actions in an action list, rather than requiring
one or more actions in the list.  This makes constructs like:

attach 10 {
//	echo "Driver $device_name attached"
};

to be accepted by the parser.  It will be treated as if the user had
entered:

// attach 10 {
//	echo "Driver $device_name attached"
// };

(eg totally ignored).

Approved by: re@ (rwatson)
2003-05-15 02:23:32 +00:00
Juli Mallett
7bbf05a2c3 Clear up that COMPAT_43 may not do the same thing on every architecture
and clear up that COMPAT_SUNOS is similarly MI, and does something
relatively similar.

Approved by:	re/rwatson
2003-05-15 02:10:30 +00:00
David E. O'Brien
0865cf03b8 Fix typo in rev 1.69. Also clarify a line.
Submitted by:	ru
2003-05-15 01:28:39 +00:00
Peter Wemm
c0a54ff621 Collect the nastiness for preserving the kernel MSR_GSBASE around the
load_gs() calls into a single place that is less likely to go wrong.

Eliminate the per-process context switching of MSR_GSBASE, because it
should be constant for a single cpu.  Instead, save/restore it during
the loading of the new %gs selector for the new process.

Approved by:	re (amd64/* blanket)
2003-05-15 00:23:40 +00:00
Peter Wemm
be52ef1399 Use compile time constants for things like PTmap[] etc because they're
about to move outside of the +/- 2GB range

Suggested by:	jake
Approved by:	re (amd64/* blanket)
2003-05-15 00:20:17 +00:00
Robert Watson
86eb7cbada Avoid registering for a lock on the server in the event the NFS client
has requested the lock in a non-blocking form, instead returning an
immediate failure.  This appears to help reduce one of my "locks get
lost" symptoms involving lockf(1), which attempts a non-blocking lock
attempt before actually blocking on the lock.  At this point the client
still gets back EACCES, which is an issue we're still working.

Approved by:	re (scottl)
Submitted by:	Andrew P. Lentvorski, Jr. <bsder@allcaps.org>
2003-05-14 21:16:33 +00:00
Maxime Henrion
4d340ec485 GCC 3.3 complains about anonymous structures in unions, so
give the fxp_ipcb structure a name in the fxp_rfa structure.

Submitted by:	peter
Approved by:	re (jhb)
2003-05-14 20:33:41 +00:00
Robert Watson
6f1695d876 When giving examples of how to use extattrctl(8) to configure UFS1
attributes, use the current convention for attribute directory names
so that UFS_EXTATTR_AUTOSTART will work with them.

Approved by:	re (scottl)
2003-05-14 20:31:06 +00:00
John Baldwin
aa7ba84232 Fix a typo that broke the pc98 kernel build.
Reported by:	des@'s tinderbox
Pointy hat to:	jhb
Approved by:	re (blanket/scottl)
2003-05-14 20:21:42 +00:00
Tom Rhodes
cc3e724564 According to revision 1.6 of iir.c, the latest import should have resolved
the issues listed in BUGS.  Remove the BUGS section.

Discussed with:	bmah (awhile ago)
Approved by:	re (blanket)
2003-05-14 17:53:40 +00:00
Ruslan Ermilov
eb9a85cabd mdoc(7) police: fix more breakages from rev. 1.69. 2003-05-14 16:22:16 +00:00
David E. O'Brien
28abeaf93a Remove the Firewire driver from the install kernel. 2003-05-14 16:01:02 +00:00
David E. O'Brien
ab001085b1 Push tl(3) [TI ThunderLAN] from the mfsroot to the driver floppy. 2003-05-14 15:38:44 +00:00
John Baldwin
840558b971 s/procsig/sigacts/ to catch up to procsig and sigacts changes in the kernel.
Approved by:	re (scottl)
2003-05-14 15:01:20 +00:00