]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMFV r253784:
smh [Tue, 30 Jul 2013 20:45:27 +0000 (20:45 +0000)]
MFV r253784:

Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to
pthread_join prior to fd close.

This was introduced by r251646 (MFV r251644)

Illumos ZFS issue:
  3909 "zfs send -D" does not work

MFC after: 1 day

10 years agoMFV r253780:
delphij [Tue, 30 Jul 2013 20:37:32 +0000 (20:37 +0000)]
MFV r253780:

To quote Illumos #3875:

The problem here is that if we ever end up in the error
path, we drop the locks protecting access to the zfsvfs_t
prior to forcibly unmounting the filesystem. Because z_os
is NULL, any thread that had already picked up the zfsvfs_t
and was sitting in ZFS_ENTER() when we dropped our locks
in zfs_resume_fs() will now acquire the lock, attempt to
use z_os, and panic.

Illumos ZFS issues:
  3875 panic in zfs_root() after failed rollback

MFC after: 2 weeks

10 years agoMFC'ing to 9.2.
obrien [Tue, 30 Jul 2013 19:21:36 +0000 (19:21 +0000)]
MFC'ing to 9.2.

10 years agoCheck for ipmi_attached in ipmi_isa_probe as a suggested alternative to
sbruno [Tue, 30 Jul 2013 18:54:24 +0000 (18:54 +0000)]
Check for ipmi_attached in ipmi_isa_probe as a suggested alternative to
ipmi_isa_attach.  This keeps unintended but harmless noise about "ipmi1"
from appearing in the boot up sequence.

Submitted by: jbh@ (suggested by)
Sponsored by: Yahoo! Inc.

10 years agoempirical testing showed that 3 seconds is just too slow for GET_DEVICE_ID
sbruno [Tue, 30 Jul 2013 18:44:29 +0000 (18:44 +0000)]
empirical testing showed that 3 seconds is just too slow for GET_DEVICE_ID
to return on newer Dell hardware.  Bump to 6 second timeouts until someone
has a better idea on how to handle this

Reviewed by: jhb@
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years agoAfter discussions, revert svn r253708.
sbruno [Tue, 30 Jul 2013 18:41:36 +0000 (18:41 +0000)]
After discussions, revert svn r253708.

Changelog for 253708 was completely wrong and the code implemented something
non-standard for the wrong reasons.

Sponsored by: Yahoo! Inc.

10 years agogrep -i does not work for simple patterns and single byte locales, like
ache [Tue, 30 Jul 2013 18:16:43 +0000 (18:16 +0000)]
grep -i does not work for simple patterns and single byte locales, like
LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter>
Fix it.

MFC after:      3 days

10 years agoFix a printf typo.
scottl [Tue, 30 Jul 2013 17:35:06 +0000 (17:35 +0000)]
Fix a printf typo.

Obtained from: LSI

10 years agoApply a casting sledgehammer.
jhb [Tue, 30 Jul 2013 16:20:54 +0000 (16:20 +0000)]
Apply a casting sledgehammer.

Submitted by: dhw

10 years agoUnbreak sparc64 LINT. Need to fix this correctly at some point in the future.
rpaulo [Tue, 30 Jul 2013 16:17:30 +0000 (16:17 +0000)]
Unbreak sparc64 LINT. Need to fix this correctly at some point in the future.

10 years agoAllow three IOCTLs to be used on suspended pool, restoring state that
mav [Tue, 30 Jul 2013 14:50:44 +0000 (14:50 +0000)]
Allow three IOCTLs to be used on suspended pool, restoring state that
existed before IOCTL code refactoring merged change 4445fffb from illumos
at r248571.

This change allows `zpool clear` to be used again to recover suspended pool.
It seems the only was supposed by the code to restore pool operation after
reconnecting lost disks that were required for data completeness.  There
are still cases where `zpool clear` command can just safely stuck due to
deadlocks inside ZFS kernel part, but probably that is better then having
no chances to recover at all.

10 years agoInclude an Accept header in requests.
des [Tue, 30 Jul 2013 13:07:55 +0000 (13:07 +0000)]
Include an Accept header in requests.

PR: kern/180917
MFC after: 1 week

10 years agoAdd Michael Gmelin's name to the copyright statement.
des [Tue, 30 Jul 2013 13:05:51 +0000 (13:05 +0000)]
Add Michael Gmelin's name to the copyright statement.

