]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoupdate version numbers to (consistenly):
assar [Wed, 23 Oct 2002 06:12:21 +0000 (06:12 +0000)]
update version numbers to (consistenly):

krb4 1.0.5 fb1 (including the kadmind fix)
heimdal 0.5 fb1 (including the kadmind fix)

21 years agoThis commit was generated by cvs2svn to compensate for changes in r105765,
assar [Wed, 23 Oct 2002 06:10:08 +0000 (06:10 +0000)]
This commit was generated by cvs2svn to compensate for changes in r105765,
which included commits to RCS files with non-trunk default branches.

21 years agoimport 1.29 to fix buffer overflow:
assar [Wed, 23 Oct 2002 06:10:08 +0000 (06:10 +0000)]
import 1.29 to fix buffer overflow:

check the length of the authenticator and rlen

Obtained from: Heimdal CVS

21 years agoAdd two missing </para> I noticed during translation.
ue [Wed, 23 Oct 2002 06:02:16 +0000 (06:02 +0000)]
Add two missing </para> I noticed during translation.

21 years agoMissplaced FREE_LOCK causes a panic when hit while taking a snapshot.
mckusick [Wed, 23 Oct 2002 05:14:06 +0000 (05:14 +0000)]
Missplaced FREE_LOCK causes a panic when hit while taking a snapshot.

Sponsored by: DARPA & NAI Labs.

21 years agoHook raidctl up to the build.
scottl [Wed, 23 Oct 2002 04:50:34 +0000 (04:50 +0000)]
Hook raidctl up to the build.

Submitted by: tjr

21 years agoReplace this wcsncpy() implementation with one based on strncpy.c to fix
tjr [Wed, 23 Oct 2002 04:35:25 +0000 (04:35 +0000)]
Replace this wcsncpy() implementation with one based on strncpy.c to fix
two major bugs:
- off-by-one overflow when the length of the source string exceeds or
  equals the destination buffer size.
- old version was not padding the destination buffer with null wide chars

21 years agoTeach ifconfig(8) how to print and set the MAC labels on network
rwatson [Wed, 23 Oct 2002 03:40:47 +0000 (03:40 +0000)]
Teach ifconfig(8) how to print and set the MAC labels on network
interfaces using the 'mac' argument.  Without MAC support in the
kernel, this does not change the behavior of ifconfig.

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

21 years agoDon't complain if we have an inconsistent map that may be the
marcel [Wed, 23 Oct 2002 03:33:06 +0000 (03:33 +0000)]
Don't complain if we have an inconsistent map that may be the
result of an incomplete migration. An incomplete migration is
one where the MBR is not turned into a PMBR after creating the
GPT. This early in the game it's more convenient to allow the
inconsistency, because that avoids that we have to destroy the
MBR partitioning for now.

21 years agoAdd a new '-s' option to su(1): if the flag is present, attempt to
rwatson [Wed, 23 Oct 2002 03:19:34 +0000 (03:19 +0000)]
Add a new '-s' option to su(1): if the flag is present, attempt to
also set the user's MAC label as part of the user credential setup
by setting setusercontext(3)'s SETMAC flag.  By default, change only
traditional process properties.

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

21 years agoIf LOGIN_SETMAC is set and MAC is enabled in the kernel, then see
rwatson [Wed, 23 Oct 2002 03:17:22 +0000 (03:17 +0000)]
If LOGIN_SETMAC is set and MAC is enabled in the kernel, then see
if the user has a 'label' entry in their login class.  If so, attempt
to set that label on the process as part of the credential setup.  If
we're unable to parse the label, or unable to set the label, fail.
In the future, we may also want to warn if a label is set but the
kernel doesn't support MAC.

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

21 years agoIntroduce simple command line tools to manage MAC labels on processes and
rwatson [Wed, 23 Oct 2002 03:15:24 +0000 (03:15 +0000)]
Introduce simple command line tools to manage MAC labels on processes and
files.  Basically wrappers for mac_{get,set}_{file,link,pid,proc}(3).
Man pages to be updated shortly.

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

21 years agoHandle binaries with arbitrary number PT_LOAD sections, not only
kan [Wed, 23 Oct 2002 01:57:39 +0000 (01:57 +0000)]
Handle binaries with arbitrary number PT_LOAD sections, not only
ones with one text and one data section.

