]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoActually use the exitstatus value that we maintain.
Dima Dorfman [Tue, 1 Oct 2002 22:59:11 +0000 (22:59 +0000)]
Actually use the exitstatus value that we maintain.

PR: 43562
Submitted by: Marc Olzheim <marcolz@ilse.nl>

21 years agoFix a typo in BGE_BIGENDIAN_INIT.
Jake Burkholder [Tue, 1 Oct 2002 22:33:40 +0000 (22:33 +0000)]
Fix a typo in BGE_BIGENDIAN_INIT.

21 years agoFix two misindents.
Poul-Henning Kamp [Tue, 1 Oct 2002 22:27:03 +0000 (22:27 +0000)]
Fix two misindents.

Spotted by: FlexeLint

21 years agoAdd a field to struct cmn_unit to hold a pointer to the driver's softc.
Matthew N. Dodd [Tue, 1 Oct 2002 22:04:31 +0000 (22:04 +0000)]
Add a field to struct cmn_unit to hold a pointer to the driver's softc.

21 years agomake rstat(3) return an 'enum clnt_stat' rather than an 'int' to match
Alfred Perlstein [Tue, 1 Oct 2002 22:02:06 +0000 (22:02 +0000)]
make rstat(3) return an 'enum clnt_stat' rather than an 'int' to match
the prototype from rstat.x -> rstat.h.

MFC After: 1 day

21 years agoIndentation indicates missing braces.
Poul-Henning Kamp [Tue, 1 Oct 2002 21:59:46 +0000 (21:59 +0000)]
Indentation indicates missing braces.

Spotted by: FlexeLint

21 years agoFix the same misinitialization of pmap_prefault_pageorder as on i386.
Poul-Henning Kamp [Tue, 1 Oct 2002 20:56:29 +0000 (20:56 +0000)]
Fix the same misinitialization of pmap_prefault_pageorder as on i386.

Suggeste by: jake

21 years agoThe pmap_prefault_pageorder[] array was initialize with wrong values
Poul-Henning Kamp [Tue, 1 Oct 2002 20:51:47 +0000 (20:51 +0000)]
The pmap_prefault_pageorder[] array was initialize with wrong values
due to a missing comma.

I have no idea what trouble, if any, this may have caused.

Pointed out by: FlexeLint

21 years agoReturn the ``u''
Tom Rhodes [Tue, 1 Oct 2002 20:32:59 +0000 (20:32 +0000)]
Return the ``u''

21 years agoWhitespace nit.
John Baldwin [Tue, 1 Oct 2002 20:05:58 +0000 (20:05 +0000)]
Whitespace nit.

21 years agoUse the canonical root:operator 0640 for GEOM disk devices.
Poul-Henning Kamp [Tue, 1 Oct 2002 19:33:09 +0000 (19:33 +0000)]
Use the canonical root:operator 0640 for GEOM disk devices.

Spotted by: brooks
Sponsored by: DARPA & NAI Labs.

21 years agoDon't call INT 12H anymore in boot program.
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.

Reviewed by: bde, jhb
MFC after: 1 week

21 years agoDivorce bsd disklabels, IBM PC MBR's and whatever the things are
Poul-Henning Kamp [Tue, 1 Oct 2002 19:29:19 +0000 (19:29 +0000)]
Divorce bsd disklabels, IBM PC MBR's and whatever the things are
called on NEC PC98 machines.

Sponsored by: DARPA & NAI Labs.

21 years agoMoved the cam and cd9660 modules to the MI list. Don't build msdosfs or
Jake Burkholder [Tue, 1 Oct 2002 19:05:18 +0000 (19:05 +0000)]
Moved the cam and cd9660 modules to the MI list.  Don't build msdosfs or
syscons on sparc64; msdosfs will likely never work, syscons needs work.

21 years agoDon't restrict device drivers ability to sleep in the ioctl method, this
Poul-Henning Kamp [Tue, 1 Oct 2002 18:42:32 +0000 (18:42 +0000)]
Don't restrict device drivers ability to sleep in the ioctl method, this
is actually entirely legal.

