]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoThis commit was generated by cvs2svn to compensate for changes in r105672,
Assar Westerlund [Tue, 22 Oct 2002 02:13:32 +0000 (02:13 +0000)]
This commit was generated by cvs2svn to compensate for changes in r105672,
which included commits to RCS files with non-trunk default branches.

21 years agoimport 1.27 to fix buffer overflow:
Assar Westerlund [Tue, 22 Oct 2002 02:13:32 +0000 (02:13 +0000)]
import 1.27 to fix buffer overflow:

check size of rlen

Obtained from: Heimdal CVS

21 years ago.Xr mac.3 and posix1e.3 to mac.9. Point at sys/mac.h in posix1e.3.
Robert Watson [Tue, 22 Oct 2002 01:52:53 +0000 (01:52 +0000)]
.Xr mac.3 and posix1e.3 to mac.9.  Point at sys/mac.h in posix1e.3.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoThis update further fine tunes the locking of snapshot vnodes in
Kirk McKusick [Tue, 22 Oct 2002 01:23:00 +0000 (01:23 +0000)]
This update further fine tunes the locking of snapshot vnodes in
the ffs_copyonwrite routine to avoid a deadlock between the syncer
daemon trying to sync out a snapshot vnode and the bufdaemon
trying to write out a buffer containing the snapshot inode.
With any luck this will be the last snapshot race condition.

Sponsored by: DARPA & NAI Labs.

21 years agoThis update is a performance improvement when allocating blocks on
Kirk McKusick [Tue, 22 Oct 2002 01:14:25 +0000 (01:14 +0000)]
This update is a performance improvement when allocating blocks on
a full filesystem. Previously, if the allocation failed, we had to
fsync the file before rolling back any partial allocation of indirect
blocks. Most block allocation requests only need to allocate a single
data block and if that allocation fails, there is nothing to unroll.
So, before doing the fsync, we check to see if any rollback will
really be necessary. If none is necessary, then we simply return.
This update eliminates the flurry of disk activity that got triggered
whenever a filesystem would run out of space.

Sponsored by: DARPA & NAI Labs.

21 years agoThis update removes a race between unmount and lookup. The lookup
Kirk McKusick [Tue, 22 Oct 2002 01:06:44 +0000 (01:06 +0000)]
This update removes a race between unmount and lookup. The lookup
locks the mount point directory while waiting for vfs_busy to clear.
Meanwhile the unmount which holds the vfs_busy lock tried to lock
the mount point vnode. The fix is to observe that it is safe for the
unmount to remove the vnode from the mount point without locking it.
The lookup will wait for the unmount to complete, then recheck the
mount point when the vfs_busy lock clears.

Sponsored by: DARPA & NAI Labs.

21 years agoThis checkin reimplements the io-request priority hack in a way
Kirk McKusick [Tue, 22 Oct 2002 00:59:49 +0000 (00:59 +0000)]
This checkin reimplements the io-request priority hack in a way
that works in the new threaded kernel. It was commented out of
the disksort routine earlier this year for the reasons given in
kern/subr_disklabel.c (which is where this code used to reside
before it moved to kern/subr_disk.c):

----------------------------
revision 1.65
date: 2002/04/22 06:53:20;  author: phk;  state: Exp;  lines: +5 -0
Comment out Kirks io-request priority hack until we can do this in a
civilized way which doesn't cause grief.

The problem is that it is not generally safe to cast a "struct bio
*" to a "struct buf *".  Things like ccd, vinum, ata-raid and GEOM
constructs bio's which are not entrails of a struct buf.

Also, curthread may or may not have anything to do with the I/O request
at hand.

The correct solution can either be to tag struct bio's with a
priority derived from the requesting threads nice and have disksort
act on this field, this wouldn't address the "silly-seek syndrome"
where two equal processes bang the diskheads from one edge to the
other of the disk repeatedly.

Alternatively, and probably better: a sleep should be introduced
either at the time the I/O is requested or at the time it is completed
where we can be sure to sleep in the right thread.

