jake [Thu, 1 Feb 2001 03:34:20 +0000 (03:34 +0000)]
Implement preemptive scheduling of hardware interrupt threads.
- If possible, context switch to the thread directly in sched_ithd(),
rather than triggering a delayed ast reschedule.
- Disable interrupts while restoring fpu state in the trap handler,
in order to ensure that we are not preempted in the middle, which
could cause migration to another cpu.
iedowse [Wed, 31 Jan 2001 15:16:56 +0000 (15:16 +0000)]
Fsck_ffs did not properly range-check the inode 'di_size'
field, so it was possible for a filesystem marked clean by fsck_ffs
to cause kernel crashes later when mounted. This could occur when
fsck_ffs was used to repair a badly corrupted filesystem.
As pointed out by bde, it is not sufficient to restrict di_size to
just the superblock fs_maxfilesize limit. The use of 32-bit logical
block numbers (both in fsck and the kernel) induces another file
size limit which is usually lower than fs_maxfilesize. Also, the
old 4.3BSD filesystem does not have fs_maxfilesize initialised.
Following this change, fsck_ffs will enforce exactly the same
file size limits as are used by the kernel.
dfr [Wed, 31 Jan 2001 11:17:00 +0000 (11:17 +0000)]
* Move exception_return to exception.s which is a more logical home for it.
* Optimise the return path for syscalls so that they only restore a minimal
set of registers instead of performing a full exception_return.
A new flag in the trapframe indicates that the frame only holds partial
state. When it is necessary to perform a full state restore (e.g. after an
execve or signal), the flag is cleared to force a full restore.
msmith [Wed, 31 Jan 2001 09:35:50 +0000 (09:35 +0000)]
Add some debugging.
Turn off semaphores. Nobody else implements them, and there is lots of
AML out there which does totally absurd things with them, meaning that
if we try to do the right thing we are guaranteed to fail.
peter [Wed, 31 Jan 2001 08:42:35 +0000 (08:42 +0000)]
Redo the stray header file cleanup code to not depend on timestamps
or access times or anything. Just bite the bullet and keep a list of
header files that we know about.
julian [Tue, 30 Jan 2001 20:51:52 +0000 (20:51 +0000)]
Implement direct support for semipersistant nodes.
(e.g. ethernet nodes are persistent until you rip out the hardware)
Use this support in the ethernet and sample nodes.
Add some more abstraction on the 'item's so that node and
hook reference counting can be checked easier.
Slight man page correction.
Make pppoe type dependent on ethernet type.
Clean up node shutdown a little.
Move a mutex from MTX_SPIN to MTX_DEF (oops)
Fix small ref-counting bug.
remove warning on one2many type.
jhb [Tue, 30 Jan 2001 20:13:02 +0000 (20:13 +0000)]
- Fix TUNABLE_STR_FETCH() to actually be a code fragment rather than
declaring a static function.
- Modify TUNABLE_*_DECL() to use TUNABLE_*_FETCH() to avoid code
duplication.
bde [Tue, 30 Jan 2001 17:05:58 +0000 (17:05 +0000)]
Added used include of <sys/mutex.h>. The SMP case was broken by
incompletely converting simplelocks to mutexes (COM_LOCK() is supposed
to hide the SMP locking internals, but it now depends on mutex interfaces
being visible).
brian [Tue, 30 Jan 2001 10:24:18 +0000 (10:24 +0000)]
Allow the output of /etc/security to be logged or mailed to different
users in line with ${daily,weekly,monthly}_output using a new
$daily_status_security_output variable.
dillon [Tue, 30 Jan 2001 06:31:59 +0000 (06:31 +0000)]
Fix a race between the syncer and umount. When you umount a softupdates
filesystem softdep_process_worklist() is called in a loop until it indicates
that no dependancies remain, but the determination of that fact depends on
there only being one softdep_process_worklist() instance running. It was
possible for the syncer to also be running softdep_process_worklist()
and the pre-existing checks in the code to prevent this were not sufficient
to prevent the race. This patch solves the problem.
jhb [Tue, 30 Jan 2001 00:10:37 +0000 (00:10 +0000)]
- Use the right name for the proctree lock in the locking key.
- Add a note about the special locking semantics used for members such as
p_cred that are read by multiple processes but only written to by the
current process.
- Change p_upages_obj's locking key to note that it is created at fork
and left alone afterwards (the actual pointer, not what it points to.)
- Mark p_intr_nesting_level as being implicitly locked since only curproc
accesses it.
luigi [Mon, 29 Jan 2001 22:47:46 +0000 (22:47 +0000)]
Put picobsd build scripts in sync with the ones in -STABLE.
With these scripts i was able to build a _working_ image of a
bridge-like floppy image with a reasonable set of utilities
in it, despite the code size increase we have in 5.0
The scripts are slightly different from the previous ones especially
on the place where the kernel and binaries are built. Hopefully
this will not cause too much trouble to people (is there any???)
using the old scripts.
peter [Mon, 29 Jan 2001 13:26:14 +0000 (13:26 +0000)]
Supply a stub bpf_validate() (always returning false - the script is not
valid) if BPF is missing.
The netgraph_bpf node forced bpf to be present, reflect that in the
options.
Stop doing a 'count bpf' - we provide stubs.
Since a handful of drivers still refer to "bpf.h", provide a more accurate
indication that the API is present always. (eg: netinet6)
bp [Mon, 29 Jan 2001 12:48:37 +0000 (12:48 +0000)]
Add M_PANIC flag to the list of available flags passed to malloc().
With this flag set malloc() will panic if memory allocation failed.
This usable only in critical places where failed allocation is fatal.
peter [Mon, 29 Jan 2001 11:38:39 +0000 (11:38 +0000)]
Zap silly #if NPCI > 0 and the hoops that we jump through for the module
case. Use an 'and' case in conf/files so that it only gets compiled if
pci is present.
peter [Mon, 29 Jan 2001 11:06:26 +0000 (11:06 +0000)]
Make the number of loopback interfaces dynamically tunable. Why one
would *want* to is a different story, but it used to be able to be done
statically. Get rid of #include "loop.h" and struct ifnet loif[NLOOP];
This could be used as an example of how to do this in other drivers,
for example: ccd.
peter [Mon, 29 Jan 2001 09:38:39 +0000 (09:38 +0000)]
Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.
peter [Mon, 29 Jan 2001 09:34:43 +0000 (09:34 +0000)]
I confess. This is a truely nasty hack. I am so ashamed!
(I think config(8) source does bad things to your brain :-)
Clean up likely stray *.h files in the build directory.
Eg: if isa.h ceases being generated, zap it.
The heuristics to figure out a 'likely' file are pretty revolting.
sheldonh [Mon, 29 Jan 2001 08:22:21 +0000 (08:22 +0000)]
Replace the full path to sysinstall with a standard manual page
reference. The sysinstall binary is now in root's standard PATH,
so there's no need for explicit pathing, and there's some value
in a manual page reference.
dillon [Mon, 29 Jan 2001 08:19:28 +0000 (08:19 +0000)]
This patch reestablishes the spec_fsync() guarentee that synchronous
fsyncs, which typically occur during unmounting, will drain all dirty
buffers even if it takes multiple passes to do so. The guarentee was
mangled by the last patch which solved a problem due to -current disabling
interrupts while holding giant (which caused an infinite spin loop waiting for
I/O to complete). -stable does not have either patch, but has a similar
bug in the original spec_fsync() code which is triggered by a bug in the
softupdates umount code, a fix for which will be committed to -current
as soon as Kirk stamps it. Then both solutions will be MFC'd to -stable.
-stable currently suffers from a combination of the softupdates bug and
a small window of opportunity in the original spec_fsync() code, and -stable
also suffers from the spin-loop bug but since interrupts are enabled the
spin resolves itself in a few milliseconds.
peter [Mon, 29 Jan 2001 08:19:02 +0000 (08:19 +0000)]
change 'count eisa' to 'optional eisa' and update the only consumer
of 'NEISA' - userconfig.c.
While there, send some defunct code to the file history.
ken [Mon, 29 Jan 2001 05:33:14 +0000 (05:33 +0000)]
Back out rev 1.102. The IBM DNES drives work fine for me, jedgar and other
folks.
My guess is that reducing the number of tags is just masking the real
problem for the PR submitter. I'll re-open the PR and see if I can work
with the submitter to diagnose the problem.