10 years agoAdd NO_RC16 quirk to make da driver avoid using READ CAPACITY(16) command
mav [Tue, 30 Jul 2013 13:00:09 +0000 (13:00 +0000)]
Add NO_RC16 quirk to make da driver avoid using READ CAPACITY(16) command
if possible.  Use it for Kingston JetFlash USB sticks, that are known to
return garbage in response to that command.

10 years agoPull in r186696 from upstream clang trunk:
dim [Tue, 30 Jul 2013 12:33:21 +0000 (12:33 +0000)]
Pull in r186696 from upstream clang trunk:

  This patch implements __get_cpuid_max() as an inline and __cpuid()
  and __cpuid_count() as macros to be compatible with GCC's cpuid.h.
  It also adds bit_<foo> constants for the various feature bits as
  described in version 039 (May 2011) of Intel's SDM Volume 2 in the
  description of the CPUID instruction.  The list of bit_<foo>
  constants is a bit exhaustive (GCC doesn't do near this many).  More
  bits could be added from a newer version of SDM if desired.

  Patch by John Baldwin!

This should fix several ports which depend on this functionality being
available.

MFC after: 1 week

10 years agoFix up paths after r253790.
pluknet [Tue, 30 Jul 2013 08:09:48 +0000 (08:09 +0000)]
Fix up paths after r253790.
While here, use $? contraction.

Reported by: O. Hartmann

10 years agoMove runfw to modules/usb.
rpaulo [Tue, 30 Jul 2013 02:26:06 +0000 (02:26 +0000)]
Move runfw to modules/usb.
While there, respect MK_SOURCELESS_UCODE.

Discussed with: kevlo

10 years agoImport OpenBSD's rsu(4) WLAN driver.
rpaulo [Tue, 30 Jul 2013 02:07:57 +0000 (02:07 +0000)]
Import OpenBSD's rsu(4) WLAN driver.
Support chipsets are the Realtek RTL8188SU, RTL8191SU, and RTL8192SU.

Many thanks to Idwer Vollering for porting/writing the man page and for
testing.

Reviewed by: adrian, hselasky
Obtained from: OpenBSD
Tested by: kevlo, Idwer Vollering <vidwer at gmail.com>

10 years agoThe errata 727915 requires a different workaround for r2p0, we have to
cognet [Mon, 29 Jul 2013 21:45:39 +0000 (21:45 +0000)]
The errata 727915 requires a different workaround for r2p0, we have to
explicitely clean/invalidate every cache line using way/set operations.

10 years agoRemove useless cache operations.
cognet [Mon, 29 Jul 2013 21:32:57 +0000 (21:32 +0000)]
Remove useless cache operations.

10 years agoDecouple yarrow from random(4) device.
obrien [Mon, 29 Jul 2013 20:58:09 +0000 (20:58 +0000)]
Decouple yarrow from random(4) device.

* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien

10 years agoAdd a missing prototype.
jhb [Mon, 29 Jul 2013 20:48:10 +0000 (20:48 +0000)]
Add a missing prototype.

Pointy hat: me

10 years agoDecouple yarrow from random(4) device.
obrien [Mon, 29 Jul 2013 20:26:27 +0000 (20:26 +0000)]
Decouple yarrow from random(4) device.

* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien

10 years agoUnbreak sysctl ABI changes introduced in r253662
zont [Mon, 29 Jul 2013 18:48:51 +0000 (18:48 +0000)]
Unbreak sysctl ABI changes introduced in r253662

Requested by: bde

10 years agoVarious fixes to the mlxen(4) driver:
jhb [Mon, 29 Jul 2013 18:44:52 +0000 (18:44 +0000)]
Various fixes to the mlxen(4) driver:
- Remove an incorrect assertion that can trigger when downing an interface.
- Stop the interface during detach to avoid panics when unloading the
  driver.
- A few locking fixes to be more consistent with other FreeBSD drivers:
  - Protect if_drv_flags with the driver lock, not atomic ops
  - Hold the driver lock when adjusting multicast state.
  - Hold the driver lock while adjusting if_capenable.

PR: kern/180791 [1,2]
Submitted by: Shakar Klein @ Mellanox [1,2]
MFC after: 3 days

10 years ago[fixup] add Makefile changes that should have been committed in r253772
avg [Mon, 29 Jul 2013 17:03:42 +0000 (17:03 +0000)]
[fixup] add Makefile changes that should have been committed in r253772

MFC after: 3 weeks
X-MFC with: r253772

10 years agodtrace disassembler: take the latest/last CDDL code from OpenSolaris
avg [Mon, 29 Jul 2013 16:56:38 +0000 (16:56 +0000)]
dtrace disassembler: take the latest/last CDDL code from OpenSolaris

OpenSolaris version is:
13108:33bb8a0301ab
6762020 Disassembly support for Intel Advanced Vector Extensions (AVX)

This corresponds to Illumos-gate (github) version
ab47273fedff893c8ae22ec39ffc666d4fa6fc8b

MFC after: 3 weeks

10 years agoFix a possible NULL-pointer dereference on the pfsync(4) reconfiguration.
ae [Mon, 29 Jul 2013 13:17:18 +0000 (13:17 +0000)]
Fix a possible NULL-pointer dereference on the pfsync(4) reconfiguration.

Reported by: Eugene M. Zheganin

10 years agoExplicitely include <machine/pcb.h>, so that we get the definition of
cognet [Mon, 29 Jul 2013 12:55:37 +0000 (12:55 +0000)]
Explicitely include <machine/pcb.h>, so that we get the definition of
struct pcb.

Submitted by: Zbyszek Bodek <zbb@semihalf.com>
Pointy hat to:  cognet

10 years agoInclude stdint.h to fix build.
ae [Mon, 29 Jul 2013 12:49:32 +0000 (12:49 +0000)]
Include stdint.h to fix build.

Pointed by: Olivier Cochard-LabbĂ©

10 years agoRestore the longer form of the _Generic. The short form does not work in C++.
theraven [Mon, 29 Jul 2013 12:33:03 +0000 (12:33 +0000)]
Restore the longer form of the _Generic.  The short form does not work in C++.

10 years agoReenable the isnan(double) / isinf(double) declarations when targeting C89 + SUSv2...
theraven [Mon, 29 Jul 2013 08:32:13 +0000 (08:32 +0000)]
Reenable the isnan(double) / isinf(double) declarations when targeting C89 + SUSv2 mode.

10 years agoDefine KDB_STOPPEDPCB, so that we can access the backtraces of threads running
cognet [Mon, 29 Jul 2013 08:07:35 +0000 (08:07 +0000)]
Define KDB_STOPPEDPCB, so that we can access the backtraces of threads running
on other cores.

10 years agoFix a debugging hack that snuck in.
rpaulo [Mon, 29 Jul 2013 06:57:45 +0000 (06:57 +0000)]
Fix a debugging hack that snuck in.

10 years agoFirmware module for the upcoming rsu(4) driver.
rpaulo [Mon, 29 Jul 2013 06:55:28 +0000 (06:55 +0000)]
Firmware module for the upcoming rsu(4) driver.

10 years agoRealtek's RTL8712 firmware blob needed by the upcoming rsu(4) driver.
rpaulo [Mon, 29 Jul 2013 06:53:42 +0000 (06:53 +0000)]
Realtek's RTL8712 firmware blob needed by the upcoming rsu(4) driver.

10 years agoFix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters
hselasky [Mon, 29 Jul 2013 05:54:13 +0000 (05:54 +0000)]
Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters
work on ARM, MIPS and similar platforms, where alignment matters.

MFC after: 1 week
Reported by: XiaoQI Ge <ghw@7axu.com>

10 years agoUse the streaming functions for reading/writing the BAP fields on wi(4). This
jhibbits [Mon, 29 Jul 2013 05:39:20 +0000 (05:39 +0000)]
Use the streaming functions for reading/writing the BAP fields on wi(4).  This
fixes wi(4) device access on big endian architectures.

PR: kern/164499
Reviewed by: adrian
Obtained from: NetBSD

10 years agoFix detection of arm ABIs
bapt [Sun, 28 Jul 2013 20:11:31 +0000 (20:11 +0000)]
Fix detection of arm ABIs

Submitted by: andrew
Obtained from: pkg git

10 years agoPartially close race between calls of orphan() method from GEOM and close()
mav [Sun, 28 Jul 2013 20:07:34 +0000 (20:07 +0000)]
Partially close race between calls of orphan() method from GEOM and close()
method from ZFS core, that reliably causes use-after-free panic if SSD vdev
detached during inititial erase.

10 years agosin6 should be assigned before the loop.
hrs [Sun, 28 Jul 2013 20:02:41 +0000 (20:02 +0000)]
sin6 should be assigned before the loop.

10 years agoFix returning incorrect bio_resid value with failed BIO_DELETE requests.
mav [Sun, 28 Jul 2013 19:56:08 +0000 (19:56 +0000)]
Fix returning incorrect bio_resid value with failed BIO_DELETE requests.
Neither residual length reported for ATA/SCSI command nor one from another
BIO_DELETE request are in any way related to the value to be returned.

10 years ago- Relax the restriction on the member interfaces with LLAs. Two or more
hrs [Sun, 28 Jul 2013 19:49:39 +0000 (19:49 +0000)]
- Relax the restriction on the member interfaces with LLAs.  Two or more
  LLAs on the member interfaces are actually harmless when the parent
  interface does not have a LLA.

- Add net.link.bridge.allow_llz_overlap.  This is a knob to allow LLAs on
  a bridge and the member interfaces at the same time.  The default is 0.

Pointed out by: ume
MFC after: 3 days

10 years agoRevert r253748,253749
avg [Sun, 28 Jul 2013 18:44:17 +0000 (18:44 +0000)]
Revert r253748,253749

This WIP should not have been committed yet.

Pointyhat to: avg

10 years agoremove needless inclusion of machine/cpu.h in userland
avg [Sun, 28 Jul 2013 18:35:43 +0000 (18:35 +0000)]
remove needless inclusion of machine/cpu.h in userland

MFC after: 21 days

10 years agoput contents of cpu.h under _KERNEL
avg [Sun, 28 Jul 2013 18:32:27 +0000 (18:32 +0000)]
put contents of cpu.h under _KERNEL

no userland-serviceable parts inside

MFC after: 20 days

10 years agox86: detect mwait capabilities and extensions, when present
avg [Sun, 28 Jul 2013 17:54:42 +0000 (17:54 +0000)]
x86: detect mwait capabilities and extensions, when present

Reviewed by: kib (earlier amd64-only version)
MFC after: 2 weeks

10 years agoRename the existing std.imx and imx.files to std.imx51 and files.imx51, to
ian [Sun, 28 Jul 2013 17:37:30 +0000 (17:37 +0000)]
Rename the existing std.imx and imx.files to std.imx51 and files.imx51, to
pave the way for adding imx6 support.

10 years agoFix compilation when debugging is disabled.
adrian [Sun, 28 Jul 2013 17:35:19 +0000 (17:35 +0000)]
Fix compilation when debugging is disabled.

10 years agoFix printf of seconds for systems where time_t is 64 bits.
ian [Sun, 28 Jul 2013 16:56:31 +0000 (16:56 +0000)]
Fix printf of seconds for systems where time_t is 64 bits.

10 years agoCommit the missing header change.
adrian [Sun, 28 Jul 2013 16:50:45 +0000 (16:50 +0000)]
Commit the missing header change.

10 years ago- Add const-qualifiers to the arguments of isonum_*().
marius [Sun, 28 Jul 2013 12:29:10 +0000 (12:29 +0000)]
- Add const-qualifiers to the arguments of isonum_*().
- According to ISO 9660 7.1.2, isonum_712() should return a signed value.
- Try to get isonum_*() closer to style(9).

10 years agoWhen creation of the v_pollinfo raced and our instance of vpollinfo
kib [Sun, 28 Jul 2013 06:59:29 +0000 (06:59 +0000)]
When creation of the v_pollinfo raced and our instance of vpollinfo
must be destroyed, knlist_clear() and seldrain() calls could be
avoided, since vpollinfo was not used.  More, the knlist_clear()
calling protocol requires the knlist locked, which is not true at the
call site.

Split the destruction into the helper destroy_vpollinfo_free(), and
call it when raced, instead of destroy_vpollinfo().

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after:   3 days

10 years agoRemove EOL whitespace.
joel [Sun, 28 Jul 2013 06:16:12 +0000 (06:16 +0000)]
Remove EOL whitespace.

10 years agomdoc and language improvements.
joel [Sun, 28 Jul 2013 06:15:25 +0000 (06:15 +0000)]
mdoc and language improvements.

10 years agoUpdate subversion-1.8.0 -> 1.8.1. Update supporting
peter [Sun, 28 Jul 2013 06:02:40 +0000 (06:02 +0000)]
Update subversion-1.8.0 -> 1.8.1.  Update supporting
components: apr-1.4.6 -> 1.4.8 and apr-util-1.4.1 -> 1.5.2.

This is a post point-zero bug-fix / fix-sharp-edges release, including
some workarounds for UTF-8 for people who haven't yet turned on WITH_ICONV.

10 years agoImport Apache apr-util-1.5.2 into vendor staging area.
peter [Sun, 28 Jul 2013 05:14:54 +0000 (05:14 +0000)]
Import Apache apr-util-1.5.2 into vendor staging area.

10 years agoRefactor the VAP transmit path code into a utility function that both
adrian [Sun, 28 Jul 2013 04:53:00 +0000 (04:53 +0000)]
Refactor the VAP transmit path code into a utility function that both
the normal and the mesh transmit paths can use.

The API is a bit horrible because it both consumes the mbuf and frees
the node reference regardless of whether it succeeds or not.
It's a hold-over from how the code behaves; it'd be nice to have it
not free the node reference / mbuf if TX fails and let the caller
decide what to do.

10 years agoDTrace: re-apply r249426 now that the underlying issues have been solved.
pfg [Sun, 28 Jul 2013 01:02:17 +0000 (01:02 +0000)]
DTrace: re-apply r249426 now that the underlying issues have been solved.

Merge change from illumos:

3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
     compilation token
3521 clean up dtrace unit tests

Illumos Revision: e98f46c

Reference:
https://www.illumos.org/issues/3519
https://www.illumos.org/issues/3520
https://www.illumos.org/issues/3521

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 1 month

10 years agoDTrace: re-merge remainder of r249367 (original from Illumos).
pfg [Sun, 28 Jul 2013 00:45:20 +0000 (00:45 +0000)]
DTrace: re-merge remainder of r249367 (original from Illumos).

Bring back some important fixes from Illumos:

3022 DTrace: keys should not affect the sort order when sorting by value
3023 it should be possible to dereference dynamic variables
3024 D integer narrowing needs some work

We particularly avoid the LD_NOLAZYLOAD changes that Illumos made
as those don't apply to FreeBSD and were causing problems in
interactive mode.

Illumos Revision: 13758:23432da34147

Reference:

https://www.illumos.org/issues/3022
https://www.illumos.org/issues/3023
https://www.illumos.org/issues/3024

MFC after: 1 month
Tested by: markj

10 years agoSynchronize device cache on close only if there were some write operations.
mav [Sat, 27 Jul 2013 22:44:55 +0000 (22:44 +0000)]
Synchronize device cache on close only if there were some write operations.
While these operations are not really needed otherwise, at least for SCSI
they may cause extra errors if some other initiator holds write exclusive
reservation on the LUN (SYNCHRONIZE CACHE handled as "write" operation).

10 years agoProvide some examples for watchdogd usage.
alfred [Sat, 27 Jul 2013 22:23:32 +0000 (22:23 +0000)]
Provide some examples for watchdogd usage.

10 years agoOops, revert unwanted part of r253721.
mav [Sat, 27 Jul 2013 22:21:10 +0000 (22:21 +0000)]
Oops, revert unwanted part of r253721.

10 years agoDetect unsupported PREVENT ALLOW MEDIUM REMOVAL and SYNCHRONIZE CACHE(10)
mav [Sat, 27 Jul 2013 22:19:34 +0000 (22:19 +0000)]
Detect unsupported PREVENT ALLOW MEDIUM REMOVAL and SYNCHRONIZE CACHE(10)
to not spam devices with useless commands and logs with errors.

10 years agoUse kern_ioctl() rather than ioctl() for testing the FBT provider, since the
markj [Sat, 27 Jul 2013 21:31:48 +0000 (21:31 +0000)]
Use kern_ioctl() rather than ioctl() for testing the FBT provider, since the
latter doesn't exist in FreeBSD. All the tests under fbtprovider pass now.

10 years agoFix watchdog pretimeout.
alfred [Sat, 27 Jul 2013 20:47:01 +0000 (20:47 +0000)]
Fix watchdog pretimeout.

The original API calls for pow2ns, however the new APIs from
Linux call for seconds.

We need to be able to convert to/from 2^Nns to seconds in both
userland and kernel to fix this and properly compare units.

10 years agoPut in commented-out version of beastie menu commands
kientzle [Sat, 27 Jul 2013 18:19:28 +0000 (18:19 +0000)]
Put in commented-out version of beastie menu commands
so that non-i386 users can easily experiment with this.

10 years agoInstall Forth infrastructure along with ubldr.
kientzle [Sat, 27 Jul 2013 18:18:46 +0000 (18:18 +0000)]
Install Forth infrastructure along with ubldr.

Note:  loader.rc is installed as loader.rc.sample
so that by default, none of this is actually used.

10 years agoupdate ciss debugger command to iterate over multiple raid controllers up to
sbruno [Sat, 27 Jul 2013 17:20:43 +0000 (17:20 +0000)]
update ciss debugger command to iterate over multiple raid controllers up to
max controllers supported

PR: kern/179932
Reviewed by: Markus Gebert <markus.gebert@hostpoint.ch>
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years agoMFgem r251960: re-check the mgt device object for the requested page
kib [Sat, 27 Jul 2013 16:44:37 +0000 (16:44 +0000)]
MFgem r251960: re-check the mgt device object for the requested page
after the object was relocked.

Tested by: dumbbell
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoThe pmap_qenter() and pmap_qremove() perform TLB invalidation on its
kib [Sat, 27 Jul 2013 16:42:29 +0000 (16:42 +0000)]
The pmap_qenter() and pmap_qremove() perform TLB invalidation on its
own, no need to call pmap_invalidate_range() one more time.

Noted by: alc
MFC after: 1 week

10 years agoAt some point after stable/7 the ACPI and ISA interfaces to the IPMI controller
sbruno [Sat, 27 Jul 2013 16:32:34 +0000 (16:32 +0000)]
At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller
no longer have the parent in the device tree.  This causes the identify
function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface

Move the check for ipmi_attached out of the ipmi_isa_attach function and into
the ipmi_isa_identify function.  Remove the check of the device tree for
ipmi devices attached.

This probing appears to make Broadcom management firmware on Dell machines
crash and emit NMI EISA warnings at various times requiring power cycles
of the machines to restore.

Bump MAX_TIMEOUT to 6 seconds as a hack for super slow IPMI interfaces that
need longer to respond to our intial probes on startup.

Tested on Dell R410, R510, R815, HP DL160G6

This is MFC candidate for 9.2R

Reviewed by: peter
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years ago- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
marius [Sat, 27 Jul 2013 15:28:31 +0000 (15:28 +0000)]
- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
  rather than NetBSD.
- Correctly set the Expiration Time in the Primary Volume Descriptor;
  according to ISO 9660 8.4.26.1 unspecified date and time are denoted
  by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1]
- Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read
  as unsigned byte. [2]
  Note: This is according to ISO 9660 9.1.10.
- Rock Ridge TF entries should use a length of 5, because after the 4
  bytes of generic SUSP header there is one byte of flags. See typedef
  of ISO_RRIP_TF in iso9660_rrip.h. [1]

Submitted by: Thomas Schmitt [1]
Obtained from: NetBSD [2]
MFC after: 3 days

10 years agoIntroduce 3 seconds timeout on `graid stop` command (mostly with -f flag).
mav [Sat, 27 Jul 2013 15:02:19 +0000 (15:02 +0000)]
Introduce 3 seconds timeout on `graid stop` command (mostly with -f flag).
Since completion waiting goes in g_event thread, it may cause GEOM deadlock
if consumer on top (for example, ZFS) uses g_event thread for closing.

10 years agoImplement some function tracing.
adrian [Sat, 27 Jul 2013 14:58:23 +0000 (14:58 +0000)]
Implement some function tracing.

Submitted by: Cedric GROSS <cg@cgross.info>

10 years agoDisplay a string instead of a numeric code in the linkdnrc sysctl.
np [Sat, 27 Jul 2013 07:43:43 +0000 (07:43 +0000)]
Display a string instead of a numeric code in the linkdnrc sysctl.

