]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
14 years agoMFC r198152
thompsa [Thu, 29 Oct 2009 23:26:29 +0000 (23:26 +0000)]
MFC r198152

 Only poll ukbd if KDB is active.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198151
thompsa [Thu, 29 Oct 2009 23:25:52 +0000 (23:25 +0000)]
MFC r198151

 Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
 all host controllers at the same time, we avoid problems where the BIOS will
 actually write to the USB registers of all the USB host controllers every time
 we handover one of them, and consequently reset the OS programmed values.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197999 (hrs)
thompsa [Thu, 29 Oct 2009 23:25:13 +0000 (23:25 +0000)]
MFC r197999 (hrs)

 Fix the 106/109 USB Japanese keyboard "underscore" issue.
 Sun Type 6 USB keyboard support added in rev 1.46 conflicted with
 some scan codes used in Japanese keyboards because the scan code
 conversion routine was ambiguous for the overlapped codes.

PR: ports/134005

git-svn-id: svn://svn.freebsd.org/base/stable/8@198658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197573
thompsa [Thu, 29 Oct 2009 23:24:41 +0000 (23:24 +0000)]
MFC r197573

 Add back endpoint swap detection that was disabled in an earlier driver
 conversion.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197572
thompsa [Thu, 29 Oct 2009 23:24:10 +0000 (23:24 +0000)]
MFC r197572

 Add new FTDI IDs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197570
thompsa [Thu, 29 Oct 2009 23:23:34 +0000 (23:23 +0000)]
MFC r197570

 Add experimental support for usb serial console and polled mode during DDB.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197569
thompsa [Thu, 29 Oct 2009 23:22:54 +0000 (23:22 +0000)]
MFC r197569

 Add a config number quirk for the ELSA_MODEM1

git-svn-id: svn://svn.freebsd.org/base/stable/8@198654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197568
thompsa [Thu, 29 Oct 2009 23:22:23 +0000 (23:22 +0000)]
MFC r197568

 add more device IDs

git-svn-id: svn://svn.freebsd.org/base/stable/8@198653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197567
thompsa [Thu, 29 Oct 2009 23:21:52 +0000 (23:21 +0000)]
MFC r197567

 Allow setting of MAC address for AXE based ethernet adapters.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197566
thompsa [Thu, 29 Oct 2009 23:21:20 +0000 (23:21 +0000)]
MFC r197566

 Increase the rx buffer size to 16384 bytes, this increases RX performance from
 50Mbps to 220Mbps on PLANEX GU-1000T.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197565
thompsa [Thu, 29 Oct 2009 23:20:47 +0000 (23:20 +0000)]
MFC r197565

 - Remove SAMSUNG_YP_U2 now that it is in the cam layer
 - Add quirk from Tobias Grosser for Western Mypassword

git-svn-id: svn://svn.freebsd.org/base/stable/8@198650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197564
thompsa [Thu, 29 Oct 2009 23:20:15 +0000 (23:20 +0000)]
MFC r197564

 Add new usbdev entries for Marvell, FTDI, Option and Western.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197563
thompsa [Thu, 29 Oct 2009 23:19:41 +0000 (23:19 +0000)]
MFC r197563

 Add basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197562
thompsa [Thu, 29 Oct 2009 23:18:59 +0000 (23:18 +0000)]
MFC r197562

 Add extra safety locking when clobbering xfer->flags_int.started in start and
 stop functions, because xfer->flags_int is also updated by the USB controller,
 under the controller lock.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197561
thompsa [Thu, 29 Oct 2009 23:18:27 +0000 (23:18 +0000)]
MFC r197561

 Correct buffer sizes used so that they match. The old code could give the
 impression that a overflow situation existed but was not possible.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197559
thompsa [Thu, 29 Oct 2009 23:17:54 +0000 (23:17 +0000)]
MFC r197559

 Add support for USB language selection.

PR: usb/138563

git-svn-id: svn://svn.freebsd.org/base/stable/8@198645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197558
thompsa [Thu, 29 Oct 2009 23:17:23 +0000 (23:17 +0000)]
MFC r197558

 Fix NULL-pointer dereference in usb_endpoint_foreach().

PR: usb/138389

git-svn-id: svn://svn.freebsd.org/base/stable/8@198644 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197556
thompsa [Thu, 29 Oct 2009 23:16:39 +0000 (23:16 +0000)]
MFC r197556

 Clear all interrupts rather than just SETUP packet.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198643 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197555