The sleep also needs to be in constant timeunits, 1/hz can be practicaly
any sub-second size, at high HZ the current code practically doesn't
do anything.
----------------------------

As suggested in this comment, it is no longer located in the disk sort
routine, but rather now resides in spec_strategy where the disk operations
are being queued by the thread that is associated with the process that
is really requesting the I/O. At that point, the disk queues are not
visible, so the I/O for positively niced processes is always slowed
down whether or not there is other activity on the disk.

On the issue of scaling HZ, I believe that the current scheme is
better than using a fixed quantum of time. As machines and I/O
subsystems get faster, the resolution on the clock also rises.
So, ten years from now we will be slowing things down for shorter
periods of time, but the proportional effect on the system will
be about the same as it is today. So, I view this as a feature
rather than a drawback. Hence this patch sticks with using HZ.

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk>

21 years agoRemove the OpenBSD comatibility stuff. Many changes to be more style(9)
Semen Ustimenko [Tue, 22 Oct 2002 00:57:51 +0000 (00:57 +0000)]
Remove the OpenBSD comatibility stuff. Many changes to be more style(9)
compilant. Split two pieces if code into separate functions to do not
exceed line length due to indentation.

21 years agoAdd mac(9), a man page providing a basic introduction to the concepts
Robert Watson [Mon, 21 Oct 2002 23:51:18 +0000 (23:51 +0000)]
Add mac(9), a man page providing a basic introduction to the concepts
associated with the TrustedBSD MAC Framework, as well as some credits
to developers and contributors.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agomac_none is a stub policy without any functional implementation.
Robert Watson [Mon, 21 Oct 2002 23:16:23 +0000 (23:16 +0000)]
mac_none is a stub policy without any functional implementation.
Various cleanups, no functional changes:

- Fix a type in an entry point stub, socket checks accept
  sockets, not vnodes.
- Trailing whitespace
- Entry point sort order

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoRemove the process state PRS_WAIT.
Julian Elischer [Mon, 21 Oct 2002 22:27:36 +0000 (22:27 +0000)]
Remove the process state PRS_WAIT.
It is never used. I left it there from pre-KSE days as I didn't know
if I'd need it or not but now I know I don't.. It's functionality
is in TDI_IWAIT in the thread.

21 years agoLobotomize MakeDev(), we don't need it with devfs.
Poul-Henning Kamp [Mon, 21 Oct 2002 22:03:03 +0000 (22:03 +0000)]
Lobotomize MakeDev(), we don't need it with devfs.

21 years agoDEVFS has been nmountified, so use nmount(2) to mount it.
Poul-Henning Kamp [Mon, 21 Oct 2002 21:41:19 +0000 (21:41 +0000)]
DEVFS has been nmountified, so use nmount(2) to mount it.

21 years agoAdd support for sparc64 kernel debugging.
Mark Peek [Mon, 21 Oct 2002 21:36:36 +0000 (21:36 +0000)]
Add support for sparc64 kernel debugging.

Submitted by: tmm

21 years agopsl.h isn't referenced anywhere that I could find on the alpha, so remove
Peter Wemm [Mon, 21 Oct 2002 21:08:32 +0000 (21:08 +0000)]
psl.h isn't referenced anywhere that I could find on the alpha, so remove
this stub.

21 years agoIntroduce mac_biba_copy() and mac_mls_copy(), which conditionally
Robert Watson [Mon, 21 Oct 2002 20:55:39 +0000 (20:55 +0000)]
Introduce mac_biba_copy() and mac_mls_copy(), which conditionally
copy elements of one Biba or MLS label to another based on the flags
on the source label element.  Use this instead of
mac_{biba,mls}_{single,range}() to simplify the existing code, as
well as support partial label updates (we don't update if none is
requested).

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoGrrr, s/PBP/BPB/ here as well.
John Baldwin [Mon, 21 Oct 2002 20:52:51 +0000 (20:52 +0000)]
Grrr, s/PBP/BPB/ here as well.

Noticed by: peter