Submitted by: gnn@

10 years agoExpand the list of devices claimed by cxgbe(4).
np [Sat, 27 Jul 2013 00:53:07 +0000 (00:53 +0000)]
Expand the list of devices claimed by cxgbe(4).

10 years agoImprove page LRU quality and simplify the logic.
jeff [Fri, 26 Jul 2013 23:22:05 +0000 (23:22 +0000)]
Improve page LRU quality and simplify the logic.

 - Don't short-circuit aging tests for unmapped objects.  This biases
   against unmapped file pages and transient mappings.
 - Always honor PGA_REFERENCED.  We can now use this after soft busying
   to lazily restart the LRU.
 - Don't transition directly from active to cached bypassing the inactive
   queue.  This frees recently used data much too early.
 - Rename actcount to act_delta to be more consistent with use and meaning.

Reviewed by: kib, alc
Sponsored by: EMC / Isilon Storage Division

10 years agoFix Denial of Service vulnerability in named(8). [13:07]
delphij [Fri, 26 Jul 2013 22:40:17 +0000 (22:40 +0000)]
Fix Denial of Service vulnerability in named(8). [13:07]

Security: CVE-2013-4854
Security: FreeBSD-SA-13:07.bind
Approved by: so

10 years agoAdd support for packet-sniffing tracers to cxgbe(4). This works with
np [Fri, 26 Jul 2013 22:04:11 +0000 (22:04 +0000)]
Add support for packet-sniffing tracers to cxgbe(4).  This works with
all T4 and T5 based cards and is useful for analyzing TSO, LRO, TOE, and
for general purpose monitoring without tapping any cxgbe or cxl ifnet
directly.