The text and data rlimit checks still needs to be fixed to properly
accout for additional sections.

Reviewed by: peter (slightly different patch version)

21 years agoDe-obfuscate and correct the include path handling for SysV style includes.
jmallett [Wed, 23 Oct 2002 01:57:33 +0000 (01:57 +0000)]
De-obfuscate and correct the include path handling for SysV style includes.

PR: 32759
Submitted by: Mark Valentine
Reviewed by: Matthew Emmerton" <matt@gsicomp.on.ca>
MFC after: 15 days

21 years agoAdd support for binaries with arbitrary number of PT_LOAD sections.
kan [Wed, 23 Oct 2002 01:43:29 +0000 (01:43 +0000)]
Add support for binaries with arbitrary number of PT_LOAD sections.

Reviewed by: peter

21 years agoMinor grammar fix: referenced to -> in reference to.
keramida [Tue, 22 Oct 2002 23:36:10 +0000 (23:36 +0000)]
Minor grammar fix: referenced to -> in reference to.

21 years agoAdd description of fetch-recursive target.
keramida [Tue, 22 Oct 2002 23:11:38 +0000 (23:11 +0000)]
Add description of fetch-recursive target.

21 years agoRefer to doc/en_US.ISO8859-1 for documentation.
keramida [Tue, 22 Oct 2002 23:06:29 +0000 (23:06 +0000)]
Refer to doc/en_US.ISO8859-1 for documentation.

21 years agoSplit an excessively long sentence.
keramida [Tue, 22 Oct 2002 22:52:24 +0000 (22:52 +0000)]
Split an excessively long sentence.

21 years agofixed a kernel crash by "ifconfig stf0 inet 1.2.3.4"
suz [Tue, 22 Oct 2002 22:50:38 +0000 (22:50 +0000)]
fixed a kernel crash by "ifconfig stf0 inet 1.2.3.4"
MFC after: 1 week

21 years agoImprove wording by removing repetitive use of 'default'.
keramida [Tue, 22 Oct 2002 22:43:24 +0000 (22:43 +0000)]
Improve wording by removing repetitive use of 'default'.

21 years agoThe ipfw module is only loaded if necessary.
keramida [Tue, 22 Oct 2002 22:39:18 +0000 (22:39 +0000)]
The ipfw module is only loaded if necessary.

21 years agos/then/than/ where appropriate.
keramida [Tue, 22 Oct 2002 22:36:56 +0000 (22:36 +0000)]
s/then/than/ where appropriate.

21 years agorulset -> ruleset
keramida [Tue, 22 Oct 2002 22:34:29 +0000 (22:34 +0000)]
rulset -> ruleset

21 years agoFill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUS
thomas [Tue, 22 Oct 2002 20:18:51 +0000 (20:18 +0000)]
Fill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUS
and XPT_RESET_DEV.

In order to properly handle reset requests whether they originate in the
ATA layer (atacontrol reinit) or from the CAM layer (camcontrol reset)
ata_reinit does not cause the SIM to be deallocated anymore. The SIM
is now unconditionnally created for each ATAPI bus.

This change may cause existing bus ids to change on some setups.

Reviewed by: roberto
Approved by: sos

21 years agoForgot to include <errno.h> when using 'errno' here.
jmallett [Tue, 22 Oct 2002 19:55:44 +0000 (19:55 +0000)]
Forgot to include <errno.h> when using 'errno' here.

21 years agoUse an error message closer to old dumpfs(8) in the case of truncated/no
jmallett [Tue, 22 Oct 2002 19:36:10 +0000 (19:36 +0000)]
Use an error message closer to old dumpfs(8) in the case of truncated/no
superblock.

Submitted by: kkenn

Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't
make much sense in a library, to me.

21 years agoWhen errno is not set, do not use warn(3).
jmallett [Tue, 22 Oct 2002 19:31:05 +0000 (19:31 +0000)]
When errno is not set, do not use warn(3).

21 years agoUse the libufs_printerror() function, which hopefully will deconfuse users
jmallett [Tue, 22 Oct 2002 19:27:09 +0000 (19:27 +0000)]
Use the libufs_printerror() function, which hopefully will deconfuse users
getting error cases in a libufsificated dumpfs(8).

Poked by: kkenn