21 years agoAdd the ability to specify a strict C99 environment with the
Mike Barcroft [Mon, 21 Oct 2002 20:50:30 +0000 (20:50 +0000)]
Add the ability to specify a strict C99 environment with the
_C99_SOURCE constant, which should be defined before including any
standard headers.

21 years agoSigh, d_ntracks, not d_nheads.
Poul-Henning Kamp [Mon, 21 Oct 2002 20:42:20 +0000 (20:42 +0000)]
Sigh, d_ntracks, not d_nheads.

21 years agoImplement a new IP_SENDSRCADDR ancillary message type that permits
Ian Dowse [Mon, 21 Oct 2002 20:40:02 +0000 (20:40 +0000)]
Implement a new IP_SENDSRCADDR ancillary message type that permits
a server process bound to a wildcard UDP socket to select the IP
address from which outgoing packets are sent on a per-datagram
basis. When combined with IP_RECVDSTADDR, such a server process can
guarantee to reply to an incoming request using the same source IP
address as the destination IP address of the request, without having
to open one socket per server IP address.

Discussed on: -net
Approved by: re

21 years agoAdd id_t, a new type capable of representing a pid_t or a uid_t. Move
Mike Barcroft [Mon, 21 Oct 2002 20:35:29 +0000 (20:35 +0000)]
Add id_t, a new type capable of representing a pid_t or a uid_t.  Move
the definition of rlim_t to <sys/_types.h> so that it can be shared.

21 years agoRemove the "temporary connection" hack in udp_output(). In order
Ian Dowse [Mon, 21 Oct 2002 20:10:05 +0000 (20:10 +0000)]
Remove the "temporary connection" hack in udp_output(). In order
to send datagrams from an unconnected socket, we used to first block
input, then connect the socket to the sendmsg/sendto destination,
send the datagram, and finally disconnect the socket and unblock
input.

We now use in_pcbconnect_setup() to check if a connect() would have
succeeded, but we never record the connection in the PCB (local
anonymous port allocation is still recorded, though). The result
from in_pcbconnect_setup() authorises the sending of the datagram
and selects the local address and port to use, so we just construct
the header and call ip_output().

Discussed on: -net
Approved by: re

21 years agoGEOM does not (and shall not) propagate flags like D_MEMDISK, so we will
Poul-Henning Kamp [Mon, 21 Oct 2002 20:09:59 +0000 (20:09 +0000)]
GEOM does not (and shall not) propagate flags like D_MEMDISK, so we will
revert to checking the name to determine if our root device is a ramdisk,
md(4) specifically to determine if we should attempt the root-mount RW

Sponsored by: DARPA & NAI Labs.

21 years agoWe want /dev/md0 for ramdisk roots, not /dev/md0c.
Poul-Henning Kamp [Mon, 21 Oct 2002 20:08:28 +0000 (20:08 +0000)]
We want /dev/md0 for ramdisk roots, not /dev/md0c.

Sponsored by: DARPA & NAI Labs

21 years agofwheads and fwsectors got swapped underway.
Poul-Henning Kamp [Mon, 21 Oct 2002 19:44:07 +0000 (19:44 +0000)]
fwheads and fwsectors got swapped underway.

Approved by: sam

21 years agoSpell the BPB member of the 7.10 bootsector as bsBPB rather than bsPBP to
John Baldwin [Mon, 21 Oct 2002 19:00:50 +0000 (19:00 +0000)]
Spell the BPB member of the 7.10 bootsector as bsBPB rather than bsPBP to
be like all the other bootsectors.  Apple has done the same it seems.

21 years agoReduce the overhead of the mutex statistics gathering code, try to produce
Dag-Erling Smørgrav [Mon, 21 Oct 2002 18:48:28 +0000 (18:48 +0000)]
Reduce the overhead of the mutex statistics gathering code, try to produce
shorter lines in the report, and clean up some minor style issues.

