dragonfly.git
7 years agowlan - cleanup
Matthew Dillon [Tue, 7 Sep 2010 20:28:36 +0000 (13:28 -0700)]
wlan - cleanup

* Remove some debugging.

7 years agobuild - Temporary adjustments for further wlan conversion work
Matthew Dillon [Tue, 7 Sep 2010 20:26:53 +0000 (13:26 -0700)]
build - Temporary adjustments for further wlan conversion work

* Remove iwn, ral, wi, and wpi temporarily until they can be converted
  like ath was.

7 years agowlan - Convert low level if_ath driver.
Matthew Dillon [Tue, 7 Sep 2010 20:25:40 +0000 (13:25 -0700)]
wlan - Convert low level if_ath driver.

* Ripout old lock API.

* Use the new wlan_serialize_enter/exit and &wlan_global_serializer.

7 years agowlan - Rip out all wlan locks part 2/2 - cleanup
Matthew Dillon [Tue, 7 Sep 2010 20:18:31 +0000 (13:18 -0700)]
wlan - Rip out all wlan locks part 2/2 - cleanup

* Clean up a few snafus and adjust the names for some procedures.

* Flesh out README.DRAGONFLY

7 years agowlan - Rip out all wlan locks part 2/2
Matthew Dillon [Tue, 7 Sep 2010 17:01:17 +0000 (10:01 -0700)]
wlan - Rip out all wlan locks part 2/2

* Add wlan_global_serializer and wlan_*() API calls.

* Use the calls at all border crossings.

* NOTE: callout_stop() may still have deadlock issues if it catches a
  callout in-progress.

7 years agowlan - Rip out all wlan locks part 1/2
Matthew Dillon [Tue, 7 Sep 2010 16:00:23 +0000 (09:00 -0700)]
wlan - Rip out all wlan locks part 1/2

* Rip out all the individiual wlan locks

7 years agokernel - Add LWKT_SERIALIZE_INITIALIZER
Matthew Dillon [Tue, 7 Sep 2010 15:58:38 +0000 (08:58 -0700)]
kernel - Add LWKT_SERIALIZE_INITIALIZER

* Add an initializer for serializer static/global declarations.

7 years agomsdosfs - Fix panic when mounting msdos filesystems.
Joe Talbott [Tue, 7 Sep 2010 04:17:00 +0000 (00:17 -0400)]
msdosfs - Fix panic when mounting msdos filesystems.

bread()ing different sizes from the same address requires this
flag before b[q]relse() is called.

Discussed-With: dillon

7 years agoral - Cleanup leftovers from tokenization.
Joe Talbott [Mon, 6 Sep 2010 21:00:58 +0000 (17:00 -0400)]
ral - Cleanup leftovers from tokenization.

Reported-By: swildner
7 years agouserland - sysctl - Fix stack overflow
Samuel J. Greear [Tue, 7 Sep 2010 03:09:25 +0000 (03:09 +0000)]
userland - sysctl - Fix stack overflow

* alloca(3) was being used to allocate space for a call to sysctl(3) that
  returned data. This could occasionally be on the order of 50-100MB
  (net.inet.tcp.pcblist) resulting in a segfault.

7 years agokernel - Expose mpsafe/collision internals of kq token via sysctl
Samuel J. Greear [Tue, 7 Sep 2010 02:10:14 +0000 (02:10 +0000)]
kernel - Expose mpsafe/collision internals of kq token via sysctl

7 years agoinstallkernel - Fix kernel.old/kernel overwrite
Matthew Dillon [Tue, 7 Sep 2010 01:58:54 +0000 (18:58 -0700)]
installkernel - Fix kernel.old/kernel overwrite

* The kernel was being copied to kernel.old/kernel twice, once normally,
  and once (after the new kernel was installed) by the module objcopy.

  This left kernel.old/kernel as the new kernel instead of the old kernel.

* Fix by restricting the module copy to .ko files.

7 years agokernel - Refactor kqueue interlocks
Matthew Dillon [Tue, 7 Sep 2010 01:44:03 +0000 (18:44 -0700)]
kernel - Refactor kqueue interlocks

* Make KN_PROCESSING a soft lock flag.  When set nobody else can mess
  with a particular knote (other than setting certain flags) even if
  the originator blocks.

* Interlock major processing with KN_PROCESSING.  Registration, event
  scan, knote(), deletion, and filter ops.

* Block & restart when conflicts occur.  For the knote() hot-path we only
  block and restart if the 'hint' is non-zero, otherwise we just flag with
  KN_REPROCESS to indicate that reprocessing is required.

* This should fix kqueue races related to blocking operations confusing
  the list scan.

* Document the shit out of everything.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
7 years agokernel - Fix panic when X11 intercepts console (III)
Matthew Dillon [Mon, 6 Sep 2010 20:48:21 +0000 (13:48 -0700)]
kernel - Fix panic when X11 intercepts console (III)

* Oops, ripped a little too much out of kputchar().  Put the TOTTY
  logic back in for the tprintf()/uprintf()/ttyprintf() cases.

* The console logic remains unchanged for kprintf() (it no longer
  attempts to tputchar() to a console tty intercept, instead we have
  a thread handle it from the dmesg buffer).

7 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 6 Sep 2010 20:36:05 +0000 (13:36 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

7 years agokernel - Fix numerous MP issues with sockbuf's and ssb_flags part 1/2
Matthew Dillon [Mon, 6 Sep 2010 20:34:01 +0000 (13:34 -0700)]
kernel - Fix numerous MP issues with sockbuf's and ssb_flags part 1/2

* Use atomic ops for ssb_flags handling

* Use atomic_cmpset_int() to interlock SSB_LOCK with SSB_WANT, and
  SSB_WAIT with SSB_WAKEUP.

  Note in particular that WAIT/WAKEUP assumes the client side of the
  socket is single threaded via an appropriate lock.  This needs more
  work.

7 years agoral - Convert to use wlan_token.
Joe Talbott [Sun, 5 Sep 2010 02:39:53 +0000 (22:39 -0400)]
ral - Convert to use wlan_token.

Tested-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
7 years agokernel - Add required kq_token around timer event
Matthew Dillon [Mon, 6 Sep 2010 18:05:19 +0000 (11:05 -0700)]
kernel - Add required kq_token around timer event

* filt_timerexpire() is called from a callout and needs the kq_token.

7 years agouserland - Port TCP-MD5 (RFC 2385) implementation.
Matthew Dillon [Mon, 6 Sep 2010 18:04:35 +0000 (11:04 -0700)]
userland - Port TCP-MD5 (RFC 2385) implementation.

Userland portion of he TCP_SIGNATURE port.

Submitted-by: David =?iso-8859-1?Q?B=C9RARD?= <david@nfrance.com>
Ported-from: FreeBSD

7 years agokernel - Port TCP-MD5 (RFC 2385) implementation.
Matthew Dillon [Mon, 6 Sep 2010 18:01:49 +0000 (11:01 -0700)]
kernel - Port TCP-MD5 (RFC 2385) implementation.

I have imported FreeBSD commits r125680, r125681 and r183001 into the
DragonFlyBSD code, it works well for both IPv4 and IPv6 BGP sessions.

This adds TCP_SIGNATURE to IPSEC.

For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.

Tested with a Cisco 2611XM running IOS 12.3(24), and Quagga 0.99.17

Submitted-by: David =?iso-8859-1?Q?B=C9RARD?= <david@nfrance.com>
Ported-from: FreeBSD

7 years agoarcmsr.4: Add some more cards which are supported by this driver.
Sascha Wildner [Mon, 6 Sep 2010 12:38:20 +0000 (14:38 +0200)]
arcmsr.4: Add some more cards which are supported by this driver.

Pointed-out-by: Ching <ching2048@areca.com.tw>
7 years agoAdd arcmsr(4) to our GENERIC configs and adjust comments a bit.
Sascha Wildner [Mon, 6 Sep 2010 12:32:43 +0000 (14:32 +0200)]
Add arcmsr(4) to our GENERIC configs and adjust comments a bit.

7 years agoloader(8): Make the init_path setting work again.
Sascha Wildner [Sun, 5 Sep 2010 21:49:38 +0000 (23:49 +0200)]
loader(8): Make the init_path setting work again.

7 years agoloader.8: Some more cleanup.
Sascha Wildner [Sun, 5 Sep 2010 21:45:09 +0000 (23:45 +0200)]
loader.8: Some more cleanup.

7 years agoRemove /usr/share/examples/bootforth.
Sascha Wildner [Sun, 5 Sep 2010 21:44:47 +0000 (23:44 +0200)]
Remove /usr/share/examples/bootforth.

7 years agoRemove FICL code from sys/boot and clean up some more.
Sascha Wildner [Sun, 5 Sep 2010 20:53:38 +0000 (22:53 +0200)]
Remove FICL code from sys/boot and clean up some more.

7 years agoRemove loader.4th.8 and references to it.
Sascha Wildner [Sun, 5 Sep 2010 20:23:59 +0000 (22:23 +0200)]
Remove loader.4th.8 and references to it.

7 years agoHook loader.conf.5 into the build again.
Sascha Wildner [Sun, 5 Sep 2010 20:14:17 +0000 (22:14 +0200)]
Hook loader.conf.5 into the build again.

7 years agoloader(8): Add back some loader.conf vars which the old code handled.
Sascha Wildner [Sun, 5 Sep 2010 20:01:43 +0000 (22:01 +0200)]
loader(8): Add back some loader.conf vars which the old code handled.

These are variables which all correspond to boot(8) options:

Variable           Equivalent to
======================================
boot_askname       boot -a
boot_cdrom         boot -C
boot_ddb           boot -d
boot_gdb           boot -g
boot_serial        boot -h
boot_single        boot -s
boot_userconfig    boot -c
boot_verbose       boot -v
boot_vidcons       boot -V

7 years agoloader(8): Put the kenv variables into an array for easier checking.
Sascha Wildner [Sun, 5 Sep 2010 19:45:45 +0000 (21:45 +0200)]
loader(8): Put the kenv variables into an array for easier checking.

Also remove the code that unsetenv()'s a variable if its value is empty.
We cannot do this since some variables (boot_ddb, boot_gdb etc.) need no
value.

7 years agokernel - Fix panic when X11 intercepts console (II)
Matthew Dillon [Sun, 5 Sep 2010 18:14:49 +0000 (11:14 -0700)]
kernel - Fix panic when X11 intercepts console (II)

* There is a secondary issue when the console is runs through a pty or
  other device and kqueue is used, the tty_token is not enough.

* Rewrite kputchar() and shift all constty intercepts over to their own
  kernel thread.  kputchar() will write to the dmesg buffer and will call
  cnputc() to write to the real console, and (for tprintf()) it will
  output a specified tty.  But it will no longer attempt to write to
  the console tty via the kprintf() path.

  Instead kputchar() simply wakes up the monitoring kernel thread and
  the monitoring kernel thread tracks and copies the dmesg buffer to
  the constty.

* This completely fixes the constty intercept issue.  'xconsole' now works
  perfectly.  Nothing can go wrong.  Go wrong.  Go wrong.