Tracers on the T4/T5 chips provide access to Ethernet frames exactly as
they were received from or transmitted on the wire.  On transmit, a
tracer will capture a frame after TSO segmentation, hw VLAN tag
insertion, hw L3 & L4 checksum insertion, etc.  It will also capture
frames generated by the TCP offload engine (TOE traffic is normally
invisible to the kernel).  On receive, a tracer will capture a frame
before hw VLAN extraction, runt filtering, other badness filtering,
before the steering/drop/L2-rewrite filters or the TOE have had a go at
it, and of course before sw LRO in the driver.

There are 4 tracers on a chip.  A tracer can trace only in one direction
(tx or rx).  For now cxgbetool will set up tracers to capture the first
128B of every transmitted or received frame on a given port.  This is a
small subset of what the hardware can do.  A pseudo ifnet with the same
name as the nexus driver (t4nex0 or t5nex0) will be created for tracing.
The data delivered to this ifnet is an additional copy made inside the
chip.  Normal delivery to cxgbe<n> or cxl<n> will be made as usual.

/* watch cxl0, which is the first port hanging off t5nex0. */
# cxgbetool t5nex0 tracer 0 tx0  (watch what cxl0 is transmitting)
# cxgbetool t5nex0 tracer 1 rx0  (watch what cxl0 is receiving)
# cxgbetool t5nex0 tracer list
# tcpdump -i t5nex0   <== all that cxl0 sees and puts on the wire

If you were doing TSO, a tcpdump on cxl0 may have shown you ~64K
"frames" with no L3/L4 checksum but this will show you the frames that
were actually transmitted.

/* all done */
# cxgbetool t5nex0 tracer 0 disable
# cxgbetool t5nex0 tracer 1 disable
# cxgbetool t5nex0 tracer list
# ifconfig t5nex0 destroy

10 years agoMerge ACPICA 20130725.
jkim [Fri, 26 Jul 2013 21:34:09 +0000 (21:34 +0000)]
Merge ACPICA 20130725.

10 years agoMake the BSD-licensed patch the default.
pfg [Fri, 26 Jul 2013 21:25:18 +0000 (21:25 +0000)]
Make the BSD-licensed patch the default.

The BSD-licensed patch(1) command has matured and it's behaviour
can be considered equivalent to the older version of GNU patch
in the tree.

The switch has been extensively tested [1] and only two ports
presented regressions, which have since been fixed.

For convenience a new WITH_GNU_PATCH option is available,
but it will likely be removed in the near future.

PR: 176313
Approved by: portmgr

10 years agoReserve room for ioctls that aren't in this copy of the driver yet.
np [Fri, 26 Jul 2013 20:54:33 +0000 (20:54 +0000)]
Reserve room for ioctls that aren't in this copy of the driver yet.