21 years agoAdd compartment support to Biba and MLS policies. The logic of the
Robert Watson [Mon, 21 Oct 2002 18:42:01 +0000 (18:42 +0000)]
Add compartment support to Biba and MLS policies.  The logic of the
policies remains the same: subjects and objects are labeled for
integrity or sensitivity, and a dominance operator determines whether
or not subject/object accesses are permitted to limit inappropriate
information flow.  Compartments are a non-hierarchal component to
the label, so add a bitfield to the label element for each, and a
set check as part of the dominance operator.  This permits the
implementation of "need to know" elements of MLS.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoOne #include <sys/sysctl.h> should be enough.
Olivier Houchard [Mon, 21 Oct 2002 18:40:40 +0000 (18:40 +0000)]
One #include <sys/sysctl.h> should be enough.

Approved by: mux (mentor)

21 years agoAdd a flag needed for recovery of excess allocated KSEs.
Julian Elischer [Mon, 21 Oct 2002 18:37:34 +0000 (18:37 +0000)]
Add a flag needed for recovery of excess allocated KSEs.
(not used in non KSE processes).

Submitted by: davidxu

21 years agoMore in the way of minor consistency improvements: trim 'mac_mls_'
Robert Watson [Mon, 21 Oct 2002 18:14:30 +0000 (18:14 +0000)]
More in the way of minor consistency improvements: trim 'mac_mls_'
from another variable to line this up with mac_biba.c

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoDemote sockets to single-label objects rather than maintaining a
Robert Watson [Mon, 21 Oct 2002 18:05:12 +0000 (18:05 +0000)]
Demote sockets to single-label objects rather than maintaining a
range on them, leaving process credentials as the only kernel
objects with label ranges in the Biba and MLS policies.  We
weren't using the range in any access control decisions, so this
lets us garbage collect effectively unused code.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoSynchonize variable spelling with the MAC tree: we shortened some of
Robert Watson [Mon, 21 Oct 2002 17:05:48 +0000 (17:05 +0000)]
Synchonize variable spelling with the MAC tree: we shortened some of
the names.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoWhite space nit the crept in during merge.
Robert Watson [Mon, 21 Oct 2002 17:01:30 +0000 (17:01 +0000)]
White space nit the crept in during merge.

21 years agoSince the Biba and MLS access checks are identical to the open checks,
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoCleanup of relabel authorization checks -- almost identical logic,
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years ago- Abort all OCBs for timeout.
Hidetoshi Shimokawa [Mon, 21 Oct 2002 15:36:59 +0000 (15:36 +0000)]
- Abort all OCBs for timeout.
- Improve warning message.

21 years agoUse if_printf() instead of printf() to print diagnositic messages in the
Brooks Davis [Mon, 21 Oct 2002 14:38:28 +0000 (14:38 +0000)]
Use if_printf() instead of printf() to print diagnositic messages in the
form "rdp#: blah".

21 years agoUse if_printf(ifp, "blah") instead of
Brooks Davis [Mon, 21 Oct 2002 14:37:31 +0000 (14:37 +0000)]
Use if_printf(ifp, "blah") instead of
printf("%s%d: blah", ifp->if_name, ifp->if_unit).

21 years agoMake floppy-making part of release.9 conditional on *BOOTSIZE
Ruslan Ermilov [Mon, 21 Oct 2002 14:21:08 +0000 (14:21 +0000)]
Make floppy-making part of release.9 conditional on *BOOTSIZE
rather than on "pc98" (rev. 1.710) and "sparc64" (rev. 1.711).

21 years agoReplace in_pcbladdr() with a more generic inner subroutine for
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.

Discussed on: -net
Approved by: re

21 years agoAdd a bus_space_unmap() for the puc (and possibly other) drivers.
Andrew Gallatin [Mon, 21 Oct 2002 13:48:29 +0000 (13:48 +0000)]
Add a bus_space_unmap() for the puc (and possibly other) drivers.

21 years agoAdd some documentation of FreeBSD's special synchronization quirks
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.

Reviewed by: jhb, ru

21 years agoA better version of disabling SGR support in grotty(1).
Ruslan Ermilov [Mon, 21 Oct 2002 12:29:57 +0000 (12:29 +0000)]
A better version of disabling SGR support in grotty(1).