thompsa [Thu, 29 Oct 2009 23:16:00 +0000 (23:16 +0000)]
MFC r197555

 Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
 statements to zero.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197554
thompsa [Thu, 29 Oct 2009 23:15:26 +0000 (23:15 +0000)]
MFC r197554

 Import two PCI quirks from Linux

  - Add quirk for ATI SB600 and SB700 to free SMB controller
  - Correct schedule sleep time to 10us on the VIA ehci controller

git-svn-id: svn://svn.freebsd.org/base/stable/8@198641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197553
thompsa [Thu, 29 Oct 2009 23:14:39 +0000 (23:14 +0000)]
MFC r197553

 - clean up USB detach logic. There seems to be some problems detaching multiple
   USB HUBs connected in series from the root.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198640 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196826
thompsa [Thu, 29 Oct 2009 23:14:06 +0000 (23:14 +0000)]
MFC r196826

 Make umass(4) pass device USB serial number to CAM, making it possible
 to e.g. retrieve it using camcontrol(8).

git-svn-id: svn://svn.freebsd.org/base/stable/8@198639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196497
thompsa [Thu, 29 Oct 2009 23:13:36 +0000 (23:13 +0000)]
MFC r196497

 Remove redundant locking.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198638 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196496
thompsa [Thu, 29 Oct 2009 23:13:02 +0000 (23:13 +0000)]
MFC r196496

 Add a reminder comment to optimize bus_dmamap_sync calls.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196495
thompsa [Thu, 29 Oct 2009 23:12:29 +0000 (23:12 +0000)]
MFC r196495

 Add mass storage quirks.

PR:             usb/137138,usb/137226,usb/137789,usb/135372

git-svn-id: svn://svn.freebsd.org/base/stable/8@198636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196494
thompsa [Thu, 29 Oct 2009 23:11:48 +0000 (23:11 +0000)]
MFC r196494

 - fix uvisor support, mostly correct buffer sizes used.
 - correct device info flag for SONY Cli NR70V

git-svn-id: svn://svn.freebsd.org/base/stable/8@198635 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196493
thompsa [Thu, 29 Oct 2009 23:11:13 +0000 (23:11 +0000)]
MFC r196493

 - Fix false positive uipaq probe

git-svn-id: svn://svn.freebsd.org/base/stable/8@198634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196492
thompsa [Thu, 29 Oct 2009 23:10:41 +0000 (23:10 +0000)]
MFC r196492

 - fix CDC ethernet matching order so that the match flags get correct.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196491
thompsa [Thu, 29 Oct 2009 23:10:11 +0000 (23:10 +0000)]
MFC r196491

 We used force all of the GPIO pins low first and then
 enable the ones we want. This has been changed to better
 match the ADMtek's reference design to avoid setting the
 power-down configuration line of the PHY at the same time
 it is reset.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196490
thompsa [Thu, 29 Oct 2009 23:09:37 +0000 (23:09 +0000)]
MFC r196490

 - FIFO's are always opened separately in read and write direction even if the
   actual device is opened for read and write. Fix fflags check so that the UFM
   and URIO drivers work.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196488
thompsa [Thu, 29 Oct 2009 23:09:02 +0000 (23:09 +0000)]
MFC r196488

 - allow disabling "root_mount_hold()" by setting a sysctl/tunable at boot
 - remove some redundant initial explore code

git-svn-id: svn://svn.freebsd.org/base/stable/8@198630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197363: Update find(1) man page for -L/-delete interaction.
jilles [Thu, 29 Oct 2009 21:25:16 +0000 (21:25 +0000)]
MFC r197363: Update find(1) man page for -L/-delete interaction.

It is a bit unfortunate that the example to delete broken symlinks now uses
rm(1), but allowing this with -delete would require fixing fts(3) to not
imply FTS_NOCHDIR if FTS_LOGICAL is given (or hacks in the -delete option).

PR: bin/90687

git-svn-id: svn://svn.freebsd.org/base/stable/8@198628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197371: Mention that NUL characters are not allowed in sh(1) input.
jilles [Thu, 29 Oct 2009 21:13:57 +0000 (21:13 +0000)]
MFC r197371: Mention that NUL characters are not allowed in sh(1) input.

I do not consider this a bug because POSIX permits it and argument strings
and environment variables cannot contain '\0' anyway.

PR: bin/25542

