Marcel Moolenaar [Wed, 30 Oct 2002 07:58:11 +0000 (07:58 +0000)]
Don't pass the return address to exception_save in register b0. Use
a true scratch register. This change and future re-allocations will
eventually result in code that we can unwind to to get the preserved
registers of the process. This of course means that we cannot trash
them while saving the process context.
While re-allocating, remove the register aliases. Abstraction is in
this case disadvanteous.
Marcel Moolenaar [Wed, 30 Oct 2002 05:55:29 +0000 (05:55 +0000)]
Rewrite cpu_switch(). The most notable change is the fact that we now
have f16-f31 as part of the context. The PCB has been reorganized to
better match how we save and restore the (preserved) registers. This
commit also moves the context restoriation to its own function (named
pcb_restore), as we did with pcb_save.
Only minimal effort has been put in writing optimal assembly. The
expectation is that there will be more rounds of changes.
Marcel Moolenaar [Wed, 30 Oct 2002 03:51:00 +0000 (03:51 +0000)]
Implement DCE 1.1 compliant UUID functions. Immediate use of these
functions is expected for uuidgen(1), mca(8) and gpt(8). Given the
generic use of UUIDs beyond the scope of the DCE 1.1 specification,
visibility of the data structure at all levels of the machine,
including firmware and the wish to not create a permanent build-
time FreeBSD-ism for DCE compliant applications by creating a new
library, it was decided that libc would be the least inappropriate
place. Also, because the UUID functions live in libc under IRIX as
well, we have maximized our portability and left as many options
open as possible.
This implementation introduces an extension not found in the
specification: the status parameter is allowed to be a NULL-
pointer. The reason for introducing the extension is because
the status is almost never of any use.
The manpage that's part of this commit is a minimal place-holder
and is further fleshed-out in the near future.
Andrew Gallatin [Wed, 30 Oct 2002 01:41:44 +0000 (01:41 +0000)]
Remove extranious memory barriers, and correct the placement of a few others.
This provides a 30% reduction in system time and a 6% reduction in wallclock time
for a make buildworld on my xp1000 (one 21264).
FWIW, I've been running this for nearly 2 months without problems.
Andrew Gallatin [Wed, 30 Oct 2002 01:34:41 +0000 (01:34 +0000)]
Make the second serial port available for general use by default.
We've been talking about this for years, but nobody has done it.
(and I don't think anybody has used this for debugging since Doug
and I were doing the initial bootstrapping..)
Ian Dowse [Wed, 30 Oct 2002 01:18:58 +0000 (01:18 +0000)]
Check for errors and zero-length transfers in the ulpt_input() input
pipe callback function, and just return if these cases are detected.
Without these checks, the ulpt driver may cause an infinite loop
of failing USB transfers that can hang the whole machine. This makes
printing work for me on a HP DJ950C printer.
Robert Watson [Tue, 29 Oct 2002 19:18:52 +0000 (19:18 +0000)]
Implement Biba policy entry points for mac_check_system_swapon()
and mac_check_system_sysctl(), providing additional integrity
protections relating to swap target device selection and system
management via sysctl(). Require Biba privilege for both; also
require that the target of swap operations be a high integrity
object, since swap data is high integrity.
Julian Elischer [Tue, 29 Oct 2002 19:12:44 +0000 (19:12 +0000)]
Finally get around to committing Bill Paul's FEC netgraph nodes.
These are really only partly netgraph nodes as they do not use the
netgraph interfaces for many of the functions for which they could
be used, however they represent important functionality.
Warner Losh [Tue, 29 Oct 2002 19:02:19 +0000 (19:02 +0000)]
Don't take out the rl_mtx lock in the attach routine. The only way
we'd need it is if we're interrupted. So, register the interrupt last
in the attach routine.
Bill Fenner [Tue, 29 Oct 2002 16:46:13 +0000 (16:46 +0000)]
Renumber IPPROTO_DIVERT out of the range of valid IP protocol numbers.
This allows socket() to return an error when the kernel is not built
with IPDIVERT, and doesn't prevent future applications from using the
"borrowed" IP protocol number. The sysctl net.inet.raw.olddiverterror
controls whether opening a socket with the "borrowed" IP protocol
fails with an accompanying kernel printf; this code should last only a
couple of releases.
Ruslan Ermilov [Tue, 29 Oct 2002 15:51:37 +0000 (15:51 +0000)]
Index is unique for each PRINTERDEVICE.
Abuse .for so that the variable expansion works inside the N modifier.
This won't be a simple abuse with the next version of bsd.doc.mk
which will support multi-value PRINTERDEVICE.
Murray Stokely [Tue, 29 Oct 2002 15:13:28 +0000 (15:13 +0000)]
Add scr2txt to the required list of doc ports for "make release". I
think this list of the bare minimal ports required should maybe be
moved to textproc/docproj/Makefile, so that when we add a new
dependency there, we can just add it to a required or optional list,
rather than add it there and forget about it here. ;)
Ruslan Ermilov [Tue, 29 Oct 2002 14:56:09 +0000 (14:56 +0000)]
bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS.
Only create _stamp.extra when necessary.
Get rid of SOELIMPP and OBJS.
Use Groff version of soelim(1); we need its -I option
for the following to work.
Don't needlessly chdir to SRCDIR. Only a few documents
need CD_HACK, and those that need it either use refer(1)
or .PSPIC macro which internally uses the .psbb call.
David E. O'Brien [Tue, 29 Oct 2002 12:17:43 +0000 (12:17 +0000)]
Fix `pkg_add -r' by backing out revs 1.34-1.38.
Revs 1.37-8 produce a bus error in some environments.
Revs 1.34-6 do not bus error, but write corrupted files.
Semen Ustimenko [Tue, 29 Oct 2002 01:03:44 +0000 (01:03 +0000)]
Fix winChkName() to match when the last slot contains nothing but the
terminating zero (it was treated as length missmatch). The mtools create
such slots if the name len is the product of 13 (max number of unicode
chars fitting in directory slot).
Juli Mallett [Mon, 28 Oct 2002 23:33:57 +0000 (23:33 +0000)]
Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability. constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately. No longer use
the private strstr(3) implementation, while changing string code.
Robert Watson [Mon, 28 Oct 2002 19:44:05 +0000 (19:44 +0000)]
Remove all reference to 'struct oldmac', since it's no longer required
with the new VFS/EA semantics in the MAC framework. Move the per-policy
structures out to per-policy include files, removing all policy-specific
defines and structures out of the base framework includes and
implementation, making mac_biba and mac_mls entirely self-contained.
Robert Watson [Mon, 28 Oct 2002 19:33:22 +0000 (19:33 +0000)]
Clarify style(9) WRT comments following #endif, #else.
The closing comment is required only for long conditionally defined
code sections, with the exception of lint cases. Attempt to document
also the logic for using '!' before the SOMETIMESSOMETHGINGHERE.
The goal of these comments is to make complex cases more
comprehensible, not to require them in all cases. The rules here are
derived from behavior used in 90+% of the kernel source code.