21 years agoFix LSRR option length check: it has to be less or equal remained header's
Maxim Konovalov [Mon, 21 Oct 2002 11:43:46 +0000 (11:43 +0000)]
Fix LSRR option length check: it has to be less or equal remained header's
length minus sizeof(struct ip).

MFC after: 1 week

21 years agoUpdate comment to note that the third floppy (for modules) has been
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.

21 years agoNote that support for the third 'drivers floppy' has been implemented.
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.

21 years agofix prototype of asyreqq().
Hidetoshi Shimokawa [Mon, 21 Oct 2002 10:21:49 +0000 (10:21 +0000)]
fix prototype of asyreqq().

21 years agoThese (userland) files shouldn't be here.
Hidetoshi Shimokawa [Mon, 21 Oct 2002 10:14:26 +0000 (10:14 +0000)]
These (userland) files shouldn't be here.

21 years agoRemove old build glue for removed games.
Mark Murray [Mon, 21 Oct 2002 10:05:14 +0000 (10:05 +0000)]
Remove old build glue for removed games.

21 years agoMove more games stuff to the attic.
Mark Murray [Mon, 21 Oct 2002 07:50:38 +0000 (07:50 +0000)]
Move more games stuff to the attic.

21 years agoGrammar nits.
Ruslan Ermilov [Mon, 21 Oct 2002 07:44:42 +0000 (07:44 +0000)]
Grammar nits.

Submitted by: Ken Stailey <kstailey@speakeasy.net>

21 years agoDeorbit complete. We dont build these anymore, so into the attic they go.
Mark Murray [Mon, 21 Oct 2002 07:40:27 +0000 (07:40 +0000)]
Deorbit complete. We dont build these anymore, so into the attic they go.

21 years agoTrack changed definition of the debug registers.
Poul-Henning Kamp [Mon, 21 Oct 2002 05:33:05 +0000 (05:33 +0000)]
Track changed definition of the debug registers.

Sorry for missing this the first time.

21 years agoAdd the USER_SR segment register to pcb state. Initialize correctly,
Peter Grehan [Mon, 21 Oct 2002 05:27:41 +0000 (05:27 +0000)]
Add the USER_SR segment register to pcb state. Initialize correctly,
and save/restore during a context switch.

The USER_SR could be overwritten when the current thread was switched
out with a faulting copyin/copyout.

Approved by: Benno

21 years agoI overlooked an absolute path.
Poul-Henning Kamp [Mon, 21 Oct 2002 05:25:02 +0000 (05:25 +0000)]
I overlooked an absolute path.

Submitted by: Henric Jungheim <henric@attbi.com>

21 years agoAll bpf.h/NBPF consumers are gone so stop generating bpf.h
Brooks Davis [Mon, 21 Oct 2002 05:09:04 +0000 (05:09 +0000)]
All bpf.h/NBPF consumers are gone so stop generating bpf.h

21 years agoDon't include the depricated "bpf.h" and always compile in bpf support
Brooks Davis [Mon, 21 Oct 2002 05:05:43 +0000 (05:05 +0000)]
Don't include the depricated "bpf.h" and always compile in bpf support
as per current practice.

21 years agoImplement working on ELF corefiles. Use kvm_read() when reading
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.

21 years agoAdd a twiddle to create PTY's with a biba/equal or mls/equal label
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoUnhook the per-policy parsing/printing MAC modules in libc to prepare
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agotrack gratuitous change to sys/i386/include/reg.h
Sam Leffler [Mon, 21 Oct 2002 03:47:22 +0000 (03:47 +0000)]
track gratuitous change to sys/i386/include/reg.h

21 years agoUse if_printf(ifp, "blah") instead of printf("ppp%d: blah", ifp->if_unit).
Brooks Davis [Mon, 21 Oct 2002 03:41:58 +0000 (03:41 +0000)]
Use if_printf(ifp, "blah") instead of printf("ppp%d: blah", ifp->if_unit).