git-svn-id: svn://svn.freebsd.org/base/stable/8@198624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198314
brueffer [Thu, 29 Oct 2009 16:30:48 +0000 (16:30 +0000)]
MFC: r198314

Add empty watchdogd_flags.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197930:
kib [Thu, 29 Oct 2009 16:28:21 +0000 (16:28 +0000)]
MFC r197930:
Postpone dropping fp till both kq_global and kqueue mutexes are
unlocked.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197389:
kib [Thu, 29 Oct 2009 16:24:39 +0000 (16:24 +0000)]
MFC r197389:
Do panic regardeless of execution mode at the moment of T_RESERVED trap.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197429:
kib [Thu, 29 Oct 2009 16:21:52 +0000 (16:21 +0000)]
MFC r197429:
Document osrel node for procfs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197428:
kib [Thu, 29 Oct 2009 16:19:58 +0000 (16:19 +0000)]
MFC r197428:
Add per-process osrel node to the procfs, to allow read and set p_osrel
value for the process.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197439:
jhb [Thu, 29 Oct 2009 16:00:27 +0000 (16:00 +0000)]
MFC 197439:
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198085:
jhb [Thu, 29 Oct 2009 15:39:18 +0000 (15:39 +0000)]
MFC 198085:
Add a manual page for BUS_BIND_INTR() and bus_bind_intr().

git-svn-id: svn://svn.freebsd.org/base/stable/8@198604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197649:
jhb [Thu, 29 Oct 2009 15:28:05 +0000 (15:28 +0000)]
MFC 197649:
Do not hold the ACPI A/C adapter lock when changing the power profile.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197648:
jhb [Thu, 29 Oct 2009 15:24:57 +0000 (15:24 +0000)]
MFC 197648:
Split the 'video' ACPI lock up into two locks to resolve a LOR with the
sysctl lock.  The 'video' lock now protects the 'bus' of video output
devices attached to a graphics adapter.  It is used when iterating over
the list of outputs, etc.  The 'video_output' lock is used to lock the
output-specific data similar to a driver lock for the individual video
outputs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196840:
jhb [Thu, 29 Oct 2009 15:17:59 +0000 (15:17 +0000)]
MFC 196840:
Fill the reverse RSS map with 0xff's so that the subsequent loop to
calculate the values will work properly.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197460:
jhb [Thu, 29 Oct 2009 15:13:36 +0000 (15:13 +0000)]
MFC 197460:
Remove unnecessary locking from attach().  This fixes a LOR between the
acpi_ibm lock and the sysctl lock.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196615:
jhb [Thu, 29 Oct 2009 15:09:54 +0000 (15:09 +0000)]
MFC 196615:
Extend the device pager to support different memory attributes on different
pages in an object.
- Add a new variant of d_mmap() currently called d_mmap2() which accepts
  an additional in/out parameter that is the memory attribute to use for
  the requested page.
- A driver either uses d_mmap() or d_mmap2() for all requests but not both.
  The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate
  that the driver provides a d_mmap2() handler instead of d_mmap().  This
  is done to make the change ABI compatible with existing drivers and
  MFC'able to 7 and 8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196555:
jhb [Thu, 29 Oct 2009 14:40:21 +0000 (14:40 +0000)]
MFC 196555:
- Use the headers from ACPI-CA to define various constants and structures
  for table layouts, etc. rather than homerolling our own structures and
  constants in acpidump.h.
- Verify the extended checksum on the RSDP.
- Handle new ACPI 3.0 fields in MADT including X2APIC entries and
  UIDs for local SAPICs.
- Add handling for new ACPI 3.0 flags in the FADT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198591 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 198487:
mav [Thu, 29 Oct 2009 10:38:17 +0000 (10:38 +0000)]
MFC rev. 198487:
Round timeout up when converting CAM milliseconds to ATA seconds.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 198488:
mav [Thu, 29 Oct 2009 10:35:50 +0000 (10:35 +0000)]
MFC rev. 198488:
Report SATA speeds to CAM, to not confuse users with low numbers logged.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 198481, 198482:
mav [Thu, 29 Oct 2009 10:05:08 +0000 (10:05 +0000)]
MFC rev. 198481, 198482:
Add two more VIA SATA chip IDs.

PR: kern/135057

git-svn-id: svn://svn.freebsd.org/base/stable/8@198576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 198480, 198483:
mav [Thu, 29 Oct 2009 09:58:16 +0000 (09:58 +0000)]
MFC rev. 198480, 198483:
Document new modularised ATA kernel modules and options.

PR:             kern/133162, amd64/139859

git-svn-id: svn://svn.freebsd.org/base/stable/8@198574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
mav [Thu, 29 Oct 2009 09:45:48 +0000 (09:45 +0000)]
Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
memory access.

PR: amd64/128686, amd64/132372, amd64/139156

git-svn-id: svn://svn.freebsd.org/base/stable/8@198572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198418
qingli [Wed, 28 Oct 2009 21:45:25 +0000 (21:45 +0000)]
MFC r198418

Use the correct option name in the preprocessor command to enable
or disable diagnostic messages.

Reviewed by: ru

git-svn-id: svn://svn.freebsd.org/base/stable/8@198567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198353
qingli [Wed, 28 Oct 2009 21:43:16 +0000 (21:43 +0000)]
MFC r198353

Verify "smp_started" is true before calling
sched_bind() and sched_unbind().

Reviewed by: kmacy

git-svn-id: svn://svn.freebsd.org/base/stable/8@198566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: Remove spurious README and an old version of the manpage.
jhb [Wed, 28 Oct 2009 21:08:20 +0000 (21:08 +0000)]
MFC: Remove spurious README and an old version of the manpage.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC of r197597, r198270, r198515:
edwin [Wed, 28 Oct 2009 21:07:42 +0000 (21:07 +0000)]
MFC of r197597, r198270, r198515:

MFC of tzdata2009n:
- Pakistan will go out DST on 1 October.
- Headsup for changes in Argentina.

MFC of tzdata2009o:
- Somoa has not moved to DST this year (comment only)
- Bangladesh stays on DST for now.
- Pakistan went back to standard time in 1 October 2009

MFC of tzdata2009p:
- Argentina does not go to DST this year.