10 years agoBreak out the static, global LACP debug options into a per-lagg unit
adrian [Fri, 26 Jul 2013 19:41:13 +0000 (19:41 +0000)]
Break out the static, global LACP debug options into a per-lagg unit
sysctl tree.

* Create a net.link.lagg.X.lacp node
* Add a debug node under that for tx_test and rx_test
* Add lacp_strict_mode, defaulting to 1

tx_test and rx_test are still a bitmap of unit numbers for now.
At some point it would be nice to create child nodes of the lagg bundle
for each sub-interface, and then populate those with various knobs
and statistics.

Sponsored by: Netflix

10 years ago - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
jeff [Fri, 26 Jul 2013 19:06:14 +0000 (19:06 +0000)]
 - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
   This eliminates some unusual uses of that API in favor of more typical
   uses of kmem_malloc().

Discussed with: kib/alc
Tested by: pho
Sponsored by: EMC / Isilon Storage Division

10 years agoImplement certificate verification, and many other SSL-related
des [Fri, 26 Jul 2013 15:53:43 +0000 (15:53 +0000)]
Implement certificate verification, and many other SSL-related
imrovements; complete details in the PR.

PR: kern/175514
Submitted by: Michael Gmelin <freebsd@grem.de>
MFC after: 1 week

10 years agofix UPDATING entry in r253677
avg [Fri, 26 Jul 2013 14:43:38 +0000 (14:43 +0000)]
fix UPDATING entry in r253677

MFC after: 3 weeks
X-MFC with: r253677

10 years agoStyle issue in r253661.
pfg [Fri, 26 Jul 2013 14:37:23 +0000 (14:37 +0000)]
Style issue in r253661.