21 years agoUse if_printf(ifp, "blah") instead of printf("vlan%d: blah", ifp->if_unit).
Brooks Davis [Mon, 21 Oct 2002 03:40:30 +0000 (03:40 +0000)]
Use if_printf(ifp, "blah") instead of printf("vlan%d: blah", ifp->if_unit).

21 years agoUse if_printf(ifp, "blah") instead of printf("sl%d: blah", sc->sc_if.if_unit).
Brooks Davis [Mon, 21 Oct 2002 03:35:25 +0000 (03:35 +0000)]
Use if_printf(ifp, "blah") instead of printf("sl%d: blah", sc->sc_if.if_unit).

21 years agoMake static in our normal manner.
David E. O'Brien [Mon, 21 Oct 2002 03:21:50 +0000 (03:21 +0000)]
Make static in our normal manner.

Submitted by: bde

21 years agoUse if_printf(ifp, "blah") and device_printf(dev, "blah") instead of
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.

21 years agoUse if_printf(ifp, "blah") instead of
Brooks Davis [Mon, 21 Oct 2002 02:51:56 +0000 (02:51 +0000)]
Use if_printf(ifp, "blah") instead of
printf("%s%d: blah", ifp->if_name, ifp->if_xname).

21 years agocrash(8) is a manual page, not a `section'.
Giorgos Keramidas [Mon, 21 Oct 2002 01:27:41 +0000 (01:27 +0000)]
crash(8) is a manual page, not a `section'.

21 years agoMinor typo fixes.
Giorgos Keramidas [Mon, 21 Oct 2002 01:24:10 +0000 (01:24 +0000)]
Minor typo fixes.

21 years agoUse .Ed to terminate .Bd display.
Giorgos Keramidas [Mon, 21 Oct 2002 01:13:46 +0000 (01:13 +0000)]
Use .Ed to terminate .Bd display.

21 years agoFixed some unsorting.
Bruce Evans [Mon, 21 Oct 2002 00:38:18 +0000 (00:38 +0000)]
Fixed some unsorting.

21 years agoUnbreak Alpha world.
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.

Submitted by: gallatin

21 years agoUse a warns setting we can catch regressions with.
David E. O'Brien [Sun, 20 Oct 2002 23:50:28 +0000 (23:50 +0000)]
Use a warns setting we can catch regressions with.

21 years agoIn cb_dumphdr() we were calling buf_write() with di->priv as the
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.

21 years agoFix the calculations of the length of the unread message buffer
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.

21 years agoUse more verbose diagnostics for wrong DIGIT range
Andrey A. Chernov [Sun, 20 Oct 2002 23:09:26 +0000 (23:09 +0000)]
Use more verbose diagnostics for wrong DIGIT range

21 years agoHook up opt_mac.h to the build dependencies. The way we currently
Robert Watson [Sun, 20 Oct 2002 22:59:17 +0000 (22:59 +0000)]
Hook up opt_mac.h to the build dependencies.  The way we currently
handle this stuff is dangerous. :-)

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoAdd opt_mac.h to dependencies for if_stf.c module.
Robert Watson [Sun, 20 Oct 2002 22:57:22 +0000 (22:57 +0000)]
Add opt_mac.h to dependencies for if_stf.c module.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoFix two instances of variant struct definitions in sys/netinet:
Poul-Henning Kamp [Sun, 20 Oct 2002 22:52:07 +0000 (22:52 +0000)]
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.

This is a functional no-op commit.

Approved by: re

21 years agoMissed a case of _POSIX_MAC_PRESENT -> _PC_MAC_PRESENT rename.
Robert Watson [Sun, 20 Oct 2002 22:50:43 +0000 (22:50 +0000)]
Missed a case of _POSIX_MAC_PRESENT -> _PC_MAC_PRESENT rename.

Pointed out by: phk

21 years agoDo not try to work around ``poor (un)sign extension code''
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.

21 years agoWhen dumping thread info, only include the filename and line if we actually
Juli Mallett [Sun, 20 Oct 2002 22:49:06 +0000 (22:49 +0000)]
When dumping thread info, only include the filename and line if we actually
know what file! (Prevents use of NULL).