Do bio's with ioctls in them in a g_call_me() function.

Sponsored by: DARPA & NAI Labs

21 years agoAdd prototypes for rstat(3) and havedisk(3).
Alfred Perlstein [Tue, 1 Oct 2002 17:59:53 +0000 (17:59 +0000)]
Add prototypes for rstat(3) and havedisk(3).

Requested by: kris, Emil Mikulic <emikulic@optushome.com.au>
MFC After: 1 day

21 years agoFix spelling error; say what "UTS" stands for.
Archie Cobbs [Tue, 1 Oct 2002 17:50:44 +0000 (17:50 +0000)]
Fix spelling error; say what "UTS" stands for.

Noticed by: ru

21 years agoFix cut&paste error: "tm_spare" should have been "km_spare".
Archie Cobbs [Tue, 1 Oct 2002 17:47:44 +0000 (17:47 +0000)]
Fix cut&paste error: "tm_spare" should have been "km_spare".

Noticed by: ru

21 years agoRemove a comma trailing an if clause.
Poul-Henning Kamp [Tue, 1 Oct 2002 17:31:28 +0000 (17:31 +0000)]
Remove a comma trailing an if clause.

According to Kirk: "Luckily, the statement is usually true".

Spotted by: FlexeLint

21 years agoRessurect libkvm use of the bitmasked signal list in the kernel, now that
Juli Mallett [Tue, 1 Oct 2002 17:17:32 +0000 (17:17 +0000)]
Ressurect libkvm use of the bitmasked signal list in the kernel, now that
reliable signal queues are gone.

21 years agoBack our kernel support for reliable signal queues.
Juli Mallett [Tue, 1 Oct 2002 17:15:53 +0000 (17:15 +0000)]
Back our kernel support for reliable signal queues.

Requested by: rwatson, phk, and many others

21 years agoConvert the bus space accessors from macros to inlines. This fixes some
Jake Burkholder [Tue, 1 Oct 2002 16:32:09 +0000 (16:32 +0000)]
Convert the bus space accessors from macros to inlines.  This fixes some
problems with drivers that expect functions rather than function like
macros.

Reviewed by: tmm

21 years agoMinor style nits in a comment.
John Baldwin [Tue, 1 Oct 2002 15:49:32 +0000 (15:49 +0000)]
Minor style nits in a comment.

21 years agoFix some harmless mis-indents.
Poul-Henning Kamp [Tue, 1 Oct 2002 15:48:31 +0000 (15:48 +0000)]
Fix some harmless mis-indents.

Spotted by: FlexeLint

21 years agoAdd quirks for DaisyTechnology PhotoClip camera.
Maxim Sobolev [Tue, 1 Oct 2002 15:42:04 +0000 (15:42 +0000)]
Add quirks for DaisyTechnology PhotoClip camera.

Submitted by: Olexander Kunitsa <kunia@istc.kiev.ua>
MFC after: 3 days

21 years agoRemember to include "opt_devfs.h" so we get any relevant changes
Poul-Henning Kamp [Tue, 1 Oct 2002 15:24:35 +0000 (15:24 +0000)]
Remember to include "opt_devfs.h" so we get any relevant changes
to NDEVFSINO before we include devfs.h.

Spotted by: FlexeLint

21 years agoMisc cleanups.
Søren Schmidt [Tue, 1 Oct 2002 15:21:57 +0000 (15:21 +0000)]
Misc cleanups.

Pointed out by: phk/flexelint

21 years agoAdd yet another Promise PCI id.
Søren Schmidt [Tue, 1 Oct 2002 15:21:09 +0000 (15:21 +0000)]
Add yet another Promise PCI id.

21 years agoVarious style fixups.
John Baldwin [Tue, 1 Oct 2002 14:16:50 +0000 (14:16 +0000)]
Various style fixups.

Submitted by: bde (mostly)

21 years agoActually clear PS_XCPU in ast() when we handle it.
John Baldwin [Tue, 1 Oct 2002 14:13:13 +0000 (14:13 +0000)]
Actually clear PS_XCPU in ast() when we handle it.