21 years agoAdd the concept of a per-disk error string, and a function which prints it
jmallett [Tue, 22 Oct 2002 19:25:58 +0000 (19:25 +0000)]
Add the concept of a per-disk error string, and a function which prints it
along with the errno, if one is set.

21 years agoStyle fix: space between 'switch' and '('.
rwatson [Tue, 22 Oct 2002 19:01:49 +0000 (19:01 +0000)]
Style fix: space between 'switch' and '('.

21 years agoDon't dereference the 'x' pointer if it is NULL, instead skip the
jhb [Tue, 22 Oct 2002 18:44:59 +0000 (18:44 +0000)]
Don't dereference the 'x' pointer if it is NULL, instead skip the
assignment.  The netsmb code likes to call these functions with a NULL
x argument a lot.

Reported by: Vallo Kallaste <kalts@estpak.ee>

21 years agos/mls/biba/ in a copy+paste error for a printf.
rwatson [Tue, 22 Oct 2002 18:36:47 +0000 (18:36 +0000)]
s/mls/biba/ in a copy+paste error for a printf.

21 years ago- Expand struct trapframe to 256 bytes, make all fields fixed width and the
jake [Tue, 22 Oct 2002 18:03:15 +0000 (18:03 +0000)]
- Expand struct trapframe to 256 bytes, make all fields fixed width and the
  same size.  Add some fields that previously overlapped with something else
  or were missing.
- Make struct regs and struct mcontext (minus floating point) the same as
  struct trapframe so converting between them is easy (null).
- Add space for saving floating point state to struct mcontext.  This requires
  that it be 64 byte aligned.
- Add assertions that none of these structures change size, as they are part
  of the ABI.
- Remove some dead code in sendsig().
- Save and restore %gsr in struct trapframe.  Remember to restore %fsr.
- Add some comments to exception.S.

21 years ago- No need for pmtimer hint anymore.
jhb [Tue, 22 Oct 2002 17:32:51 +0000 (17:32 +0000)]
- No need for pmtimer hint anymore.
- npx doesn't need an 'at' hint anymore.

21 years agoNo need for pmtimer hint anymore.
jhb [Tue, 22 Oct 2002 17:32:27 +0000 (17:32 +0000)]
No need for pmtimer hint anymore.

21 years agoAdd an identify method that creates a pmtimer0 device if it doesn't alreedy
jhb [Tue, 22 Oct 2002 17:30:52 +0000 (17:30 +0000)]
Add an identify method that creates a pmtimer0 device if it doesn't alreedy
exist.  Hints are no longer needed to instantiate a pmtimer(4) device.

21 years agoRemove the mac_te policy bits from 'struct oldmac' -- we're not going
rwatson [Tue, 22 Oct 2002 17:19:06 +0000 (17:19 +0000)]
Remove the mac_te policy bits from 'struct oldmac' -- we're not going
to merge mac_te, since the SEBSD port of SELinux/FLASK provides a much
more mature Type Enforcement implementation.  This changes the size
of the on-disk 'struct oldmac' EA labels, which may require regeneration.

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

21 years agoremove unused __sys_sigaltstack() declaration
fjoe [Tue, 22 Oct 2002 17:13:32 +0000 (17:13 +0000)]
remove unused __sys_sigaltstack() declaration

Approved by: deischen

21 years agofix pthread_suspend/resume_all_np() declarations
fjoe [Tue, 22 Oct 2002 17:11:49 +0000 (17:11 +0000)]
fix pthread_suspend/resume_all_np() declarations

Approved by: deischen

21 years agoopt_mac.h is no longer required for any of these modules, remove from
rwatson [Tue, 22 Oct 2002 17:10:15 +0000 (17:10 +0000)]
opt_mac.h is no longer required for any of these modules, remove from
the dependencies.

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

21 years agoAdd Sun type 6 USB keyboard and mouse to supported device list.
bmah [Tue, 22 Oct 2002 17:09:23 +0000 (17:09 +0000)]
Add Sun type 6 USB keyboard and mouse to supported device list.

PR: 43974
Submitted by: Hendrik Scholz <hendrik@scholz.net>

21 years agoNew release notes: devctl, gbde(8), RAIDframe/raid(4), devd(8),
bmah [Tue, 22 Oct 2002 17:05:36 +0000 (17:05 +0000)]
New release notes:  devctl, gbde(8), RAIDframe/raid(4), devd(8),
removal of many (but not all) games.