Approved by: re (Ken Smith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198363
brueffer [Wed, 28 Oct 2009 17:46:05 +0000 (17:46 +0000)]
MFC: r198363

List more dependencies for these drivers. While here, convert
atapicam(4) to use our standard section 4 SYNOPSIS layout.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198313
brueffer [Wed, 28 Oct 2009 16:54:48 +0000 (16:54 +0000)]
MFC: r198313

Improve the description of the malofw kernel module installation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@198549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoPrepare for 8.0-RC2 builds.
kensmith [Sun, 25 Oct 2009 00:28:01 +0000 (00:28 +0000)]
Prepare for 8.0-RC2 builds.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198295:
ru [Sat, 24 Oct 2009 04:55:14 +0000 (04:55 +0000)]
MFC r198295:

Random number generator initialization cleanup:

- Introduce new SI_SUB_RANDOM point in boot sequence to make it
clear from where one may start using random(9).  It should be as
early as possible, so place it just after SI_SUB_CPU where we
have some randomness on most platforms via get_cyclecount().

- Move stack protector initialization to be after SI_SUB_RANDOM
as before this point we have no randomness at all.  This fixes
stack protector to actually protect stack with some random guard
value instead of a well-known one.

Note that this patch doesn't try to address arc4random(9) issues.
With current code, it will be implicitly seeded by stack protector
and hence will get the same entropy as random(9).  It will be
securely reseeded once /dev/random is feeded by some entropy from
userland.

Submitted by: Maxim Dounin <mdounin@mdounin.ru>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198434 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198174:
jhb [Fri, 23 Oct 2009 19:52:29 +0000 (19:52 +0000)]
MFC 198174:
Close a race with caching of -ve name lookups in the NFS client.
Specifically, clients only trust -ve cache entries while the directory
remains unchanged and discard any -ve cache entries for a directory when
they notice that the modification time of a directory entry changes.  The
race involves two concurrent lookups as follows:
- Thread A does a lookup for file 'foo' which sends a lookup RPC to the
  server.  The lookup fails and the server replies.
- The 'foo' file is created (either by the same client or a different
  client) updating the modification time on the parent directory of 'foo'.
- Thread B does a lookup for a different file 'bar' which updates the
  cached attributes of the parent directory of 'foo' to reflect the new
  modification time after 'foo' was created.
- Thread A finally resumes execution to parse the reply from the NFS
  server.  It adds a -ve cache entry and sets the cached value of the
  directory's modification time that is used for invalidating -ve cached
  lookups to the new modification time set by thread B.

At this point, future lookups of 'foo' will honor the -ve cached entry
until the cached entry is pushed out of the name cache's LRU or the
modification time of the parent directory is changed again by some other
change.  The fix is to read the directory's modification time before
sending the lookup RPC and use that cached modification time when setting
the directory's cached modification time.  Also, we do not add a -ve cache
entry if another thread has added -ve cache entry that set the directory's
cached modification time to a newer value than the value we read before
sending the lookup RPC.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198352
philip [Fri, 23 Oct 2009 14:43:17 +0000 (14:43 +0000)]
MFC r198352

  Make dhclient use bootpc (68) as the source port for unicast
  DHCPREQUEST packets instead of allowing the protocol stack to pick
  a random source port.

  This fixes the behaviour where dhclient would never transition
  from RENEWING to BOUND without going through REBINDING in networks
  which are paranoid about DHCP spoofing, such as most mainstream
  cable-broadband ISP networks.

Obtained from: OpenBSD
Reviewed by: brooks
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198376
thompsa [Fri, 23 Oct 2009 12:02:01 +0000 (12:02 +0000)]
MFC r198376

 Prevent wraparound of the timeout variable.

Submitted by: HPS
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198306
qingli [Thu, 22 Oct 2009 18:48:25 +0000 (18:48 +0000)]
MFC 198306

The flow-table function flowtable_route_flush() may be called
during system initialization time. Since the flow-table is
designed to maintain per CPU flow cache, the existing code
did not check whether "smp_started" is true before calling
sched_bind() and sched_unbind(), which triggers a page fault.

Reviewed by: jeff
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@198371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196863:
trasz [Thu, 22 Oct 2009 16:26:38 +0000 (16:26 +0000)]
MFC r196863:

Improve wording.

MFC r196941:

Prevent the line from wrapping.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198232
brueffer [Thu, 22 Oct 2009 08:34:20 +0000 (08:34 +0000)]
MFC: r198232

Powercrypt and NetSec seem to be defunct (webpages point to link farms
and a google search yields no alternative).  Remove the links but
keep the entries around for reference.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198307
thompsa [Wed, 21 Oct 2009 19:48:27 +0000 (19:48 +0000)]
MFC r198307

 Change from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device
 has been yanked, this works around a cam recounting bug when
 CAM_DEV_UNCONFIGURED is set late in the detach. In certain conditions the
 reference to the XPT device would not be released which would cause the usb
 explore thread to sleep forever on "simfree", preventing any new usb devices to
 be found/ejected on the bus.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198287:
kensmith [Wed, 21 Oct 2009 17:18:48 +0000 (17:18 +0000)]
MFC r198287:
  Update package list for 8.0-REL.

Reviewed by: re@, portmgr@
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198201:
kib [Wed, 21 Oct 2009 15:07:34 +0000 (15:07 +0000)]
MFC r198201:
Remove spurious call to priv_check(PRIV_VM_SWAP_NOQUOTA).
Call priv_check(PRIV_VM_SWAP_NORLIMIT) only when per-uid limit is
actually exceed.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198330 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198233 from head to stable/8:
rwatson [Wed, 21 Oct 2009 14:05:51 +0000 (14:05 +0000)]
Merge r198233 from head to stable/8:

  Clean up comments, white space, and style in pfil.c (VNET changes not
  MFC'd)

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198198 from head to stable/8:
rwatson [Wed, 21 Oct 2009 13:11:38 +0000 (13:11 +0000)]
Merge r198198 from head to stable/8:

  Line-wrap pfil.c so that it prints more nicely.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198219 from head to stable/8:
rwatson [Wed, 21 Oct 2009 09:53:55 +0000 (09:53 +0000)]
Merge r198219 from head to stable/8:

  Remove unused pfil_flags field in packet_filter_hook.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Note that ASF is now disabled by default in 8.0.
stas [Tue, 20 Oct 2009 22:11:17 +0000 (22:11 +0000)]
- Note that ASF is now disabled by default in 8.0.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198301
qingli [Tue, 20 Oct 2009 21:36:56 +0000 (21:36 +0000)]
MFC 198301

In the ARP callout timer expiration function, the current time_second
is compared against the entry expiration time value (that was set based
on time_second) to check if the current time is larger than the set
expiration time. Due to the +/- timer granularity value, the comparison
returns false, causing the alternative code to be executed. The
alternative code path freed the memory without removing that entry
from the table list, causing a use-after-free bug.

Reviewed by: discussed with kmacy
Approved by: re
Verified by: rnoland, yongari

git-svn-id: svn://svn.freebsd.org/base/stable/8@198308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC Revision 197277:
kan [Tue, 20 Oct 2009 19:05:43 +0000 (19:05 +0000)]
MFC Revision 197277:

Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198218 from head to stable/8:
rwatson [Tue, 20 Oct 2009 18:54:51 +0000 (18:54 +0000)]
Merge r198218 from head to stable/8:

  Sort function prototypes in pfil.h, clean up white space, and better
  align fields for printing.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198098:
weongyo [Tue, 20 Oct 2009 17:50:36 +0000 (17:50 +0000)]
MFC r198098:
  fixes a TX hang bug that it could happen when if_start callback didn't
  be restarted by full of the output queue.

  Tested by:      bsduser <bsd at acd.homelinux.org>

MFC r198099:
  fixes a TX hang that could be possible to happen when the trasfers are
  in the high speed that some drivers don't call if_start callback after
  marking ~IFF_DRV_OACTIVE.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198111
qingli [Tue, 20 Oct 2009 17:44:50 +0000 (17:44 +0000)]
MFC r198111

This patch fixes the following issues in the ARP operation:

1. There is a regression issue in the ARP code. The incomplete
   ARP entry was timing out too quickly (1 second timeout), as
   such, a new entry is created each time arpresolve() is called.
   Therefore the maximum attempts made is always 1. Consequently
   the error code returned to the application is always 0.
2. Set the expiration of each incomplete entry to a 20-second
   lifetime.
3. Return "incomplete" entries to the application.
4. The return error code was incorrect.

Reviewed by: kmacy
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@198298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Disable ASF by default in STABLE_8. This causes a lot
stas [Tue, 20 Oct 2009 16:41:23 +0000 (16:41 +0000)]
- Disable ASF by default in STABLE_8.  This causes a lot
  of problems on non-DELL branded machines with IPMI
  support.  The proposed fix was committed to HEAD but has
  not received much test coverage yet.

Discussed with: bz
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198196 from head to stable/8:
rwatson [Tue, 20 Oct 2009 16:22:31 +0000 (16:22 +0000)]
Merge r198196 from head to stable/8:

  Rewrap ip_input() comment so that it prints more nicely.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197934:
kib [Tue, 20 Oct 2009 13:34:41 +0000 (13:34 +0000)]
MFC r197934:
Map PIE binaries at non-zero base address.

MFC r198202:
Honour non-zero mapbase for PIE binaries. Inform interpreter-less PIE
binary about its relocbase.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197933:
kib [Tue, 20 Oct 2009 13:32:28 +0000 (13:32 +0000)]
MFC r197933:
Define architectural load bases for PIE binaries.

MFC r198203 (by marius):
Change load base for sparc to match default gcc memory layout model.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197313:
kensmith [Tue, 20 Oct 2009 13:32:18 +0000 (13:32 +0000)]
MFC r197313:
Build a separate livefs CD for sparc64.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197932:
kib [Tue, 20 Oct 2009 13:30:06 +0000 (13:30 +0000)]
MFC r197932:
Do not map elf segments of zero length.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197931:
kib [Tue, 20 Oct 2009 13:26:58 +0000 (13:26 +0000)]
MFC r197931:
Apply relocations for PIE binary ELF data structures pointers in rtld.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198189: Check error of dlfunc(3).
ume [Tue, 20 Oct 2009 11:52:39 +0000 (11:52 +0000)]
MFC r198189: Check error of dlfunc(3).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198276 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198126:
jhb [Mon, 19 Oct 2009 19:40:05 +0000 (19:40 +0000)]
MFC 198126:
Fix a sign bug in the handling of nice priorities when computing the
interactive score for a thread.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198079:
jhb [Mon, 19 Oct 2009 18:31:39 +0000 (18:31 +0000)]
MFC 198079:
Use zfs_read() instead of xfsread() to read /boot.config.  xfsread() fails
short read requests, so the result was that a /boot.config smaller than 512
bytes was ignored.  boot2 uses fsread() instead of xfsread() to read
/boot.config already, so this makes zfsboot more like boot2.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198125
brueffer [Mon, 19 Oct 2009 08:43:11 +0000 (08:43 +0000)]
MFC: r198125

Use our standard section 4 SYNOPSIS.

Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r198118 from head to stable/8:
rwatson [Sun, 18 Oct 2009 15:58:57 +0000 (15:58 +0000)]
Merge r198118 from head to stable/8:

  Print routing statistics as unsigned short rather than unsigned int,
  otherwise sign extension leads to unlikely values when in the negative
  range of the signed short structure fields that hold the statistics.
  The type used to hold routing statistics is arguably also incorrect.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197975, 197977, 197980, 198027:
rpaulo [Sat, 17 Oct 2009 13:42:23 +0000 (13:42 +0000)]
MFC 197975, 197977, 197980, 198027:
Update for latest 802.11s changes in meshconf format.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197995, 198020:
bland [Fri, 16 Oct 2009 09:29:06 +0000 (09:29 +0000)]
MFC r197995, 198020:

Link GSS mechanics modules against libgssapi so they will not fail due
unresolved symbol errors when in turn libgssapi was loaded with RTLD_LOCAL
flag set (which is the default).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197947:
dougb [Fri, 16 Oct 2009 00:17:09 +0000 (00:17 +0000)]
MFC r197947:

In regards to the "Starting foo:" type messages at boot time, create
and employ a more generic solution, and use it in the individual rc.d
scripts that also have an $rc_quiet test:

1. Add check_startmsgs() to rc.subr.
2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute
variations of [ -z "$rc_quiet" ] with check_startmsgs
3. In savecore add a trailing '.' to the end of the message to make it
more consistent with other scripts.
4. In newsyslog remove a : before the terminal '.' since we do not
expect there to be anything printed out in between to make it more
consistent.
5. In the following scripts change "quotes" to 'quotes' where no
variables exist in the message: savecore pf newsyslog
6. [Does not apply in RELENG_8]
7. In the following scripts separate the "Starting foo:" from the
terminal '.' to make them more consistent: moused hostname pf
8. In nfsclient move the message to its own line to avoid a style bug
9. In pf rc_quiet does not apply to the _stop method, so remove the
test there.
10. In motd add 'quotes' around the terminal '.' for consistency

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197298:
rmacklem [Thu, 15 Oct 2009 19:50:00 +0000 (19:50 +0000)]
MFC r197298:
Change the default transport protocol for use by the Mount protocol
and the NFS Null RPC done by mount_nfs from UDP to TCP, so that it is
consistent with the kernel, which already uses NFS over TCP by
default. Without this change, doing an NFS mount
against a server that only supports UDP results in an unusable
mount point if a transport protocol option wasn't specified for the
mount.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdd a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
rwatson [Thu, 15 Oct 2009 14:39:59 +0000 (14:39 +0000)]
Add a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
can access NFS client symbols.

Discussed with: kib
Reported by: markm
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198133 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197868.
tuexen [Wed, 14 Oct 2009 17:26:05 +0000 (17:26 +0000)]
MFC r197868.
Use correct arguments when calling SCTP_RTALLOC().
Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix typo which has survived amazingly long!
eri [Wed, 14 Oct 2009 15:32:46 +0000 (15:32 +0000)]
Fix typo which has survived amazingly long!

Reviewed by: mlaier(mentor)
Approved by: re(kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197958:
kib [Wed, 14 Oct 2009 14:26:19 +0000 (14:26 +0000)]
MFC r197958:
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196439:
dougb [Wed, 14 Oct 2009 03:31:37 +0000 (03:31 +0000)]
MFC r196439:

Fix the typo mentioned in the PR, and one additional.
Fix caps while I'm here.

PR: conf/138087
Submitted by: Chris Petrik <c.petrik.sosa@gmail.com>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197476:
attilio [Tue, 13 Oct 2009 13:03:31 +0000 (13:03 +0000)]
MFC r197476:
In function do_rw_wrlock, when a writer got an error and before returning,
check if there are readers blocked by us via URWLOCK_WRITE_WAITERS flag,
and resume the readers. The error must be EAGAIN, otherwise there must
have memory problem, and nobody can rescue the buggy application.

Approved by: re (kib), davidxu

git-svn-id: svn://svn.freebsd.org/base/stable/8@198030 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197942:
kib [Tue, 13 Oct 2009 09:24:51 +0000 (09:24 +0000)]
MFC r197942:
Refine r195509, instead of checking that vnode type is VBAD, that is
set quite late in the revocation path, properly verify that vnode is
not doomed before calling VOP.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198025 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f