Submitted by: bde
Pointy hat to: jhb

21 years ago- Adjust comment noting that handling of CPU limit exhaustion is done in
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.

Submitted by: bde

21 years agoIt is too much work convincing lint why we would want empty structures,
Poul-Henning Kamp [Tue, 1 Oct 2002 14:08:08 +0000 (14:08 +0000)]
It is too much work convincing lint why we would want empty structures,
so make the non-empty #ifdef lint.

21 years agoUse long long to indicate 64bitness in #ifdef lint.
Poul-Henning Kamp [Tue, 1 Oct 2002 14:07:18 +0000 (14:07 +0000)]
Use long long to indicate 64bitness in #ifdef lint.

21 years agoInclude <sys/diskmbr.h> instead of <sys/disklabel.h>
Poul-Henning Kamp [Tue, 1 Oct 2002 14:05:06 +0000 (14:05 +0000)]
Include <sys/diskmbr.h> instead of <sys/disklabel.h>

Sponsored by: DARPA & NAI Labs.

21 years agoA more lint friendly #ifdef lint section.
Poul-Henning Kamp [Tue, 1 Oct 2002 14:01:58 +0000 (14:01 +0000)]
A more lint friendly #ifdef lint section.

21 years agoChanged "file system" back to "filesystem" in the usage message. English
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).

21 years agoBack out experimental changes to fmtstr() that I didn't mean to include
Tim J. Robbins [Tue, 1 Oct 2002 13:41:13 +0000 (13:41 +0000)]
Back out experimental changes to fmtstr() that I didn't mean to include
in the previous commit.

21 years agotest -h is deprecated; use -L instead.
Ruslan Ermilov [Tue, 1 Oct 2002 13:29:45 +0000 (13:29 +0000)]
test -h is deprecated; use -L instead.

PR:             bin/40846

21 years agoRemoved the only PCI_DEBUG ifdef in the kernel. PCI_DEBUG was not a
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).

21 years agoReplace a home-grown printf() clone with a fwopen() wrapper around
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).

21 years agoDon't #error if we are lint.
Poul-Henning Kamp [Tue, 1 Oct 2002 13:15:11 +0000 (13:15 +0000)]
Don't #error if we are lint.

21 years agoIt is now safe to remove WARNS=0 and WFORMAT=0.
Maxime Henrion [Tue, 1 Oct 2002 12:12:45 +0000 (12:12 +0000)]
It is now safe to remove WARNS=0 and WFORMAT=0.

Tested on: alpha, i386, sparc64

21 years agoRestore "not found" error message when searching for (or executing)
Tim J. Robbins [Tue, 1 Oct 2002 11:48:18 +0000 (11:48 +0000)]
Restore "not found" error message when searching for (or executing)
a program fails because the file or a path component does not exist.

Suggested by: bde

21 years ago- Don't use quad_t when we really mean rlim_t.
Maxime Henrion [Tue, 1 Oct 2002 11:44:38 +0000 (11:44 +0000)]
- Don't use quad_t when we really mean rlim_t.
- Cast rlim_t to intmax_t when printing it.

This should fix the last format errors in sh(1).

Tested on: i386, sparc64

21 years agoFixed a last-minute editing error in previous commit. nfs and/or cvs
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.

21 years agoMerged all interesting difference between the old math.h and the current
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.

PR: 43544

21 years agoThe bus number is unsigned, it cannot be less than zero.
Poul-Henning Kamp [Tue, 1 Oct 2002 10:18:22 +0000 (10:18 +0000)]
The bus number is unsigned, it cannot be less than zero.

Found by: FlexeLint

21 years agoMove the vop-vector declaration into devfs_vnops.c where it belongs.
Poul-Henning Kamp [Tue, 1 Oct 2002 10:08:08 +0000 (10:08 +0000)]
Move the vop-vector declaration into devfs_vnops.c where it belongs.

21 years agoAdd pc98 to universe target.
Poul-Henning Kamp [Tue, 1 Oct 2002 09:58:50 +0000 (09:58 +0000)]
Add pc98 to universe target.
Remember about /usr/obj and look for conf/NOTES in the right place.

21 years agoAdd back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format string
Tim J. Robbins [Tue, 1 Oct 2002 08:55:28 +0000 (08:55 +0000)]
Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format string
errors with %qd formats.

21 years agoUse the %t format modifier to print differences between
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.

Tested on: i386, sparc64

21 years agoRemove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2
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.

21 years agoSplit MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Poul-Henning Kamp [Tue, 1 Oct 2002 07:24:55 +0000 (07:24 +0000)]
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.

Sponsored by:   DARPA & NAI Labs.

21 years agoGet rid of the TODO macro in the few places that still need work; either
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.

21 years agoneed exca too
Warner Losh [Tue, 1 Oct 2002 06:10:11 +0000 (06:10 +0000)]
need exca too

21 years agoImprove locking of pipe mutexes in the context of MAC:
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.

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

21 years agoPush 'security.mac.debug_label_fallback' behind options MAC_DEBUG.
Robert Watson [Tue, 1 Oct 2002 03:24:20 +0000 (03:24 +0000)]
Push 'security.mac.debug_label_fallback' behind options MAC_DEBUG.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs

21 years agoUntil I find a way to release arbitrary locks held when sending signals (there
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.

21 years agoAdd a missing include.
Juli Mallett [Tue, 1 Oct 2002 02:58:38 +0000 (02:58 +0000)]
Add a missing include.

21 years agoAdd needed include of queue.h.
Jake Burkholder [Tue, 1 Oct 2002 02:50:26 +0000 (02:50 +0000)]
Add needed include of queue.h.

21 years agoWhen working with sigset_t's, and needing to perform masking operations based
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.

21 years agoRegen.
Robert Watson [Tue, 1 Oct 2002 02:37:35 +0000 (02:37 +0000)]
Regen.

21 years agoReserve system call numbers for the following system calls:
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().

Implementations to follow.

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

21 years agoRemove some kind of profiling support that required the 4.2BSD monitor()
Tim J. Robbins [Tue, 1 Oct 2002 01:30:33 +0000 (01:30 +0000)]
Remove some kind of profiling support that required the 4.2BSD monitor()
function in libc.

21 years agoUse if_printf(ifp, "foo") instead of printf("xe%d: foo", ifp->it_unit).
Brooks Davis [Tue, 1 Oct 2002 01:03:02 +0000 (01:03 +0000)]
Use if_printf(ifp, "foo") instead of printf("xe%d: foo", ifp->it_unit).

21 years agoUse if_printf(ifp, "blah") instead of printf("vx%d: blah", ifp->if_unit).
Brooks Davis [Tue, 1 Oct 2002 00:59:40 +0000 (00:59 +0000)]
Use if_printf(ifp, "blah") instead of printf("vx%d: blah", ifp->if_unit).

21 years agoUse if_printf(ifp, "blah") instead of printf("sr%d: blah", ifp->if_unit).
Brooks Davis [Tue, 1 Oct 2002 00:58:16 +0000 (00:58 +0000)]
Use if_printf(ifp, "blah") instead of printf("sr%d: blah", ifp->if_unit).

21 years agoUse if_printf(ifp, "blah") instead of printf("sn%d: blah", ifp->if_unit).
Brooks Davis [Tue, 1 Oct 2002 00:56:39 +0000 (00:56 +0000)]
Use if_printf(ifp, "blah") instead of printf("sn%d: blah", ifp->if_unit).

21 years agoUse if_printf() instead of printf() to print "sbni#: blah".
Brooks Davis [Tue, 1 Oct 2002 00:55:22 +0000 (00:55 +0000)]
Use if_printf() instead of printf() to print "sbni#: blah".

21 years agoRemove bits and pieces of support for atty, which was made obsolete by
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.

21 years agoUse if_printf(ifp, "blah") instead of printf("fe%d: blah", ifp->if_unit).
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.

21 years agoUse if_printf() instead of printf() to print "ed#: blah".
Brooks Davis [Tue, 1 Oct 2002 00:49:28 +0000 (00:49 +0000)]
Use if_printf() instead of printf() to print "ed#: blah".

21 years agoUse if_printf(ifp, "blah") instead of
Brooks Davis [Tue, 1 Oct 2002 00:46:41 +0000 (00:46 +0000)]
Use if_printf(ifp, "blah") instead of
printf(CS_NAME"%d: blah", ifp->if_unit);

21 years agoUse if_printf(ifp, "blah") instead of
Brooks Davis [Tue, 1 Oct 2002 00:44:31 +0000 (00:44 +0000)]
Use if_printf(ifp, "blah") instead of
printf("%s%d: blah", ifp->if_name, ifp->if_unit);

21 years agoIncrement version number for the addition of getopt_long(3) to libc.
Eric Melville [Tue, 1 Oct 2002 00:44:11 +0000 (00:44 +0000)]
Increment version number for the addition of getopt_long(3) to libc.

21 years agoUse if_printf(ifp, "blah") instead of printf("ar%d: blah", ifp->if_unit).
Brooks Davis [Tue, 1 Oct 2002 00:42:51 +0000 (00:42 +0000)]
Use if_printf(ifp, "blah") instead of printf("ar%d: blah", ifp->if_unit).

21 years agoFix typo, should zero the kinfo_proc's siglist, not the real one's - the real
Juli Mallett [Tue, 1 Oct 2002 00:28:14 +0000 (00:28 +0000)]
Fix typo, should zero the kinfo_proc's siglist, not the real one's - the real
one doesn't have one.

Submitted by: jake, scottl
Big pointed hat that lands one in the badcommitters box to: jmallett

21 years agoUse M_NOWAIT instead of M_WAITOK when allocating dmamaps; the allocations
Jake Burkholder [Tue, 1 Oct 2002 00:17:39 +0000 (00:17 +0000)]
Use M_NOWAIT instead of M_WAITOK when allocating dmamaps; the allocations
functions may be called from a device strategy routine when sleeping is
bad.

Submitted by: phk
Reviewed by: tmm

21 years agoBack out code changes that snuck into the previous forced commit.
Juli Mallett [Tue, 1 Oct 2002 00:16:17 +0000 (00:16 +0000)]
Back out code changes that snuck into the previous forced commit.

21 years ago(Forced commit, to clarify previous commit of ksiginfo/signal queue code.)
Juli Mallett [Tue, 1 Oct 2002 00:07:28 +0000 (00:07 +0000)]
(Forced commit, to clarify previous commit of ksiginfo/signal queue code.)

I've added a structure, kernel-private, to represent a pending or in-delivery
signal, called `ksiginfo'.  It is roughly analogous to the basic information
that is exported by the POSIX interface 'siginfo_t', but more basic.  I've
added functions to allocate these structures, and further to wrap all signal
operations using them.

Once the operations are wrapped, I've added a TailQ (see queue(3)) of these
structures to 'struct proc', and all pending signals are in that TailQ.  When
a signal is being delivered, it is dequeued from the list.  Once I finish
the spreading of ksiginfo throughout the tree, the dequeued structure will be
delivered to the process in question, whereas currently and normally, the
signal number is what is used.

21 years agoThe list of queued signals is not, can not, and will not be exported to the
Juli Mallett [Mon, 30 Sep 2002 21:40:33 +0000 (21:40 +0000)]
The list of queued signals is not, can not, and will not be exported to the
userland.  If someone wants to implement a backup p_siglist in the kernel
for compatability and to export one could.  For now, just tell KVM to hand
an empty signal set off to the userland.

21 years agoLock access to the signal queue, and related structures, with PROC_LOCK.
Juli Mallett [Mon, 30 Sep 2002 21:15:33 +0000 (21:15 +0000)]
Lock access to the signal queue, and related structures, with PROC_LOCK.

Submitted by: jhb

21 years ago- Add a new per-process flag PS_XCPU to indicate that at least one thread
John Baldwin [Mon, 30 Sep 2002 21:13:54 +0000 (21:13 +0000)]
- Add a new per-process flag PS_XCPU to indicate that at least one thread
  has exceeded its CPU time limit.
- In mi_switch(), set PS_XCPU when the CPU time limit is exceeded.
- Perform actual CPU time limit exceeded work in ast() when PS_XCPU is set.

Requested by: many

21 years agoChange p_cpulimit to be in seconds instead of microseconds. Since
John Baldwin [Mon, 30 Sep 2002 21:08:38 +0000 (21:08 +0000)]
Change p_cpulimit to be in seconds instead of microseconds.  Since
p_runtime now is a bintime, it is no longer an optimization to store
p_cpulimit as microseconds.

Suggested by: phk

21 years agoMove vnode MAC label initialization to after the release of the vnode
Robert Watson [Mon, 30 Sep 2002 20:51:48 +0000 (20:51 +0000)]
Move vnode MAC label initialization to after the release of the vnode
interlock in getnewvnode() to avoid possible sleeps while holding
the mutex.  Note that the warning from Witness is a slight false
positive since we know there will be no contention on the interlock
since we haven't made the vnode available for use yet, but the theory
is not a bad one.

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

21 years agoAdd tunables for the existing sysctl twiddles for pipe and vm
Robert Watson [Mon, 30 Sep 2002 20:50:00 +0000 (20:50 +0000)]
Add tunables for the existing sysctl twiddles for pipe and vm
enforcement so they can be disabled prior to kernel start.

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

21 years agoConvert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>
Juli Mallett [Mon, 30 Sep 2002 20:48:29 +0000 (20:48 +0000)]
Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>
prototyped functions to get a sigset_t, and further to check for any
queued signals, rather than an empty signal set, to go with the move
to signal queues rather than signal sets.

21 years agoUse as's --defsym switch to compensate for the loss of the M4 substitution
Peter Wemm [Mon, 30 Sep 2002 20:37:58 +0000 (20:37 +0000)]
Use as's --defsym switch to compensate for the loss of the M4 substitution
of SIOPRT which broke kgzldr and therefore make release.

Pointed out by:  murray

21 years agoFirst half of implementation of ksiginfo, signal queues, and such. This
Juli Mallett [Mon, 30 Sep 2002 20:20:22 +0000 (20:20 +0000)]
First half of implementation of ksiginfo, signal queues, and such.  This
gets signals operating based on a TailQ, and is good enough to run X11,
GNOME, and do job control.  There are some intricate parts which could be
more refined to match the sigset_t versions, but those require further
evaluation of directions in which our signal system can expand and contract
to fit our needs.

After this has been in the tree for a while, I will make in kernel API
changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo
more robustly, such that we can actually pass information with our
(queued) signals to the userland.  That will also result in using a
struct ksiginfo pointer, rather than a signal number, in a lot of
kern_sig.c, to refer to an individual pending signal queue member, but
right now there is no defined behaviour for such.

CODAFS is unfinished in this regard because the logic is unclear in
some places.

Sponsored by: New Gold Technology
Reviewed by: bde, tjr, jake [an older version, logic similar]

21 years agoRemove a left over '&' from the conversion to using our
Justin T. Gibbs [Mon, 30 Sep 2002 19:55:42 +0000 (19:55 +0000)]
Remove a left over '&' from the conversion to using our
softc referenced seeprom store.

MFC after: 1 day

21 years agoPlug memory leaks.
Poul-Henning Kamp [Mon, 30 Sep 2002 19:19:47 +0000 (19:19 +0000)]
Plug memory leaks.

Detected by: FlexeLint
Approved by: jhb

21 years agoGremlins ate my comment!
Josef Karthauser [Mon, 30 Sep 2002 19:12:43 +0000 (19:12 +0000)]
Gremlins ate my comment!

Submitted by: Clive Lin <clive@tongi.org>

21 years agoNote MFCs of lock(1) -v and vidcontrol(1) -S.
Dima Dorfman [Mon, 30 Sep 2002 19:04:59 +0000 (19:04 +0000)]
Note MFCs of lock(1) -v and vidcontrol(1) -S.

21 years agoGuido found another bug. There is a situation with
Matthew Dillon [Mon, 30 Sep 2002 18:55:45 +0000 (18:55 +0000)]
Guido found another bug.  There is a situation with
timestamped TCP packets where FreeBSD will send DATA+FIN and
A W2K box will ack just the DATA portion.  If this occurs
after FreeBSD has done a (NewReno) fast-retransmit and is
recovering it (dupacks > threshold) it triggers a case in
tcp_newreno_partial_ack() (tcp_newreno() in stable) where
tcp_output() is called with the expectation that the retransmit
timer will be reloaded.  But tcp_output() falls through and
returns without doing anything, causing the persist timer to be
loaded instead.  This causes the connection to hang until W2K gives up.
This occurs because in the case where only the FIN must be acked, the
'len' calculation in tcp_output() will be 0, a lot of checks will be
skipped, and the FIN check will also be skipped because it is designed
to handle FIN retransmits, not forced transmits from tcp_newreno().

The solution is to simply set TF_ACKNOW before calling tcp_output()
to absolute guarentee that it will run the send code and reset the
retransmit timer.  TF_ACKNOW is already used for this purpose in other
cases.

For some unknown reason this patch also seems to greatly reduce
the number of duplicate acks received when Guido runs his tests over
a lossy network.  It is quite possible that there are other
tcp_newreno{_partial_ack()} cases which were not generating the expected
output which this patch also fixes.

X-MFC after: Will be MFC'd after the freeze is over

21 years ago- Give legacy an identify routine that always adds 'legacy0' at an order
John Baldwin [Mon, 30 Sep 2002 18:47:11 +0000 (18:47 +0000)]
- Give legacy an identify routine that always adds 'legacy0' at an order
  of 1 so that it is not probed until after acpi0 is probed and attached.
- In legacy_probe(), return ENXIO if acpi0 is around and alive.
- nexus_attach() is now much simpler and just lets its child drivers do
  all the work.

21 years agoTrash the PnPBIOStable pointer later on when we know that the acpi probe
John Baldwin [Mon, 30 Sep 2002 18:45:20 +0000 (18:45 +0000)]
Trash the PnPBIOStable pointer later on when we know that the acpi probe
and attach routines have succeeded so that if they fail we can still use
the PnP BIOS to find ISA on-board devices.  The fact that we do this here
is gross but fixing it properly involves a lot more work.

21 years agoIn rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTR
Josef Karthauser [Mon, 30 Sep 2002 17:50:18 +0000 (17:50 +0000)]
In rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTR
code path to fix a bug in the non USB_USE_SOFTINTR path that caused
the usb bus to hang and generally misbehave when devices were unplugged.
In the process though it also reduced the throughput of usb devices because
of a less than optimal implementation under FreeBSD.

This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci
so that it works again, and switches back to using this code path.

The uhci code has been tested, but the ohci code hasn't.  It's
essentially the same anyway and so I don't envisage any difficulties.

Code for uhci submitted by: Maksim Yevmenkin <myevmenk@exodus.net>

21 years agoDon't install mqueue.h, since it only makes things harder for porting
Mike Barcroft [Mon, 30 Sep 2002 17:14:26 +0000 (17:14 +0000)]
Don't install mqueue.h, since it only makes things harder for porting
software when you provide prototypes for non-existent functions.

21 years agoModified release notes: atapicam wording tweaks, dhclient 3.0.1RC9.
Bruce A. Mah [Mon, 30 Sep 2002 17:01:19 +0000 (17:01 +0000)]
Modified release notes:  atapicam wording tweaks, dhclient 3.0.1RC9.

Submitted by: thomas (atapicam)

21 years agoCall bus_set_resource() to set the ioport resource.
Yoshihiro Takahashi [Mon, 30 Sep 2002 16:41:47 +0000 (16:41 +0000)]
Call bus_set_resource() to set the ioport resource.