21 years agoDon't enforce MAC Biba policy for socket visibility if Biba is not
rwatson [Tue, 22 Oct 2002 17:02:42 +0000 (17:02 +0000)]
Don't enforce MAC Biba policy for socket visibility if Biba is not
explicitly enabled.

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

21 years agoReserve a major number for NVIDIA.
mdodd [Tue, 22 Oct 2002 16:42:16 +0000 (16:42 +0000)]
Reserve a major number for NVIDIA.

21 years agoExplain to users that they may want to kldload aio.
alfred [Tue, 22 Oct 2002 16:12:27 +0000 (16:12 +0000)]
Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>

21 years agoChange the `mutex_prof' structure to use three variables contained
robert [Tue, 22 Oct 2002 16:06:28 +0000 (16:06 +0000)]
Change the `mutex_prof' structure to use three variables contained
in an anonymous structure as counters, instead of an array with
preprocessor-defined names for indices.  Remove the associated XXX-
comment.

21 years agoInvoke mac_check_vnode_mmap() during mmap operations on vnodes,
rwatson [Tue, 22 Oct 2002 15:56:44 +0000 (15:56 +0000)]
Invoke mac_check_vnode_mmap() during mmap operations on vnodes,
permitting policies to restrict access to memory mapping based on
the credential requesting the mapping, the target vnode, the
requested rights, or other policy considerations.

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

21 years agoIntroduce MAC_CHECK_VNODE_SWAPON, which permits MAC policies to
rwatson [Tue, 22 Oct 2002 15:53:43 +0000 (15:53 +0000)]
Introduce MAC_CHECK_VNODE_SWAPON, which permits MAC policies to
perform authorization checks during swapon() events; policies
might choose to enforce protections based on the credential
requesting the swap configuration, the target of the swap operation,
or other factors such as internal policy state.

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

21 years agoMissed in previous merge: export sizeof(struct oldmac) rather than
rwatson [Tue, 22 Oct 2002 15:33:33 +0000 (15:33 +0000)]
Missed in previous merge: export sizeof(struct oldmac) rather than
sizeof(struct mac).

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

21 years agoMFi386: revision 1.543.
nyan [Tue, 22 Oct 2002 15:25:25 +0000 (15:25 +0000)]
MFi386: revision 1.543.

21 years agoRemove more private MAKEDEV kludges.
phk [Tue, 22 Oct 2002 15:25:19 +0000 (15:25 +0000)]
Remove more private MAKEDEV kludges.

21 years agoList some of the Compact Flash readers known to work with this driver.
luigi [Tue, 22 Oct 2002 15:23:13 +0000 (15:23 +0000)]
List some of the Compact Flash readers known to work with this driver.

MFC after: 3 days

21 years agoMerged from sys/isa/syscons_isa.c revision 1.20.
nyan [Tue, 22 Oct 2002 15:22:49 +0000 (15:22 +0000)]
Merged from sys/isa/syscons_isa.c revision 1.20.

21 years agoNo longer needed.
phk [Tue, 22 Oct 2002 15:22:36 +0000 (15:22 +0000)]
No longer needed.

21 years agoMFi386: revisions 1.189 and 1.190.
nyan [Tue, 22 Oct 2002 15:19:46 +0000 (15:19 +0000)]
MFi386: revisions 1.189 and 1.190.

21 years agoRename the libc signal trampoline to __sigtramp to match netbsd. This
jake [Tue, 22 Oct 2002 15:15:39 +0000 (15:15 +0000)]
Rename the libc signal trampoline to __sigtramp to match netbsd.  This
should allow gdb to detect when we're executing in a signal trampoline.

21 years agoRemove the last traces of bogus MAKEDEV functionality.
phk [Tue, 22 Oct 2002 15:07:50 +0000 (15:07 +0000)]
Remove the last traces of bogus MAKEDEV functionality.

21 years agoGive a real error on failure to mount DEVFS.
phk [Tue, 22 Oct 2002 15:07:17 +0000 (15:07 +0000)]
Give a real error on failure to mount DEVFS.

