Robert Watson [Mon, 21 Oct 2002 16:39:12 +0000 (16:39 +0000)]
Since the Biba and MLS access checks are identical to the open checks,
collapse the two cases more cleanly: rather than wrapping an access
check around open, simply provide the open implementation for the
access vector entry. No functional change.
Robert Watson [Mon, 21 Oct 2002 16:35:54 +0000 (16:35 +0000)]
Cleanup of relabel authorization checks -- almost identical logic,
we just break out some of the tests better. Minor change in that
we now better support incremental update of labels.
Ian Dowse [Mon, 21 Oct 2002 13:55:50 +0000 (13:55 +0000)]
Replace in_pcbladdr() with a more generic inner subroutine for
in_pcbconnect() called in_pcbconnect_setup(). This version performs
all of the functions of in_pcbconnect() except for the final
committing of changes to the PCB. In the case of an EADDRINUSE error
it can also provide to the caller the PCB of the duplicate connection,
avoiding an extra in_pcblookup_hash() lookup in tcp_connect().
This change will allow the "temporary connect" hack in udp_output()
to be removed and is part of the preparation for adding the
IP_SENDSRCADDR control message.
Andrew Gallatin [Mon, 21 Oct 2002 12:54:13 +0000 (12:54 +0000)]
Add some documentation of FreeBSD's special synchronization quirks
which may surprise developers coming from Solaris, or other platforms
which have a similar interface, but slightly different rules.
Murray Stokely [Mon, 21 Oct 2002 10:53:35 +0000 (10:53 +0000)]
Update comment to note that the third floppy (for modules) has been
implemented. Add a note reminding developers to update drivers.conf.5
if they add new functionality here.
Murray Stokely [Mon, 21 Oct 2002 10:48:19 +0000 (10:48 +0000)]
Note that support for the third 'drivers floppy' has been implemented.
Also point to the AWK scripts instead of the older Perl ones, now that
they've been rewritten.
Marcel Moolenaar [Mon, 21 Oct 2002 04:21:12 +0000 (04:21 +0000)]
Implement working on ELF corefiles. Use kvm_read() when reading
memory while mapping a virtual address to a physical address.
This allows us to work with virtual addresses for page tables,
provided it doesn't cause infinite recursion. Currently all
page tables are direct mapped.
Robert Watson [Mon, 21 Oct 2002 04:15:40 +0000 (04:15 +0000)]
Add a twiddle to create PTY's with a biba/equal or mls/equal label
instead of the default biba/high, mls/low, making it easier to use
ptys with these policies. This isn't the final solution, but does
help.
Robert Watson [Mon, 21 Oct 2002 03:54:24 +0000 (03:54 +0000)]
Unhook the per-policy parsing/printing MAC modules in libc to prepare
to bring in the new MAC label management API. With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.
Brooks Davis [Mon, 21 Oct 2002 02:54:50 +0000 (02:54 +0000)]
Use if_printf(ifp, "blah") and device_printf(dev, "blah") instead of
printf("%s%d: blah", ifp->if_name, ifp->if_xname). This eliminates the
need to store the unit number in the softc.
David E. O'Brien [Mon, 21 Oct 2002 00:26:48 +0000 (00:26 +0000)]
Unbreak Alpha world.
We are seeing "/usr/libexec/ld-elf.so.1: groff: too few PT_LOAD segments",
however it appears that there really is only one PT_LOAD segment in the groff
binary. It is unclear if `rtld' or `ld' is at fault here -- but using an
RELENG_4 `ld' binary allows one to build a working dynamic groff binary.
Marcel Moolenaar [Sun, 20 Oct 2002 23:39:43 +0000 (23:39 +0000)]
In cb_dumphdr() we were calling buf_write() with di->priv as the
pointer to a dumperinfo instead of di. A brainfart, surely. This
bug went unnoticed for all this time because the pointer is only
used by buf_write() when it can write a completely filled buffer
to the dump device. This depends on the number of memory chunks
that needs to be dumped. This has apparently been low enough that
it has never happened up until this point.
Thomas Moestl [Sun, 20 Oct 2002 23:13:05 +0000 (23:13 +0000)]
Fix the calculations of the length of the unread message buffer
contents. The code was subtracting two unsigned ints, stored the
result in a log and expected it to be the same as of a signed
subtraction; this does only work on platforms where int and long
have the same size (due to overflows).
Instead, cast to long before the subtraction; the numbers are
guaranteed to be small enough so that there will be no overflows
because of that.
Fix two instances of variant struct definitions in sys/netinet:
Remove the never completed _IP_VHL version, it has not caught on
anywhere and it would make us incompatible with other BSD netstacks
to retain this version.
Add a CTASSERT protecting sizeof(struct ip) == 20.
Don't let the size of struct ipq depend on the IPDIVERT option.
Robert Drehmel [Sun, 20 Oct 2002 22:50:13 +0000 (22:50 +0000)]
Do not try to work around ``poor (un)sign extension code''
creation by GCC-2.6.3. Casting pointers to unsigned char
to volatile pointers to unsigned char seemed to produce
better results on the ia32 architecture with old versions
of GCC.
The current FreeBSD system compiler GCC-3.2.1 emits
better sign extension code for non-volatile variables:
volatile char c;
int i = c;
is compiled to:
...
movb -1(%ebp), %al
movbsl %al, %eax
movl %eax, -8(%ebp)
...
char c;
int i = c;
is compiled to:
...
movbsl -1(%ebp), %eax
movl %eax, -8(%ebp)
...
The same holds for zero-extension of dereferenced pointers
to volatile unsigned char.
When compiled on alpha or sparc64, the code produced for the
two examples above does not differ.
Robert Watson [Sun, 20 Oct 2002 22:39:55 +0000 (22:39 +0000)]
When packets pass in and out of six-to-four (STF) tunnels, perform
labeling checks and operations as with other network interfaces.
Eventually, if it proves desirable, we might want to offer special
casing of this or other tunnel interfaces where we have an existing
label of interest, rather than treating it as though it's an
entirely fresh mbuf in the incoming/outgoing encapsulation directions.
Robert Watson [Sun, 20 Oct 2002 22:27:59 +0000 (22:27 +0000)]
When a packet is sent via a FDDI interface, perform appropriate MAC
transmission checks; when it is received, label the packet appropriately.
Although we don't have a local FDDI setup to test this with, the
labeling and checks are identical to other interface classes.
Robert Watson [Sun, 20 Oct 2002 22:20:48 +0000 (22:20 +0000)]
When a packet is destined for delivery via an ATM medium, perform
appropriate interface transmission checks and delivery labeling. While
we don't have a local ATM configuration, this code is almost identical
to all other interface classes.
Sam Leffler [Sun, 20 Oct 2002 22:19:37 +0000 (22:19 +0000)]
Another baby step toward getting sysinstall working:
o fillin media s/h/c fields from new XML phk just added; need this because
sysinstall uses them in the fdisk look-alike
o add new tags to xml parser
o cleanup parser a touch; remove unused tags and move tag parsing stuff to
a table to simplify future additions
o redo callback to pass 64-bit values since mediasize overflows u_int32_t
o loosen parsing sanity checks a touch to deal with new xml we must handle
o move sector size probing to non-geom handling since we now get it from xml
o remove WHOLE_DISK_SLICE buggery now that we get mediasize from xml
Warner Losh [Sun, 20 Oct 2002 22:15:17 +0000 (22:15 +0000)]
devd. A daemon that hooks into the kernel's /dev/devctl to produce
arbitrary commands when devices come and go in the device tree (which is
different than the /dev directory).
This is an initial version. Much of the planned power isn't here.
Instead of doing the full matching, we always run /etc/devd-generic.
/etc/devd.generic will go away at some point, I think.
I'm committing it in this early state so I can start getting feedback
from early adapters.
Robert Watson [Sun, 20 Oct 2002 22:11:13 +0000 (22:11 +0000)]
Rename _POSIX_FOO_PRESENT and friends from POSIX.1e to _PC_FOO_PRESENT
and related friends. This would have been corrected had POSIX.1e
progressed to a standard.
Ian Dowse [Sun, 20 Oct 2002 21:44:31 +0000 (21:44 +0000)]
Split out most of the logic from in_pcbbind() into a new function
called in_pcbbind_setup() that does everything except commit the
changes to the PCB. There should be no functional change here, but
in_pcbbind_setup() will be used by the soon-to-appear IP_SENDSRCADDR
control message implementation to check or allocate the source
address and port.
Alan Cox [Sun, 20 Oct 2002 21:40:17 +0000 (21:40 +0000)]
- Replace two instances of vm_page_sleep_busy() with the page queue
mutex-friendly vm_page_sleep_if_busy().
- Introduce page queue locking in pmap_page_lookup() and
pmap_release_free_page().
- Simplify the invalidation of the pmap's ptphint in
pmap_release_free_page(). (MFi386 pmap.c revision 1.362.)
Change the definition of the debugging registers to be an array, so
that we can index into it, rather than do pointer gymnastics on a
structure containing 8 elements.
Now that the sectorsize and mediasize are properties of the provider,
don't take the detour over the I/O path to discover them using getattr(),
we can just pick them out directly.
Do note though, that for now they are only valid after the first open
of the underlying disk device due compatibility with the old disk_create()
API. This will change in the future so they will always be valid.
Add checks for DIGIT set consistency to prevent common misinterpretation
automatically.
Remove output file on error.
Staticize functions declared as static.
Chris Costello [Sun, 20 Oct 2002 19:20:26 +0000 (19:20 +0000)]
o Use .Cm for 'attach', 'detach', 'init', 'setkey', and 'destroy' commands
o Fix some punctuation and wording
o Wording consistency in command-line option documentation
o Make use of mdoc's markup a bit more (quoting and the like)
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs