Mike Barcroft [Wed, 2 Oct 2002 04:13:32 +0000 (04:13 +0000)]
o Update a visibility conditional.
o Adjust some comments in keeping with the header's local style.
o Change some typedefs to use types that don't require namespace
pollution or deprecated types.
o Move some macros to the "does not belong in this header" section.
Robert Watson [Wed, 2 Oct 2002 02:42:38 +0000 (02:42 +0000)]
Add a new MAC entry point, mac_thread_userret(td), which permits policy
modules to perform MAC-related events when a thread returns to user
space. This is required for policies that have floating process labels,
as it's not always possible to acquire the process lock at arbitrary
points in the stack during system call processing; process labels might
represent traditional authentication data, process history information,
or other data.
LOMAC will use this entry point to perform the process label update
prior to the thread returning to userspace, when plugged into the MAC
framework.
Dima Dorfman [Wed, 2 Oct 2002 00:59:14 +0000 (00:59 +0000)]
In a diskless setup, rc.d/initdiskless may overwrite parts of /etc on
a per-machine or per-cluster (with different ways of expressing what's
part of a cluster) basis. In order for this to be effective, rc.conf
has to be reread after initdiskless is finished. Implement this by
adding a hook to etc/rc which rereads rc.conf by request. This can
also be implemented by renaming initdiskless to initdiskless.sh and
sourcing rc.conf there manually, but it was decided that, that would
be uglier than a hook in etc/rc.
Dima Dorfman [Wed, 2 Oct 2002 00:09:24 +0000 (00:09 +0000)]
Remove the "special processes" section. It has rotted, and the idea
ceased to be useful when the number of "special processes" went from 3
to one per device. I considered replacing it with a "kernel threads"
section, but this seemed like the wrong place for that.
Dima Dorfman [Tue, 1 Oct 2002 23:53:51 +0000 (23:53 +0000)]
Don't claim to return the fileid which we unloaded. The kernel
doesn't do this, and it wouldn't be very useful if it did, since the
caller supplies us with that number.
PR: 41329
Submitted by: Michael Galassi <nerd@xyz.com>
Mitsuru IWASAKI [Tue, 1 Oct 2002 19:31:09 +0000 (19:31 +0000)]
Don't call INT 12H anymore in boot program.
Many recent machine have a broken INT 12H (Get base memory size)
implementation and boot program stops if INT 12H is called.
This commit should solve the problem at very first step of FreeBSD
installation occurred on newer some machines.
John Baldwin [Tue, 1 Oct 2002 14:10:08 +0000 (14:10 +0000)]
- Adjust comment noting that handling of CPU limit exhaustion is done in
ast().
- Actually set KEF_ASTPENDING so ast() is called. I think this is buggy
for a process with multiple KSE's in that PS_XCPU is not a KSE event,
it's a process-wide event. IMO there really should probably be two
ASTPENDING flags, one for per-process, and one for per-KSE.
Bruce Evans [Tue, 1 Oct 2002 13:44:15 +0000 (13:44 +0000)]
Changed "file system" back to "filesystem" in the usage message. English
rules don't apply to tokens that are supposed to represent single args.
This was only fixed in the man page.
Fixed other differences between the man page and the usage message (1
formatting bug and 1 syntax bug).
Bruce Evans [Tue, 1 Oct 2002 13:28:24 +0000 (13:28 +0000)]
Removed the only PCI_DEBUG ifdef in the kernel. PCI_DEBUG was not a
supported option and it disabled a whole 2 lines of bootverbose messages.
I wanted to see 1 of the messages (about the latency timers). This
is a wrong place to decode pci configurations, but the code is already
here and handles more details than pciconf(8).
Tim J. Robbins [Tue, 1 Oct 2002 13:22:12 +0000 (13:22 +0000)]
Replace a home-grown printf() clone with a fwopen() wrapper around
libc's vfprintf() that writes to a `struct output' instead of a file.
Inspired by NetBSD's similar changes (they used asprintf() instead).
Bruce Evans [Tue, 1 Oct 2002 11:44:35 +0000 (11:44 +0000)]
Fixed a last-minute editing error in previous commit. nfs and/or cvs
replaced a 14-byte change in the middle of the file with 14 NULs at EOF
despite or because of aborting the initial commit to pick up the change.
Bruce Evans [Tue, 1 Oct 2002 11:34:42 +0000 (11:34 +0000)]
Merged all interesting difference between the old math.h and the current
one into the latter and removed the former.
This works around the bug that some broken Makefiles add -I.../src/include
to CFLAGS, resulting in the old math.h being preferred and differences
between the headers possibly being fatal.
The merge mainly involves declaring some functions as __pure2 although
they are not yet all strictly free of side effects.
Maxime Henrion [Tue, 1 Oct 2002 08:40:07 +0000 (08:40 +0000)]
Use the %t format modifier to print differences between
pointers. This fixes two format warnings on 64 bits
archs which are fatal now that WFORMAT=0 has been removed.
It doesn't fully fix the sh(1) build on 64 bits platforms
though, there is still some quad_t issues that need to be
fixed.
Tim J. Robbins [Tue, 1 Oct 2002 07:26:35 +0000 (07:26 +0000)]
Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2
on at least i386. If there are warnings on other archs, I'd rather hear
about them than pretend they didn't exist.
Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.
These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.
This commit adds a number of such #includes.
Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.
Jake Burkholder [Tue, 1 Oct 2002 06:34:21 +0000 (06:34 +0000)]
Get rid of the TODO macro in the few places that still need work; either
comment it out or change to explicit panics. It conflicts with things
like #if TODO in drivers.
Robert Watson [Tue, 1 Oct 2002 04:30:19 +0000 (04:30 +0000)]
Improve locking of pipe mutexes in the context of MAC:
(1) Where previously the pipe mutex was selectively grabbed during
pipe_ioctl(), now always grab it and then release if if not
needed. This protects the call to mac_check_pipe_ioctl() to
make sure the label remains consistent. (Note: it looks
like sigio locking may be incorrect for fgetown() since we
call it not-by-reference and sigio locking assumes call by
reference).
(2) In pipe_stat(), lock the pipe if MAC is compiled in so that
the call to mac_check_pipe_stat() gets a locked pipe to
protect label consistency. We still release the lock before
returning actual stat() data, risking inconsistency, but
apparently our pipe locking model accepts that risk.
(3) In various pipe MAC authorization checks, assert that the pipe
lock is held.
(4) Grab the lock when performing a pipe relabel operation, and
assert it a little deeper in the stack.
Juli Mallett [Tue, 1 Oct 2002 03:19:49 +0000 (03:19 +0000)]
Until I find a way to release arbitrary locks held when sending signals (there
really should not be some), use the M_NOWAIT flag to malloc(9), and panic(9)
if malloc(9) fails.
Juli Mallett [Tue, 1 Oct 2002 02:49:28 +0000 (02:49 +0000)]
When working with sigset_t's, and needing to perform masking operations based
on a process's pending signals, use the signal queue flattener,
ksiginfo_to_sigset_t, on the process, and on a local sigset_t, and then work
with that as needed.
Robert Watson [Tue, 1 Oct 2002 02:35:59 +0000 (02:35 +0000)]
Reserve system call numbers for the following system calls:
__mac_get_pid Retrieve MAC label of a process by pid
Similar to __mac_get_proc() except that the target process of
the operation is explicitly specified rather than assuming
curthread.
__mac_get_link Retrieve MAC label of a path with NOFOLLOW
__mac_set_link Set MAC label of a path with NOFOLLOW
extattr_set_link Set EAs on a path with NOFOLLOW
extattr_get_link Retrieve EAs on a path with NOFOLLOW
extattr_delete_link Delete EAs on a path with NOFOLLOW
These calls are similar to __mac_get_file(), __mac_set_file(),
extattr_set_file(), extattr_get_file(), and extattr_delete_file(),
except that they do not follow symlinks. The distinction between
these calls is similar to lchown() vs chown().
Tim J. Robbins [Tue, 1 Oct 2002 00:54:14 +0000 (00:54 +0000)]
Remove bits and pieces of support for atty, which was made obsolete by
adding history and vi/emacs-style line editing to the shell itself.
Atty was a user-mode terminal emulator (like screen and window) that did
line editing and history.
Brooks Davis [Tue, 1 Oct 2002 00:52:58 +0000 (00:52 +0000)]
Use if_printf(ifp, "blah") instead of printf("fe%d: blah", ifp->if_unit).
A number of functions in this driver still use the unit number in their
printouts because they pass the unit directly as a function argument
instead of passing a softc or struct ifnet pointer. This should be
resolved at a future date.