21 years agoDon't use NO_MAKEDEV* option, its the default now.
phk [Tue, 22 Oct 2002 15:04:32 +0000 (15:04 +0000)]
Don't use NO_MAKEDEV* option, its the default now.

21 years agoFix example, we do not need NO_MAKEDEV_RUN any more.
phk [Tue, 22 Oct 2002 15:03:51 +0000 (15:03 +0000)]
Fix example, we do not need NO_MAKEDEV_RUN any more.

XXX: this example should be updated with a good example of devfs(8) rules.

21 years agoChange to match NO_MAKEDEV* -> MAKEDEV*.
phk [Tue, 22 Oct 2002 15:02:53 +0000 (15:02 +0000)]
Change to match NO_MAKEDEV* -> MAKEDEV*.

21 years agoInvert the logic of the NO_MAKEDEV options to match the 5.0-R default install.
phk [Tue, 22 Oct 2002 15:01:50 +0000 (15:01 +0000)]
Invert the logic of the NO_MAKEDEV options to match the 5.0-R default install.

21 years agoHook up a sample mac.conf to the install. The sample basically
rwatson [Tue, 22 Oct 2002 14:38:49 +0000 (14:38 +0000)]
Hook up a sample mac.conf to the install.  The sample basically
tells applications to print labels for all of the TrustedBSD-
generated policies, if they are present.

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

21 years agoReflect MAC kernel/user API changes into the libc MAC implementation.
rwatson [Tue, 22 Oct 2002 14:36:11 +0000 (14:36 +0000)]
Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

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

21 years agoMove the label initialized flag into _label.h: it's no longer
rwatson [Tue, 22 Oct 2002 14:32:54 +0000 (14:32 +0000)]
Move the label initialized flag into _label.h: it's no longer
exported to userspace.

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

21 years agoAdapt MAC policies for the new user API changes; teach policies how
rwatson [Tue, 22 Oct 2002 14:31:34 +0000 (14:31 +0000)]
Adapt MAC policies for the new user API changes; teach policies how
to parse their own label elements (some cleanup to occur here in the
future to use the newly added kernel strsep()).  Policies now
entirely encapsulate their notion of label in the policy module.

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

21 years ago- Check that a process isn't a new process (p_state == PRS_NEW) before
jhb [Tue, 22 Oct 2002 14:31:32 +0000 (14:31 +0000)]
- Check that a process isn't a new process (p_state == PRS_NEW) before
  trying to acquire it's proc lock since the proc lock may not have been
  constructed yet.
- Split up the one big comment at the top of the loop and put the pieces
  in the right order above the various checks.

Reported by: kris (1)

21 years agoSupport the new MAC user API in kernel: modify existing system calls
rwatson [Tue, 22 Oct 2002 14:29:47 +0000 (14:29 +0000)]
Support the new MAC user API in kernel: modify existing system calls
to use a modified notion of 'struct mac', and flesh out the new variation
system calls (almost identical to existing ones except that they permit
a pid to be specified for process label retrieval, and don't follow
symlinks).  This generalizes the label API so that the framework is
now almost entirely policy-agnostic.

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

21 years agoRevised APIs for user process label management; the existing APIs relied
rwatson [Tue, 22 Oct 2002 14:27:44 +0000 (14:27 +0000)]
Revised APIs for user process label management; the existing APIs relied
on all label parsing occuring in userland, and knowledge of the loaded
policies in the user libraries.  This revision of the API pushes that
parsing into the kernel, avoiding the need for shared library support
of policies in userland, permitting statically linked binaries (such
as ls, ps, and ifconfig) to use MAC labels.  In these API revisions,
high level parsing of the MAC label is done in the MAC Framework,
and interpretation of label elements is delegated to the MAC policy
modules.  This permits modules to export zero or more label elements
to user space if desired, and support them in the manner they want
and with the semantics they want.  This is believed to be the final
revision of this interface: from the perspective of user applications,
the API has actually not changed, although the ABI has.

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

21 years agoRegen.
rwatson [Tue, 22 Oct 2002 14:23:52 +0000 (14:23 +0000)]
Regen.

21 years agoFlesh out prototypes for __mac_get_pid, __mac_get_link, and
rwatson [Tue, 22 Oct 2002 14:22:24 +0000 (14:22 +0000)]
Flesh out prototypes for __mac_get_pid, __mac_get_link, and
__mac_set_link, based on __mac_get_proc() except with a pid,
and __mac_get_file(), __mac_set_file() except that they do
not follow symlinks.  First in a series of commits to flesh
out the user API.

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