MFC after: 1 day
Reviewed by: deischen

21 years agoAlways put the "access" macro argument in (), it might be an expression.
Poul-Henning Kamp [Sun, 20 Oct 2002 22:48:08 +0000 (22:48 +0000)]
Always put the "access" macro argument in (), it might be an expression.

This is a purely stylistic change.

21 years agoNo need to specify CTLTYPE_INT when we use SYSCTL_INT.
Poul-Henning Kamp [Sun, 20 Oct 2002 22:46:50 +0000 (22:46 +0000)]
No need to specify CTLTYPE_INT when we use SYSCTL_INT.

21 years agoWhen packets pass in and out of six-to-four (STF) tunnels, perform
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoWe have mem{cpy,cmp,set} functions in the kernel, don't #define them to
Poul-Henning Kamp [Sun, 20 Oct 2002 22:35:20 +0000 (22:35 +0000)]
We have mem{cpy,cmp,set} functions in the kernel, don't #define them to
b{copy,zero,cmp} functions anymore.

Spotted by: FlexeLint.

21 years agoWe have memset() and memcpy() in the kernel now, so we don't need to
Poul-Henning Kamp [Sun, 20 Oct 2002 22:33:42 +0000 (22:33 +0000)]
We have memset() and memcpy() in the kernel now, so we don't need to
#define them to bzero and bcopy.

Spotted by: FlexeLint

21 years agoWhen a packet is sent via a FDDI interface, perform appropriate MAC
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.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoWhen a packet is destined for delivery via an ATM medium, perform
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.

Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoAnother baby step toward getting sysinstall working:
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

21 years agoAdd devd to the build.
Warner Losh [Sun, 20 Oct 2002 22:16:52 +0000 (22:16 +0000)]
Add devd to the build.

21 years agodevd. A daemon that hooks into the kernel's /dev/devctl to produce
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.

Approved by: re

21 years agoRename _POSIX_FOO_PRESENT and friends from POSIX.1e to _PC_FOO_PRESENT
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.

Pointed out by: wollman

21 years agoImplement _POSIX_ACL_PATH_MAX, which returns the maximum number of ACL
Robert Watson [Sun, 20 Oct 2002 22:08:26 +0000 (22:08 +0000)]
Implement _POSIX_ACL_PATH_MAX, which returns the maximum number of ACL
entries for a file system node using pathconf().

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoWhen a packet is multicast encapsulated, give labeled policies the
Robert Watson [Sun, 20 Oct 2002 21:59:00 +0000 (21:59 +0000)]
When a packet is multicast encapsulated, give labeled policies the
opportunity to preserve the label.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoSet kernelname in sparc64_init() so that the kern.bootfile
Maxime Henrion [Sun, 20 Oct 2002 21:55:35 +0000 (21:55 +0000)]
Set kernelname in sparc64_init() so that the kern.bootfile
sysctl works.  This stuff should probably be made MI.

Reviewed by: jake

21 years agoDon't examine an un-initialized variable.
Poul-Henning Kamp [Sun, 20 Oct 2002 21:52:05 +0000 (21:52 +0000)]
Don't examine an un-initialized variable.

Spotted by: FlexeLint.

21 years agoTeach UFS to respond to pathconf() tests for _POSIX_ACL_EXTENDED and
Robert Watson [Sun, 20 Oct 2002 21:49:41 +0000 (21:49 +0000)]
Teach UFS to respond to pathconf() tests for _POSIX_ACL_EXTENDED and
_POSIX_MAC_PRESENT based on available mount flags, if the services are
available.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoCorrect mis-spelling in pathconf constant _POSIX_ACL_CAP_PRESENT to
Robert Watson [Sun, 20 Oct 2002 21:45:07 +0000 (21:45 +0000)]
Correct mis-spelling in pathconf constant _POSIX_ACL_CAP_PRESENT to
be the more correct _POSIX_CAP_PRESENT.