]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoMFNetBSD
mbr [Mon, 16 Aug 2004 00:20:31 +0000 (00:20 +0000)]
MFNetBSD

Decrease log severity to debug if a protocol is not supported by the
kernel (rpcbind checks /etc/netconfig if a protocol is available).
This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.

20 years agoComment out the ability to enable/disable ACPI at runtime. This appears
njl [Sun, 15 Aug 2004 23:39:37 +0000 (23:39 +0000)]
Comment out the ability to enable/disable ACPI at runtime.  This appears
to not work reliably and crash some systems.  It is not supported at all
on others.  Pending discussion, the underlying ioctls will be removed.

20 years agoTweak the compatibility macros a little so that the device printing is
imp [Sun, 15 Aug 2004 23:39:18 +0000 (23:39 +0000)]
Tweak the compatibility macros a little so that the device printing is
moved into them.

20 years agoResolve conflicts from dhclient 3.0.1 final import.
mbr [Sun, 15 Aug 2004 23:37:10 +0000 (23:37 +0000)]
Resolve conflicts from dhclient 3.0.1 final import.

No functional changes in this import.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r133783,
mbr [Sun, 15 Aug 2004 23:33:13 +0000 (23:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r133783,
which included commits to RCS files with non-trunk default branches.

20 years agoImport ISC DHCP 3.0.1 client.
mbr [Sun, 15 Aug 2004 23:33:13 +0000 (23:33 +0000)]
Import ISC DHCP 3.0.1 client.

20 years agoOther part of the cbb isa/pci split. This likely is causing problems
imp [Sun, 15 Aug 2004 23:17:54 +0000 (23:17 +0000)]
Other part of the cbb isa/pci split.  This likely is causing problems
wrt cbb module.

20 years agoAdd a kludge for building SBus-only kernels, i.e. kernels without support
marius [Sun, 15 Aug 2004 22:59:34 +0000 (22:59 +0000)]
Add a kludge for building SBus-only kernels, i.e. kernels without support
for EBus, ISA and PCI, by compiling ofw_isa.c and ofw_pci_if.m unconditio-
nally. The correct way is to rewrite OF_decode_addr() in ofw_machdep.c in
a bus-neutral way. That's certainly possible but we unfortunately didn't
make it for FreeBSD 5.3.

Approved by: tmm

20 years ago- Handle the '\&' mdoc(7) escape sequence.
simon [Sun, 15 Aug 2004 22:33:10 +0000 (22:33 +0000)]
- Handle the '\&' mdoc(7) escape sequence.
- Handle the .Sx macro and give a warning if it is used in the
  HARDWARE section, since that will probably produce odd text in the
  Hardware Notes.

20 years agoFix a couple of edge cases in which sb.st_size may be incorrect or
des [Sun, 15 Aug 2004 22:22:35 +0000 (22:22 +0000)]
Fix a couple of edge cases in which sb.st_size may be incorrect or
meaningless.  In particular, don't assume that it is left untouched if
stat(2) fails; that assumption happens to fail at high optimization
levels on some platforms.

MFC after: 1 week

20 years ago- Auto generate device listings for the following drivers: mpt, trm,
simon [Sun, 15 Aug 2004 22:14:29 +0000 (22:14 +0000)]
- Auto generate device listings for the following drivers: mpt, trm,
  rl, vr, dc, de, and gem.
- hme(4) is not sparc64 only anymore, so update dev.archlist.txt
  acordingly.

20 years ago- Add a HARDWARE section which lists supported devices.
simon [Sun, 15 Aug 2004 21:59:15 +0000 (21:59 +0000)]
- Add a HARDWARE section which lists supported devices.
- Fix a few mdoc(7) markup / style nits when I'm here anyway.

20 years agoRelease the vnode cache mutex when calling vgone(), since vgone() may
des [Sun, 15 Aug 2004 21:58:02 +0000 (21:58 +0000)]
Release the vnode cache mutex when calling vgone(), since vgone() may
sleep.  This makes pfs_exit() even less efficient than before, but on
the bright side, the vnode cache mutex no longer needs to be recursive.

20 years agoAdd rtld-elf to the include path for the rtld to pthread TLS interface.
dfr [Sun, 15 Aug 2004 21:51:18 +0000 (21:51 +0000)]
Add rtld-elf to the include path for the rtld to pthread TLS interface.

20 years agoCorrect some uses of the wrong members of the *min()/*max()-familiy, e.g.
marius [Sun, 15 Aug 2004 21:37:52 +0000 (21:37 +0000)]
Correct some uses of the wrong members of the *min()/*max()-familiy, e.g.
min() on unsigned long. None of these are believed to have been fatal though.

Reviewed by: tmm

20 years agoBump document date for last commit.
simon [Sun, 15 Aug 2004 21:02:48 +0000 (21:02 +0000)]
Bump document date for last commit.

20 years ago - Make pmap_emulate_reference() MP and preemption safe. Previously, it
alc [Sun, 15 Aug 2004 20:54:25 +0000 (20:54 +0000)]
 - Make pmap_emulate_reference() MP and preemption safe.  Previously, it
   contained "sanity" checks that could be violated if another CPU modified
   the pmap between the emulation trap and locking the pmap in
   pmap_emulate_reference().  As a result, the pte could be inconsistent
   with the access that caused the emulation trap.  In such cases,
   pmap_emulate_reference() now flushes the current CPU's TLB entry and
   returns.
 - Make pmap_changebit() an inline function, reducing object code size.

20 years ago- Add a HARDWARE section which lists supported devices.
simon [Sun, 15 Aug 2004 20:54:07 +0000 (20:54 +0000)]
- Add a HARDWARE section which lists supported devices.
- Add the manufacturer name to each item in the device list.
- Make the note about supporting "IBM e335" into a general list and
  change the entry to use the full product name ("IBM eServer xSeries
  335").
- Add Dell PowerEdge 1750 to the list of systems with mpt onboard.

20 years agoPreemptive anti-footshooting: cause a #error if MP_WATCHDOG is compiled
rwatson [Sun, 15 Aug 2004 20:32:40 +0000 (20:32 +0000)]
Preemptive anti-footshooting: cause a #error if MP_WATCHDOG is compiled
with SCHED_ULE.

20 years agoShorten the description of NO_OPENSSL, which was split into two lines by a
marius [Sun, 15 Aug 2004 20:32:06 +0000 (20:32 +0000)]
Shorten the description of NO_OPENSSL, which was split into two lines by a
patch of mine in revision 1.216, a bit so it fits in a single line again.

20 years agoSave on one variable in ofwo_action(). Leftover from an older version of
marius [Sun, 15 Aug 2004 20:18:54 +0000 (20:18 +0000)]
Save on one variable in ofwo_action(). Leftover from an older version of
this function which needed the handle of the /options node more than once.

20 years ago- Correct the description of the "local-mac-address?" variable. Not all NICs
marius [Sun, 15 Aug 2004 20:17:29 +0000 (20:17 +0000)]
- Correct the description of the "local-mac-address?" variable. Not all NICs
  use it, only those with FCode. Add references to dc(4), gem(4) and hme(4)
  for obtaining further information about such devices presently supported
  by FreeBSD.
- Correct the HISTORY section. There was an eeprom(8) utility in 4.4BSD and
  early versions of FreeBSD 2.x.
- Add an AUTHORS section.

20 years agoSpell MP_WATCHDIG right: I fixed the build without MP_WATCHDOG after
rwatson [Sun, 15 Aug 2004 19:57:14 +0000 (19:57 +0000)]
Spell MP_WATCHDIG right: I fixed the build without MP_WATCHDOG after
testing MP_WATCHDOG, and used an incorrect ifdef.

20 years agoChange the HARDWARE section to have the same style as in the other
simon [Sun, 15 Aug 2004 19:48:27 +0000 (19:48 +0000)]
Change the HARDWARE section to have the same style as in the other
FreeBSD section 4 manual pages.

20 years agoAdd a useful snippet on limitations of inductive reasoning by Bertrand
rwatson [Sun, 15 Aug 2004 19:24:17 +0000 (19:24 +0000)]
Add a useful snippet on limitations of inductive reasoning by Bertrand
Russell.

20 years agoYet another tweak to the shutdown messages in boot():
truckman [Sun, 15 Aug 2004 19:17:23 +0000 (19:17 +0000)]
Yet another tweak to the shutdown messages in boot():

  Don't count busy buffers before the initial call to sync() and
  don't skip the initial sync() if no busy buffers were called.
  Always call sync() at least once if syncing is requested.  This
  defers the "Syncing disks, buffers remaining..." message until
  after the initial sync() call and the first count of busy
  buffers.  This backs out changes in kern_shutdown 1.162.

  Print a different message when there are no busy buffers after the
  initial sync(), which is now the expected situation.

  Print an additional message when syncing has completed successfully
  in the unusual situation where the work of syncing was done by
  boot().

  Uppercase one message to make it consistent with all of the other
  kernel shutdown messages.

Discussed with: bde (in a much earlier form, prior to 1.162)
Reviewed by: njl (in an earlier form)

20 years agoAdd a "fillchar" command line argument to dd(1) that permits the user
rwatson [Sun, 15 Aug 2004 19:10:05 +0000 (19:10 +0000)]
Add a "fillchar" command line argument to dd(1) that permits the user
to specify an alternative padding character when using a conversion
mode, or when using noerror with sync and an input error occurs.  This
facilities reading old and error-prone media by allowing the user to
more effectively mark error blocks in the output stream.

20 years ago- Add a HARDWARE section which lists supported devices.
simon [Sun, 15 Aug 2004 18:13:08 +0000 (18:13 +0000)]
- Add a HARDWARE section which lists supported devices.

20 years ago- Add a HARDWARE section which lists supported devices.
simon [Sun, 15 Aug 2004 18:09:47 +0000 (18:09 +0000)]
- Add a HARDWARE section which lists supported devices.
- Remove reference to the NOTES section in the entry for Sun DMFE,
  since ot doesn't work well with the auto generated Hardware Notes. [1]

OK'ed by: marius [1]

20 years agoAdd an "options MP_WATCHDOG" to i386. This option allows one of the
rwatson [Sun, 15 Aug 2004 18:02:09 +0000 (18:02 +0000)]
Add an "options MP_WATCHDOG" to i386.  This option allows one of the
logical CPUs on a system to be used as a dedicated watchdog to cause a
drop to the debugger and/or generate an NMI to the boot processor if
the kernel ceases to respond.  A sysctl enables the watchdog running
out of the processor's idle thread; a callout is launched to reset a
timer in the watchdog.  If the callout fails to reset the timer for ten
seconds, the watchdog will fire.  The sysctl allows you to select which
CPU will run the watchdog.

A sample "debug.leak_schedlock" is included, which causes a sysctl to
spin holding sched_lock in order to trigger the watchdog.  On my Xeons,
the watchdog is able to detect this failure mode and break into the
debugger, which cannot otherwise be done without an NMI button.

This option does not currently work with sched_ule due to ule's push
notion of scheduling, similar to machdep.hlt_logical_cpus failing to
work with that scheduler.

On face value, this might seem somewhat inefficient, but there are a
lot of dual-processor Xeons with HTT around, so using one as a watchdog
for testing is not as inefficient as one might fear.

20 years ago- Make the naming of AMCC's 3ware cards consistent with the current
simon [Sun, 15 Aug 2004 17:40:06 +0000 (17:40 +0000)]
- Make the naming of AMCC's 3ware cards consistent with the current
  naming from AMCC.
- Update the list of devices supported by the drivers.

All of the above is based on information from AMCC via vkashyap.

20 years agoo Document net.inet.ip.random_id sysctl.
maxim [Sun, 15 Aug 2004 17:32:31 +0000 (17:32 +0000)]
o Document net.inet.ip.random_id sysctl.

Reviewed by: dwmalone, ru

20 years agoAdd TLS support for i386 and amd64.
dfr [Sun, 15 Aug 2004 16:28:05 +0000 (16:28 +0000)]
Add TLS support for i386 and amd64.

20 years agoAdd TLS support for libthr on i386.
dfr [Sun, 15 Aug 2004 16:21:30 +0000 (16:21 +0000)]
Add TLS support for libthr on i386.

20 years agoAdd support for TLS in statically linked programs.
dfr [Sun, 15 Aug 2004 16:18:52 +0000 (16:18 +0000)]
Add support for TLS in statically linked programs.

20 years agomove the declaration of struct kqlist into the non-KERNEL visable section
jmg [Sun, 15 Aug 2004 15:36:18 +0000 (15:36 +0000)]
move the declaration of struct kqlist into the non-KERNEL visable section
to fix userland.

20 years agoAvoid code duplication by introducing g_mirror_write_metadata() function,
pjd [Sun, 15 Aug 2004 13:58:29 +0000 (13:58 +0000)]
Avoid code duplication by introducing g_mirror_write_metadata() function,
which is used now by g_mirror_clear_metadata() function and
g_mirror_update_metadata() function.

20 years agoInform hier(7) about /usr/include/geom/mirror/ directory.
pjd [Sun, 15 Aug 2004 13:26:20 +0000 (13:26 +0000)]
Inform hier(7) about /usr/include/geom/mirror/ directory.

20 years agoA media type of floppy is detected automatically.
nyan [Sun, 15 Aug 2004 13:00:07 +0000 (13:00 +0000)]
A media type of floppy is detected automatically.

Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>

20 years agoReplace linux_getitimer() and linux_setitimer() with implementations
tjr [Sun, 15 Aug 2004 12:34:15 +0000 (12:34 +0000)]
Replace linux_getitimer() and linux_setitimer() with implementations
based on those in freebsd32_misc.c, removing the assumption that Linux
uses the same layout for struct itimerval as we use natively.

20 years agoDisable surplus detection of breakpoint event in signal stack, the check
davidxu [Sun, 15 Aug 2004 12:31:30 +0000 (12:31 +0000)]
Disable surplus detection of breakpoint event in signal stack, the check
causes a normal breakpoint event in new thread to be ignored unexpectly,
result is process SIGSEGV.

Test on: AMD64, i386

20 years agoAvoid assuming that l_timeval is the same as the native struct timeval
tjr [Sun, 15 Aug 2004 12:24:05 +0000 (12:24 +0000)]
Avoid assuming that l_timeval is the same as the native struct timeval
in linux_select().

20 years agoUse sv_psstrings from the current process's sysentvec structure instead
tjr [Sun, 15 Aug 2004 11:52:45 +0000 (11:52 +0000)]
Use sv_psstrings from the current process's sysentvec structure instead
of PS_STRINGS. This is a no-op at present, but it will be needed when
running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in
addressable memory.

20 years agoUse the USBD_FORCE_SHORT_XFER flag when setting up transmit transfers.
iedowse [Sun, 15 Aug 2004 10:51:21 +0000 (10:51 +0000)]
Use the USBD_FORCE_SHORT_XFER flag when setting up transmit transfers.
Without this, the device cannot detect the end of ethernet packets
whose size is a multiple of the USB packat size.

PR: kern/70474
Submitted by: Andrew Thompson <andy@fud.org.nz>
MFC after: 1 week

20 years agoo Add -l option to jail(8) similar to su(1): before running jail'ed
maxim [Sun, 15 Aug 2004 08:21:50 +0000 (08:21 +0000)]
o Add -l option to jail(8) similar to su(1): before running jail'ed
program under specific user's credentials, clean the environment and
set only a few variables.

PR: bin/70024
Submitted by: demon
MFC after: 1 month

20 years agoThis is a force commit because I forgot from the previous commit (and other
jmg [Sun, 15 Aug 2004 06:27:49 +0000 (06:27 +0000)]
This is a force commit because I forgot from the previous commit (and other
files):
Supported by: nCircle Network Security, Inc.

They have/will assign ownership of the code to me.

20 years agoAdd locking to the kqueue subsystem. This also makes the kqueue subsystem
jmg [Sun, 15 Aug 2004 06:24:42 +0000 (06:24 +0000)]
Add locking to the kqueue subsystem.  This also makes the kqueue subsystem
a more complete subsystem, and removes the knowlege of how things are
implemented from the drivers.  Include locking around filter ops, so a
module like aio will know when not to be unloaded if there are outstanding
knotes using it's filter ops.

Currently, it uses the MTX_DUPOK even though it is not always safe to
aquire duplicate locks.  Witness currently doesn't support the ability
to discover if a dup lock is ok (in some cases).

Reviewed by: green, rwatson (both earlier versions)

20 years agoRemove misc/screen, which is not packageable.
kris [Sun, 15 Aug 2004 06:07:01 +0000 (06:07 +0000)]
Remove misc/screen, which is not packageable.

20 years agoImprove the usage. Without any arguments, kgdb(1) works on /dev/mem
marcel [Sun, 15 Aug 2004 02:39:20 +0000 (02:39 +0000)]
Improve the usage. Without any arguments, kgdb(1) works on /dev/mem
with the currently running kernel image. Otherwise, one of -c, -n or
-r is expected for working on a particular core file (-c), working
on a saved dump (-n) or working remotely (-r). When working on a
saved dump, a kernel may be omitted.
For a remote debugging session (-r), kgdb(1) will use the specified
device.

20 years agoFix a style(9) bug (variable definitions inside a nested scope) a patch
marius [Sun, 15 Aug 2004 02:17:20 +0000 (02:17 +0000)]
Fix a style(9) bug (variable definitions inside a nested scope) a patch
of mine introduced in revision 1.10.

Approved by: marcel
Prodded by: marcel

20 years agoAdd a new sysctl, debug.kdb.stop_cpus, which controls whether or not we
rwatson [Sun, 15 Aug 2004 02:06:27 +0000 (02:06 +0000)]
Add a new sysctl, debug.kdb.stop_cpus, which controls whether or not we
attempt to IPI other cpus when entering the debugger in order to stop
them while in the debugger.  The default remains to issue the stop;
however, that can result in a hang if another cpu has interrupts disabled
and is spinning, since the IPI won't be received and the KDB will wait
indefinitely.  We probably need to add a timeout, but this is a useful
stopgap in the mean time.

Reviewed by: marcel

20 years agosio(4), which never really worked on sparc64, was removed in favour of
marius [Sun, 15 Aug 2004 00:10:59 +0000 (00:10 +0000)]
sio(4), which never really worked on sparc64, was removed in favour of
uart(4) in sparc64/conf/GENERIC revision 1.63 about 9 months ago. Remove
its source files here, too.

20 years ago- Introduce an uart_cpu_identify() which is implemented in uart_cpu_<arch>.c
marius [Sat, 14 Aug 2004 23:54:27 +0000 (23:54 +0000)]
- Introduce an uart_cpu_identify() which is implemented in uart_cpu_<arch>.c
  and that can be used as an identify function for all kinds of busses on a
  certain platform. Expect for sparc64 these are only stubs right now. [1]
- For sparc64, add code to its uart_cpu_identify() for registering the on-
  board ISA UARTs and their resources based on information obtained from
  Open Firmware.
  It would be better if this would be done in the OFW ISA code. However, due
  to the common FreeBSD ISA code and PNP-IDs not always being present in the
  properties of the ISA nodes there seems to be no good way to implement that.
  Therefore special casing UARTs as the sole really relevant ISA devices on
  sparc64 seemed reasonable. [2]

Approved by: marcel
Discussed with: marcel [1], tmm [2]
Tested by: make universe

20 years agoAdd sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
marius [Sat, 14 Aug 2004 23:53:04 +0000 (23:53 +0000)]
Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will
get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.

20 years agoNow that hme(4) is MI build its module on all platforms.
marius [Sat, 14 Aug 2004 22:40:16 +0000 (22:40 +0000)]
Now that hme(4) is MI build its module on all platforms.

Tested by: `make universe` and powerpc cross-build on i386

20 years agoAdd hme(4) here now that it's MI.
marius [Sat, 14 Aug 2004 22:38:50 +0000 (22:38 +0000)]
Add hme(4) here now that it's MI.

20 years agoMake hme(4), i.e. the PCI-variant, MI by reading the MAC address on sytems
marius [Sat, 14 Aug 2004 22:38:20 +0000 (22:38 +0000)]
Make hme(4), i.e. the PCI-variant, MI by reading the MAC address on sytems
without Open Firmware directly instead of using OF_getetheraddr(). This is
a bit painful though, as the MAC address is contained in the NA field of
the VPD of the EBus bridge, which is is another function of the same chip.
To make it worse, the VPD of the EBus bridge can't be accessed via the PCI
capability pointer but has to be digged out from the Boot PROM and has a
non-standard format.
The PCI VPD struct and macros used here should be part of the FreeBSD PCI
code nevertheless.

Approved by: tmm
Based on: NetBSD
Tested with: Sun X1032A (hme(4)-isp(4)-combo card) on alpha and i386

20 years agoNext step in making usb more newbus:
imp [Sat, 14 Aug 2004 22:10:26 +0000 (22:10 +0000)]
Next step in making usb more newbus:
o reprobe children when a new driver is added to uhub
o fix the usbd_probe_and_attach to set the ivars to a malloc'd area, as well
  as freeing the ivars on child destruction.
o Don't delete children that don't attach. Evidentally, the need to do this
  is a common misconception.
o minor formatting foo that may violate style(9) at the moment, but keeps the
  diffs against my p4 tree smaller.

This does not solve the ugen gobbling things up problem, but the fixes
I have for that expose bugs in other parts of the tree...

20 years ago- Capitalize Ethernet and Fast Ethernet.
marius [Sat, 14 Aug 2004 21:44:35 +0000 (21:44 +0000)]
- Capitalize Ethernet and Fast Ethernet.
- Add a NOTES section with information regarding the "local-mac-address?"
  system configuration variable on sparc64 and add a reference to eeprom(8)
  for using it. Dump document date for this.
- In dc.4, add the on-board DM9102A on Sun Netra X1 and Sun Fire V100 to
  the list of known working devices.

20 years ago- Make OF_getetheraddr() honour the "local-mac-address?" system config
marius [Sat, 14 Aug 2004 21:43:37 +0000 (21:43 +0000)]
- Make OF_getetheraddr() honour the "local-mac-address?" system config
  variable. If set to "true" OF_getetheraddr() will now return the unique
  MAC address stored in the "local-mac-address" property of the device's
  OFW node if present and the host address/system default MAC address if
  the node doesn't doesn't have such a property. If set to "false" the
  host address will be returned for all devices like before this change.
  This brings the behaviour of device drivers for NICs with OFW support/
  FCode, i.e. dc(4) for on-board DM9102A on Sun machines, gem(4) and hme(4),
  regarding "local-mac-address?" in line with NetBSD and Solaris.
  The man pages of the respective drivers will be updated separately to
  reflect this change.
- Remove OF_getetheraddr2() which was used as a stopgap in dc(4). Its
  functionality is now part of OF_getetheraddr().

20 years agoRemove confused comment.
phk [Sat, 14 Aug 2004 21:40:28 +0000 (21:40 +0000)]
Remove confused comment.

20 years agoRemove spl calls.
alc [Sat, 14 Aug 2004 18:57:41 +0000 (18:57 +0000)]
Remove spl calls.

20 years agoStop defining '_Complex' in a C99 environment, it is supposed to be a keyword.
stefanf [Sat, 14 Aug 2004 18:03:21 +0000 (18:03 +0000)]
Stop defining '_Complex' in a C99 environment, it is supposed to be a keyword.

20 years agoUse tabulators after '#define'.
stefanf [Sat, 14 Aug 2004 17:55:15 +0000 (17:55 +0000)]
Use tabulators after '#define'.

20 years agoAvoid using void pointers in additive expressions.
stefanf [Sat, 14 Aug 2004 17:46:10 +0000 (17:46 +0000)]
Avoid using void pointers in additive expressions.

PR: 56653

20 years agoCause pfind() not to return processes in the PRS_NEW state. As a result,
rwatson [Sat, 14 Aug 2004 17:15:16 +0000 (17:15 +0000)]
Cause pfind() not to return processes in the PRS_NEW state.  As a result,
threads consuming the result of pfind() will not need to check for a NULL
credential pointer or other signs of an incompletely created process.
However, this also means that pfind() cannot be used to test for the
existence or find such a process.  Annotate pfind() to indicate that this
is the case.  A review of curent consumers seems to indicate that this is
not a problem for any of them.  This closes a number of race conditions
that could result in NULL pointer dereferences and related failure modes.
Other related races continue to exist, especially during iteration of the
allproc list without due caution.

Discussed with: tjr, green

20 years agoAdd a note about RANDOM_IP_ID.
dwmalone [Sat, 14 Aug 2004 16:16:01 +0000 (16:16 +0000)]
Add a note about RANDOM_IP_ID.

20 years agoGet rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
dwmalone [Sat, 14 Aug 2004 15:32:40 +0000 (15:32 +0000)]
Get rid of the RANDOM_IP_ID option and make it a sysctl.  NetBSD
have already done this, so I have styled the patch on their work:

        1) introduce a ip_newid() static inline function that checks
        the sysctl and then decides if it should return a sequential
        or random IP ID.

        2) named the sysctl net.inet.ip.random_id

        3) IPv6 flow IDs and fragment IDs are now always random.
        Flow IDs and frag IDs are significantly less common in the
        IPv6 world (ie. rarely generated per-packet), so there should
        be smaller performance concerns.

The sysctl defaults to 0 (sequential IP IDs).

Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months

20 years agoFix outgoing ICMP on global instance.
phk [Sat, 14 Aug 2004 14:21:09 +0000 (14:21 +0000)]
Fix outgoing ICMP on global instance.

20 years agoAdd support for C3 Nehemiah ACE ("Padlock") AES crypto. This comes
markm [Sat, 14 Aug 2004 13:38:35 +0000 (13:38 +0000)]
Add support for C3 Nehemiah ACE ("Padlock") AES crypto. This comes
from OpenSSL 0.9.5 (yet to be released), and is pretty complete.

20 years agoMake informational output look less like an accident.
le [Sat, 14 Aug 2004 09:56:17 +0000 (09:56 +0000)]
Make informational output look less like an accident.

20 years agoAdd XXX comment about findcdev() misuse.
phk [Sat, 14 Aug 2004 08:38:17 +0000 (08:38 +0000)]
Add XXX comment about findcdev() misuse.

20 years agoDon't declare everything we find on a loopback interface for passive:
phk [Sat, 14 Aug 2004 08:36:35 +0000 (08:36 +0000)]
Don't declare everything we find on a loopback interface for passive:

Only the actual loopback address should be declared passive, other
addresses are very likely to be desirable to announce.

Check for IFF_LOOPBACK instead of IFF_PASSIVE to determine if we have
an unknown interface type.

20 years agoAdd some KASSERTS.
phk [Sat, 14 Aug 2004 08:33:49 +0000 (08:33 +0000)]
Add some KASSERTS.

20 years agoWhitespace nit.
julian [Sat, 14 Aug 2004 07:21:20 +0000 (07:21 +0000)]
Whitespace nit.

20 years agoCorrect grammo.
schweikh [Sat, 14 Aug 2004 06:29:17 +0000 (06:29 +0000)]
Correct grammo.

20 years agoAllocate memory in the unwinder with M_NOWAIT. We may need to provide
marcel [Sat, 14 Aug 2004 05:00:37 +0000 (05:00 +0000)]
Allocate memory in the unwinder with M_NOWAIT. We may need to provide
backtraces with locks held.

20 years agoEliminate reliance on non-portable <err.h> by implementing a very
kientzle [Sat, 14 Aug 2004 03:45:45 +0000 (03:45 +0000)]
Eliminate reliance on non-portable <err.h> by implementing a very
simple errx() function.
Improve behavior when bzlib/zlib are missing by detecting and
issuing an error message on attempts to read gzip/bzip2 compressed
archives.

20 years agoAfter completing a name lookup for a target UNIX domain socket to
rwatson [Sat, 14 Aug 2004 03:43:49 +0000 (03:43 +0000)]
After completing a name lookup for a target UNIX domain socket to
connect to, re-check that the local UNIX domain socket hasn't been
closed while we slept, and if so, return EINVAL.  This affects the
system running both with and without Giant over the network stack,
and recent ULE changes appear to cause it to trigger more
frequently than previously under load.  While here, improve catching
of possibly closed UNIX domain sockets in one or two additional
circumstances.  I have a much larger set of related changes in
Perforce, but they require more testing before they can be merged.

One debugging printf is left in place to indicate when such a race
takes place: this is typically triggered by a buggy application
that simultaenously connect()'s and close()'s a UNIX domain socket
file descriptor.  I'll remove this at some point in the future, but
am interested in seeing how frequently this is reported.  In the
case of Martin's reported problem, it appears to be a result of a
non-thread safe syslog() implementation in the C library, which
does not synchronize access to its logging file descriptor.

Reported by: mbr

20 years agoWe don't need <paths.h>, so don't bother including it.
kientzle [Sat, 14 Aug 2004 03:43:35 +0000 (03:43 +0000)]
We don't need <paths.h>, so don't bother including it.

20 years agoAdd libgcov, a runtime support library for binaries compiled for basic
kan [Sat, 14 Aug 2004 03:23:24 +0000 (03:23 +0000)]
Add libgcov, a runtime support library for binaries compiled for basic
block profiling.

20 years agoAdd new PCI device ID for PERC4/DI.
ambrisko [Sat, 14 Aug 2004 02:48:13 +0000 (02:48 +0000)]
Add new PCI device ID for PERC4/DI.

20 years agoSince if_oltr doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Sat, 14 Aug 2004 00:19:07 +0000 (00:19 +0000)]
Since if_oltr doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_ixgb doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Sat, 14 Aug 2004 00:17:04 +0000 (00:17 +0000)]
Since if_ixgb doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_xe doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Sat, 14 Aug 2004 00:15:26 +0000 (00:15 +0000)]
Since if_xe doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_vx doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Sat, 14 Aug 2004 00:12:42 +0000 (00:12 +0000)]
Since if_vx doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_txp doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:53:36 +0000 (23:53 +0000)]
Since if_txp doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

Note: mutexes are initialized in the softc for this driver, but the
locking appears inadequate to allow Giant-free operation.

20 years agoSince if_tx doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:52:33 +0000 (23:52 +0000)]
Since if_tx doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_sr doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:49:48 +0000 (23:49 +0000)]
Since if_sr doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_snc doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:47:01 +0000 (23:47 +0000)]
Since if_snc doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_sbni doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:41:00 +0000 (23:41 +0000)]
Since if_sbni doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_ray doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:39:07 +0000 (23:39 +0000)]
Since if_ray doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_plip doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:32:17 +0000 (23:32 +0000)]
Since if_plip doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_nge doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:22:53 +0000 (23:22 +0000)]
Since if_nge doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

Note: this driver does declare and occasionally reference mutexes,
but I believe not nearly enough to provide safety.

20 years agoAvoid using void pointers in additive expressions.
stefanf [Fri, 13 Aug 2004 23:22:38 +0000 (23:22 +0000)]
Avoid using void pointers in additive expressions.

PR: 56653 (libc/rpc bits)
Approved by: alfred

20 years agoSince if_lnc doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:20:50 +0000 (23:20 +0000)]
Since if_lnc doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_lge doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:18:01 +0000 (23:18 +0000)]
Since if_lge doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_ic doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:16:44 +0000 (23:16 +0000)]
Since if_ic doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_ie doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:15:44 +0000 (23:15 +0000)]
Since if_ie doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

20 years agoSince if_hme doesn't contain locking or run with INTR_MPSAFE, mark
rwatson [Fri, 13 Aug 2004 23:14:50 +0000 (23:14 +0000)]
Since if_hme doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.