Pointed out by: avg
MFC after: 1 month

10 years agomake path matching in devfs rules consistent and sane (and safer)
avg [Fri, 26 Jul 2013 14:25:58 +0000 (14:25 +0000)]
make path matching in devfs rules consistent and sane (and safer)

Before this change path matching had the following features:
- for device nodes the patterns were matched against full path
- in the above case '/' in a path could be matched by a wildcard
- for directories and links only the last component was matched

So, for example, a pattern like 're*' could match the following entries:
- re0 device
- responder/u0 device
- zvol/recpool directory

Although it was possible to work around this behavior (once it was spotted
and understood), it was very confusing and contrary to documentation.

Now we always match a full path for all types of devfs entries (devices,
directories, links) and a '/' has to be matched explicitly.
This behavior follows the shell globbing rules.

This change is originally developed by Jaakko Heinonen.
Many thanks!

PR: kern/122838
Submitted by: jh
MFC after: 4 weeks

10 years ago- Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
marius [Fri, 26 Jul 2013 14:23:25 +0000 (14:23 +0000)]
- Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
  Introduce $BASEBITSDIR for clarity and in order to avoid repeating this
  mistake in the future. Fixing this ensures that we pick up the newly built
  boot code and loader native to the target, which is especially relevant
  when cross-building release images.
- It is pointless to specify an endianess for ISO 9660 images so strip that.

MFC after: 3 days

10 years agoEnsure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
marius [Fri, 26 Jul 2013 14:22:03 +0000 (14:22 +0000)]
Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
is picked up when defined. Previously, ffs_subr.c was always built without
support for opposite endianess as it doesn't include makefs.h on its own.

MFC after: 3 days

10 years agoRegenerate usb.conf
hselasky [Fri, 26 Jul 2013 10:25:18 +0000 (10:25 +0000)]
Regenerate usb.conf

MFC after: 1 week

10 years agoAssume that all Apple products using interface class 255, subclass 253
hselasky [Fri, 26 Jul 2013 09:58:56 +0000 (09:58 +0000)]
Assume that all Apple products using interface class 255, subclass 253
and protocol 1 are USB ethernet adapters. This avoids keeping and updating
the product list every now and then. This patch will add support for the
USB ethernet interface found in the IPAD.

MFC after: 1 week

10 years agoRemove define and documentation for vm_pageout_algorithm missed in r253587
zont [Fri, 26 Jul 2013 02:00:06 +0000 (02:00 +0000)]
Remove define and documentation for vm_pageout_algorithm missed in r253587

10 years agoFix a segfault in ctfmerge due to a bug in gcc.
pfg [Fri, 26 Jul 2013 00:28:19 +0000 (00:28 +0000)]
Fix a segfault in ctfmerge due to a bug in gcc.

GCC can generate bogus dwarf attributes with DW_AT_byte_size
set to 0xFFFFFFFF.
The issue was originaly detected in NetBSD but it has been
adapted for portability and to avoid compiler warnings.

Reference:
https://www.illumos.org/issues/3776

Obtained from: NetBSD
MFC after: 1 month

10 years agoDocument the sbinuptime() and getsbinuptime() functions introduced in
brooks [Thu, 25 Jul 2013 20:53:15 +0000 (20:53 +0000)]
Document the sbinuptime() and getsbinuptime() functions introduced in
r247452.

Sponsored by: DARPA, AFRL

10 years agosh: Remove an incorrect comment.
jilles [Thu, 25 Jul 2013 20:50:35 +0000 (20:50 +0000)]
sh: Remove an incorrect comment.

10 years agosh: Remove #define MKINIT.
jilles [Thu, 25 Jul 2013 19:48:15 +0000 (19:48 +0000)]
sh: Remove #define MKINIT.

MKINIT only served for the removed mkinit. Many variables can be static now.

10 years agoext2fs: Return EINVAL for negative uio_offset as in UFS.
pfg [Thu, 25 Jul 2013 19:37:49 +0000 (19:37 +0000)]
ext2fs: Return EINVAL for negative uio_offset as in UFS.

While here drop old comment that doesn't really apply.

MFC after: 1 month
Discussed with: gleb

10 years agoEnhance the description of NOTE_TRACK:
jhb [Thu, 25 Jul 2013 19:34:24 +0000 (19:34 +0000)]
Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
  If NOTE_FORK is set, the listener will get a NOTE_FORK event from
  the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
  preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
  bit for the user to set (which is what this list pupports to be).
  Also, explicitly note that if an error occurs, the NOTE_CHILD event
  will not be generated.

MFC after: 1 week