21 years agoNote that id_t can also hold a gid_t. Realign comments.
mike [Tue, 22 Oct 2002 13:26:35 +0000 (13:26 +0000)]
Note that id_t can also hold a gid_t.  Realign comments.

21 years agoFix typo in comments (misspelled "necessary").
sheldonh [Tue, 22 Oct 2002 12:10:27 +0000 (12:10 +0000)]
Fix typo in comments (misspelled "necessary").

21 years agoLive with it: I had hoped to find a neat way to deal with all the magic
phk [Tue, 22 Oct 2002 11:55:27 +0000 (11:55 +0000)]
Live with it:  I had hoped to find a neat way to deal with all the magic
numbers, but so far havn't come up with anything:  Add an #ifdef PC98.

21 years agoTypo: loose -> lose.
keramida [Tue, 22 Oct 2002 11:46:06 +0000 (11:46 +0000)]
Typo: loose -> lose.

Submitted by: trevor

21 years agoChunk functions in libdisk take an extra arguement for all archs to accomodate
phk [Tue, 22 Oct 2002 10:52:53 +0000 (10:52 +0000)]
Chunk functions in libdisk take an extra arguement for all archs to accomodate
PC98 with less ifdef madness.

21 years agoAvoid a lot of #ifdef PC98 code by giving a couple of the Chunk functions
phk [Tue, 22 Oct 2002 10:51:58 +0000 (10:51 +0000)]
Avoid a lot of #ifdef PC98 code by giving a couple of the Chunk functions
an extra argument for all archs.

21 years agoUpdate for BSD.include.dist r1.60 (addition of include/dev/ofw).
tmm [Tue, 22 Oct 2002 10:37:07 +0000 (10:37 +0000)]
Update for BSD.include.dist r1.60 (addition of include/dev/ofw).

Forgotten by: tmm
Prodded by: ru

21 years agoAdd back the typedefs for in_addr_t and in_port_t; some broken autoconf
tjr [Tue, 22 Oct 2002 09:57:34 +0000 (09:57 +0000)]
Add back the typedefs for in_addr_t and in_port_t; some broken autoconf
scripts expect <sys/types.h> to define them.

21 years agoPick up a prototyp from libdisk.h instead of having our own.
phk [Tue, 22 Oct 2002 09:13:27 +0000 (09:13 +0000)]
Pick up a prototyp from libdisk.h instead of having our own.

21 years agoSwing the weed-whacker around libdisk:
phk [Tue, 22 Oct 2002 09:13:02 +0000 (09:13 +0000)]
Swing the weed-whacker around libdisk:

Constify some things.
Staticize some things.
Remove some unused things.
Prototype some things.
Don't install a gazillion man-pages links.
Drop support for ON-TRACK disk-manager.

21 years ago_games is gone in rev. 1.305.
ru [Tue, 22 Oct 2002 08:30:31 +0000 (08:30 +0000)]
_games is gone in rev. 1.305.

21 years agoStart tick at the correct time (cpu_init_clocks), instead of cpu_startup.
jake [Tue, 22 Oct 2002 07:10:15 +0000 (07:10 +0000)]
Start tick at the correct time (cpu_init_clocks), instead of cpu_startup.

21 years agoAdd some magic bits necessary to turn the transmitter on for some
silby [Tue, 22 Oct 2002 02:33:50 +0000 (02:33 +0000)]
Add some magic bits necessary to turn the transmitter on for some
(newer) 556B chips.

Requested & tested by: Dinesh Nambisan <dinesh@nambisan.net>
Magic bits found by: Dave Dribin & Donald Becker

MFC After: 3 days

21 years agodetect idle kse correctly.
davidxu [Tue, 22 Oct 2002 02:27:19 +0000 (02:27 +0000)]
detect idle kse correctly.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r105672,
assar [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 [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.
rwatson [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
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
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
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
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)
semenu [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
rwatson [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.
rwatson [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 [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.
phk [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.
phk [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.
mp [Mon, 21 Oct 2002 21:36:36 +0000 (21:36 +0000)]
Add support for sparc64 kernel debugging.

Submitted by: tmm