]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoActually pro AMD chipsets.
marius [Tue, 1 Jul 2014 14:54:34 +0000 (14:54 +0000)]
Actually pro AMD chipsets.

MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoFix the reported status for the switch CPU port which was (wrongly)
loos [Tue, 1 Jul 2014 14:49:46 +0000 (14:49 +0000)]
Fix the reported status for the switch CPU port which was (wrongly)
reporting half-duplex link.

Tested on TP-Link WR1043ND.

10 years agoAdd the CPU port flag to the CPU port on rtl8366 (port 5).
loos [Tue, 1 Jul 2014 14:33:48 +0000 (14:33 +0000)]
Add the CPU port flag to the CPU port on rtl8366 (port 5).

Do not allow any media change on the switch CPU port.

Tested on TP-Link WR1043ND.

10 years agoDocument all aliases supported by GEOM_PART class.
ae [Tue, 1 Jul 2014 12:44:47 +0000 (12:44 +0000)]
Document all aliases supported by GEOM_PART class.

MFC after: 1 week

10 years agoLinux uses its own UUID for data partitions.
ae [Tue, 1 Jul 2014 12:40:00 +0000 (12:40 +0000)]
Linux uses its own UUID for data partitions.

MFC after: 1 week

10 years agoDon't overload the CCB status field within the driver.
scottl [Tue, 1 Jul 2014 10:51:20 +0000 (10:51 +0000)]
Don't overload the CCB status field within the driver.

Obtained from: Netflix, Inc.
MFC after: 2 days

10 years agoDon't call crcopysafe or uifind unnecessarily in execve.
mjg [Tue, 1 Jul 2014 09:21:32 +0000 (09:21 +0000)]
Don't call crcopysafe or uifind unnecessarily in execve.

MFC after: 1 week

10 years agoMFV r267570:
delphij [Tue, 1 Jul 2014 08:36:56 +0000 (08:36 +0000)]
MFV r267570:

4756 metaslab_group_preload() could deadlock

illumos/illumos-gate@30beaff42d8240ebf5386e8b7a14e3d137a1631f

MFC after: 2 weeks

10 years agoMFV r267569:
delphij [Tue, 1 Jul 2014 08:28:49 +0000 (08:28 +0000)]
MFV r267569:

4897 Space accounting mismatch in L2ARC/zpool

illumos/illumos-dist@3038a2b421b40dc5ac11cd88423696618584f85a

MFC after: 2 weeks

10 years agoMFV r267568:
delphij [Tue, 1 Jul 2014 08:20:34 +0000 (08:20 +0000)]
MFV r267568:

4891 want zdb option to dump all metadata

illumos/illumos-gate@df15e419cb7359ba56ddddab9045e438d89e7cbc

MFC after: 2 weeks

10 years agoThe assumption in ipsec4_process_packet() that the payload may be
zec [Tue, 1 Jul 2014 08:02:25 +0000 (08:02 +0000)]
The assumption in ipsec4_process_packet() that the payload may be
only IPv4 is wrong, so check the IP version before mangling the
payload header.

10 years agoMFV r267567:
delphij [Tue, 1 Jul 2014 07:56:07 +0000 (07:56 +0000)]
MFV r267567:

4881 zfs send performance degradation when embedded block pointers are
     encountered

illumos/illumos-gate@06315b795c0d54f0228e0b8af497a28752dd92da

MFC after: 2 weeks

10 years agoRemove any stale mbuf tags from packets being injected into a netgraph
zec [Tue, 1 Jul 2014 07:54:12 +0000 (07:54 +0000)]
Remove any stale mbuf tags from packets being injected into a netgraph
graph.  In particular, this solves some issues with (probably leaked)
IPSec-related tags being looped back through netgraph to the inbound
path which then misinterpreted the stale tags.

MFC after: 7 days

10 years agoFix order of USB serial layer uninit. Currently module dependency
hselasky [Tue, 1 Jul 2014 07:30:29 +0000 (07:30 +0000)]
Fix order of USB serial layer uninit. Currently module dependency
rules prevent the USB serial module to be unloaded before any client
modules. This patch ensures that the "ucom_mtx" mutex is destroyed
last when doing a system uninit in a monotolith build aswell.

MFC after: 3 days

10 years agoMFV r267566:
delphij [Tue, 1 Jul 2014 07:29:42 +0000 (07:29 +0000)]
MFV r267566:

4390 i/o errors when deleting filesystem/zvol can lead to space map corruption

MFC after: 2 weeks

10 years agoFix for use after free.
hselasky [Tue, 1 Jul 2014 07:13:41 +0000 (07:13 +0000)]
Fix for use after free.

MFC after: 3 days

10 years agoMFV r267565:
delphij [Tue, 1 Jul 2014 06:43:15 +0000 (06:43 +0000)]
MFV r267565:

4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks

MFC after: 2 weeks

10 years agoPerform a lockless check in sigacts_shared.
mjg [Tue, 1 Jul 2014 06:29:15 +0000 (06:29 +0000)]
Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.

MFC after: 1 week

10 years agoAdd accessor functions for manipulating the CAM CCB status field.
scottl [Tue, 1 Jul 2014 04:44:18 +0000 (04:44 +0000)]
Add accessor functions for manipulating the CAM CCB status field.

Reviewed by: gibbs
Obtained from: Netflix, Inc
MFC after: 2 days

10 years agoRefactor some code in mps.c to reduce header pollution.
scottl [Tue, 1 Jul 2014 04:33:36 +0000 (04:33 +0000)]
Refactor some code in mps.c to reduce header pollution.

Reviewed by: gibbs
Obtained from: Netflix, Inc.
MFC after: 2 days

10 years agoAdd vt(4) devices and options to NOTES
emaste [Tue, 1 Jul 2014 00:22:54 +0000 (00:22 +0000)]
Add vt(4) devices and options to NOTES

Reviewed by: marius (earlier version)

10 years agoInitialise these variables so gcc doesn't complain.
adrian [Mon, 30 Jun 2014 23:34:36 +0000 (23:34 +0000)]
Initialise these variables so gcc doesn't complain.

Submitted by: luigi

10 years agoregex(3): Add support for \< and \> word delimiters
pfg [Mon, 30 Jun 2014 20:54:25 +0000 (20:54 +0000)]
regex(3): Add support for \< and \> word delimiters

Solaris and other OSs have support for \< and \> as word
delimiters in utilities like sed(1). These are useful to
have for general compatiblity with Solaris but should be
avoided for portability with other systems, including the
traditional BSDs.

Bump __FreeBSD_version as this is likely to affect some
userland utilities.

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

PR: bin/153257
Obtained from: Illumos
MFC after: 1 month

10 years agoActivate the condition for WITHOUT_INFO
bapt [Mon, 30 Jun 2014 20:24:00 +0000 (20:24 +0000)]
Activate the condition for WITHOUT_INFO

Submitted by: antoine

10 years agofill in the list of obsolete files when base is built with WITHOUT_INFO
bapt [Mon, 30 Jun 2014 20:22:00 +0000 (20:22 +0000)]
fill in the list of obsolete files when base is built with WITHOUT_INFO

10 years agoAdd missing VT_ kernel config knobs
emaste [Mon, 30 Jun 2014 19:34:16 +0000 (19:34 +0000)]
Add missing VT_ kernel config knobs

MFC after: 1 week

10 years agoWorkaround for bug in GCC on powerpc64. Symbols that are exported are
hselasky [Mon, 30 Jun 2014 18:11:22 +0000 (18:11 +0000)]
Workaround for bug in GCC on powerpc64. Symbols that are exported are
by fault required to be all "static" or all "extern".

10 years agoAdd a vt(4) cross reference to syscons(4)
emaste [Mon, 30 Jun 2014 16:49:00 +0000 (16:49 +0000)]
Add a vt(4) cross reference to syscons(4)

10 years agoFix ifconfig to show pltime and vltime with -L option,
ume [Mon, 30 Jun 2014 16:39:37 +0000 (16:39 +0000)]
Fix ifconfig to show pltime and vltime with -L option,
again after usage change from time_second to time_uptime.

PR: 188520
Submitted by: Guy Yur <guyyur__at__gmail.com>
MFC after: 1 week

10 years agoAdd vt(4) to GENERIC and retire the separate VT config
emaste [Mon, 30 Jun 2014 16:18:38 +0000 (16:18 +0000)]
Add vt(4) to GENERIC and retire the separate VT config

vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
driver, set the loader tunable kern.vty=vt .

10 years agochown: add a test
eadler [Mon, 30 Jun 2014 05:33:52 +0000 (05:33 +0000)]
chown: add a test

Add a test for the chown utility. This sets up chown(8) to be capable of being
tested.  As such, only add one test for now as an example.

10 years agoAdd initial RSS awareness to the ixgbe(4) driver.
adrian [Mon, 30 Jun 2014 04:38:29 +0000 (04:38 +0000)]
Add initial RSS awareness to the ixgbe(4) driver.

The ixgbe(4) hardware is capable of RSS hashing RX packets and doing RSS
queue selection for up to 8 queues.

However, even if multi-queue is enabled for ixgbe(4), the RX path doesn't use
the RSS flowid from the received descriptor.  It just uses the MSIX queue id.

This patch does a handful of things if RSS is enabled:

* Instead of using a random key at boot, fetch the RSS key from the RSS code
  and program that in to the RSS redirection table.

  That whole chunk of code should be double checked for endian correctness.

* Use the RSS queue mapping to CPU ID to figure out where to thread pin
  the RX swi thread and the taskqueue threads for each queue.

* The software queue is now really an "RSS bucket".

* When programming the RSS indirection table, use the RSS code to
  figure out which RSS bucket each slot in the indirection table maps
  to.

* When transmitting, use the flowid RSS mapping if the mbuf has
  an RSS aware hash.  The existing method wasn't guaranteed to align
  correctly with the destination RSS bucket (and thus CPU ID.)

This code warns if the number of RSS buckets isn't the same as the
automatically configured number of hardware queues.  The administrator
will have to tweak one of them for better performance.

There's currently no way to re-balance the RSS indirection table after
startup.  I'll worry about that later.

Additionally, it may be worthwhile to always use the full 32 bit flowid if
multi-queue is enabled.  It'll make things like lagg(4) behave better with
respect to traffic distribution.

10 years agoAdd initial RSS awareness to the igb(4) driver.
adrian [Mon, 30 Jun 2014 04:34:59 +0000 (04:34 +0000)]
Add initial RSS awareness to the igb(4) driver.

The igb(4) hardware is capable of RSS hashing RX packets and doing RSS
queue selection for up to 8 queues.  (I believe some hardware is limited
to 4 queues, but I haven't tested on that.)

However, even if multi-queue is enabled for igb(4), the RX path doesn't use
the RSS flowid from the received descriptor.  It just uses the MSIX queue id.

This patch does a handful of things if RSS is enabled:

* Instead of using a random key at boot, fetch the RSS key from the RSS code
  and program that in to the RSS redirection table.

  That whole chunk of code should be double checked for endian correctness.

* Use the RSS queue mapping to CPU ID to figure out where to thread pin
  the RX swi thread and the taskqueue threads for each queue.

* The software queue is now really an "RSS bucket".

* When programming the RSS indirection table, use the RSS code to
  figure out which RSS bucket each slot in the indirection table maps
  to.

* When transmitting, use the flowid RSS mapping if the mbuf has
  an RSS aware hash.  The existing method wasn't guaranteed to align
  correctly with the destination RSS bucket (and thus CPU ID.)

This code warns if the number of RSS buckets isn't the same as the
automatically configured number of hardware queues.  The administrator
will have to tweak one of them for better performance.

There's currently no way to re-balance the RSS indirection table after
startup.  I'll worry about that later.

Additionally, it may be worthwhile to always use the full 32 bit flowid if
multi-queue is enabled.  It'll make things like lagg(4) behave better with
respect to traffic distribution.

10 years agoIf we're doing RSS then ensure the TCP timer selection uses the multi-CPU
adrian [Mon, 30 Jun 2014 04:26:29 +0000 (04:26 +0000)]
If we're doing RSS then ensure the TCP timer selection uses the multi-CPU
callwheel setup, rather than just dumping all the timers on swi0.

10 years agoIf we're doing RSS then ensure that the callwheel swi's are CPU pinned.
adrian [Mon, 30 Jun 2014 04:25:51 +0000 (04:25 +0000)]
If we're doing RSS then ensure that the callwheel swi's are CPU pinned.

10 years agoIn rare cases, a SATA drive can stop responding to commands and trigger a
scottl [Mon, 30 Jun 2014 01:01:54 +0000 (01:01 +0000)]
In rare cases, a SATA drive can stop responding to commands and trigger a
reset device task request from the driver.  If the drive fails to respond
with a signature FIS, the driver would previously get into an endless retry
loop, stalling all I/O to the drive and keeping user processes stranded.
Instead, fail the i/o and invalidate the device if the task management
command times out.  This is controllable with the sysctl and tunable
hw.isci.fail_on_task_timeout
dev.isci.0.fail_on_task_timeout

The default for these is 1.

Reviewed by: jimharris
Obtained from: Netflix, Inc.
MFC after: 2 days

10 years agoFix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer.
scottl [Mon, 30 Jun 2014 00:41:46 +0000 (00:41 +0000)]
Fix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer.
This impacts some home-rolled SMART tools.

Reviewed by: jimharris
Obtained from: Netflix
MFC after: 2 days

10 years agoRegenerate after r268022
emaste [Mon, 30 Jun 2014 00:22:41 +0000 (00:22 +0000)]
Regenerate after r268022

MFC after: 1 week

10 years agoRename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT
emaste [Mon, 30 Jun 2014 00:20:12 +0000 (00:20 +0000)]
Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

The _SUPPORT knobs have a consistent meaning which differs from the
behaviour controlled by this knob.  As the knob is opt-out and has not
appeared in a release the impact should be low.

Suggested by: imp, wblock
MFC after: 1 week

10 years agoAdd detection for ciss(4) controllers that are set to non-raid JBOD mode.
sbruno [Sun, 29 Jun 2014 18:53:15 +0000 (18:53 +0000)]
Add detection for ciss(4)  controllers that are set to non-raid JBOD mode.
If a controller is set to JBOD, it has no RAID functions turned on.

Populate even more of the firmware specification headers, copied from
cciss_vol_status.

Reviewed by: Benesh, Scott <scott.benesh@hp.com>
MFC after: 2 weeks

10 years agoCheck return of cam_periph_find() before using it in a printf.
sbruno [Sun, 29 Jun 2014 18:38:44 +0000 (18:38 +0000)]
Check return of cam_periph_find() before using it in a printf.

If cam_periph_find() doesn't locate the path we requested, bail to error
condition.

Acquire ciss->mtx for this operation.

Reviewed by: "Benesh, Scott" <scott.benesh@hp.com>
MFC after: 2 weeks

10 years agoReduce some warnings in the Solaris unicode support.
pfg [Sun, 29 Jun 2014 02:28:05 +0000 (02:28 +0000)]
Reduce some warnings in the Solaris unicode support.

Clean some warnings from parenthesis and minor style issues.

MFC after: 3 days

10 years agoGive each interrupt a descriptive name when using MSIX
bryanv [Sun, 29 Jun 2014 01:04:11 +0000 (01:04 +0000)]
Give each interrupt a descriptive name when using MSIX

MFC after: 3 days

10 years agoThere might be a potential race condition for the NFSv4 client
rmacklem [Sat, 28 Jun 2014 21:47:15 +0000 (21:47 +0000)]
There might be a potential race condition for the NFSv4 client
when a newly created file has another open done on it that
update the open mode. This patch moves the code that updates
the open mode up into the block where the mutex is held to
ensure this cannot happen. No bug caused by this potential
race has been observed, but this fix is a safety belt to ensure
it cannot happen.

MFC after: 2 weeks

10 years agoRevert r267869:
pfg [Sat, 28 Jun 2014 19:59:12 +0000 (19:59 +0000)]
Revert r267869:

MFV r260708
4427 pid provider rejects probes with valid UTF-8 names

Use of u8_textprep.c broke the build on powerpc.

Reported by: bz, rpaulo and tinderbox.
Pointyhat: me

10 years agoMove the -I of common/util to the proper place to fix the powerpc build.
rpaulo [Sat, 28 Jun 2014 18:53:02 +0000 (18:53 +0000)]
Move the -I of common/util to the proper place to fix the powerpc build.

MFC after: 2 weeks

10 years agoCompile fixes:
hselasky [Sat, 28 Jun 2014 17:36:18 +0000 (17:36 +0000)]
Compile fixes:

Remove duplicate "debug_ktr.mask" sysctl definition.
Remove now unused variable from "kern_ktr.c".
This fixes build of "ktr" which was broken by r267961.

Let the default value for "vm_kmem_size_scale" be zero. It is setup
after that the sysctl has been initialized from "getenv()" in the
"kmeminit()" function to equal the "VM_KMEM_SIZE_MAX" value, if
zero. On Sparc64 the "VM_KMEM_SIZE_MAX" macro is not a constant. This
fixes build of Sparc64 which was broken by r267961.

Add a special macro to dynamically create SYSCTL root nodes, because
root nodes have a special parent. This fixes build of existing OFED
module and CANBUS module for pc98 which was broken by r267961.

Add missing "sysctl.h" includes to get the needed sysctl header file
declarations. This is needed after r267961.

MFC after: 2 weeks

10 years agoDon't accidently skip every second line when calculating the
dwmalone [Sat, 28 Jun 2014 15:53:28 +0000 (15:53 +0000)]
Don't accidently skip every second line when calculating the
idle time.

MFC after: 2 weeks

10 years agoFix breakage after r267981.
dim [Sat, 28 Jun 2014 09:53:44 +0000 (09:53 +0000)]
Fix breakage after r267981.

Pointy hat to: dim
MFC after: 3 days
X-MFC-With: r267981

10 years agoCall fdcloseexec right after fdunshare.
mjg [Sat, 28 Jun 2014 05:51:45 +0000 (05:51 +0000)]
Call fdcloseexec right after fdunshare.

No functional changes.

MFC after: 1 week

10 years agoMake fdunshare accept only td parameter.
mjg [Sat, 28 Jun 2014 05:41:53 +0000 (05:41 +0000)]
Make fdunshare accept only td parameter.

Proc had to match the thread anyway and 2 parameters were inconsistent
with the rest.

MFC after: 1 week

10 years agoMake sure to always clear p_fd for process getting rid of its filetable.
mjg [Sat, 28 Jun 2014 05:18:03 +0000 (05:18 +0000)]
Make sure to always clear p_fd for process getting rid of its filetable.

Filetable can be shared with other processes. Previous code failed to
clear the pointer for all but the last process getting rid of the table.
This is mostly cosmetics.

Get rid of 'This should happen earlier' comment. Clearing the pointer in
this place is fine as consumers can reliably check for files availability
by inspecting fd_refcnt and vnodes availabity by NULL-checking them.

MFC after: 1 week

10 years agoFix regression issue after r267961. Handle special string case for
hselasky [Sat, 28 Jun 2014 03:59:04 +0000 (03:59 +0000)]
Fix regression issue after r267961. Handle special string case for
SYSCTLs like previously.

MFC after: 2 weeks
Reported by: several people

10 years agoPull in r267961 and r267973 again. Fix for issues reported will follow.
hselasky [Sat, 28 Jun 2014 03:56:17 +0000 (03:56 +0000)]
Pull in r267961 and r267973 again. Fix for issues reported will follow.

10 years agoMinimal update for cvsup -> svn change.
gavin [Sat, 28 Jun 2014 00:01:18 +0000 (00:01 +0000)]
Minimal update for cvsup -> svn change.

10 years agoRedefine SUNW based on SYSDIR in an attempt to fix a build problem.
rpaulo [Fri, 27 Jun 2014 22:38:42 +0000 (22:38 +0000)]
Redefine SUNW based on SYSDIR in an attempt to fix a build problem.

MFC after: 2 weeks

10 years agoRemove odd practice of inverting error codes.
mav [Fri, 27 Jun 2014 22:28:14 +0000 (22:28 +0000)]
Remove odd practice of inverting error codes.

-EPERM is equal to ERESTART, returning which from ioctl() handler causes
infinite syscall restart.

MFC after: 2 weeks

10 years agoRevert r267961, r267973:
gjb [Fri, 27 Jun 2014 22:05:21 +0000 (22:05 +0000)]
Revert r267961, r267973:

These changes prevent sysctl(8) from returning proper output,
such as:

 1) no output from sysctl(8)
 2) erroneously returning ENOMEM with tools like truss(1)
    or uname(1)
 truss: can not get etype: Cannot allocate memory

10 years agoUse Intel's official name (Secure Key) per IntelĀ® Digital Random Number
delphij [Fri, 27 Jun 2014 21:33:15 +0000 (21:33 +0000)]
Use Intel's official name (Secure Key) per IntelĀ® Digital Random Number
Generator (DRNG) Software Implementation Guide.

Reviewed by: kib
Approved by: so
MFC after: 2 weeks

10 years agoAdd the llvm patch for r267981.
dim [Fri, 27 Jun 2014 20:45:17 +0000 (20:45 +0000)]
Add the llvm patch for r267981.

10 years agoPull in r211627 from upstream llvm trunk (by Bill Schmidt):
dim [Fri, 27 Jun 2014 20:41:12 +0000 (20:41 +0000)]
Pull in r211627 from upstream llvm trunk (by Bill Schmidt):

  [PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

  PR20071 identifies a problem in PowerPC's fast-isel implementation
  for floating-point conversion to integer.  The fctiduz instruction
  was added in Power ISA 2.06 (i.e., Power7 and later).  However, this
  instruction is being generated regardless of which 64-bit PowerPC
  target is selected.

  The intent is for fast-isel to punt to DAG selection when this
  instruction is not available.  This patch implements that change.
  For testing purposes, the existing fast-isel-conversion.ll test adds
  a RUN line for -mcpu=970 and tests for the expected code generation.
  Additionally, the existing test fast-isel-conversion-p5.ll was found
  to be incorrectly expecting the unavailable instruction to be
  generated.  I've removed these test variants since we have adequate
  coverage in fast-isel-conversion.ll.

This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.

Requested by: jhibbits
MFC after: 3 days

10 years agoIn order to get vt(4) a bit closer to the feature set provided by sc(4),
marius [Fri, 27 Jun 2014 19:57:57 +0000 (19:57 +0000)]
In order to get vt(4) a bit closer to the feature set provided by sc(4),
implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to
SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the
default colors of normal and kernel text respectively.
Note on the naming: Although affecting the output of vt(4), technically
kern/subr_terminal.c is primarily concerned with changing default colors
so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR.
Actually, if the architecture and abstraction of terminal+teken+vt would
be perfect, dev/vt/* wouldn't be touched by this commit at all.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoAlways set UF_ARCHIVE on target (because they are by definition new files
delphij [Fri, 27 Jun 2014 19:57:54 +0000 (19:57 +0000)]
Always set UF_ARCHIVE on target (because they are by definition new files
and should be archived) and ignore error when we can't set it (e.g. NFS).

Reviewed by: ken
MFC after: 2 weeks

10 years agoAdd CTLFLAG_NOFETCH flag; console vty code runs before tunable fetch
emaste [Fri, 27 Jun 2014 19:07:35 +0000 (19:07 +0000)]
Add CTLFLAG_NOFETCH flag; console vty code runs before tunable fetch

Also remove redundant "" assignment for string in BSS.

Submitted by: hselasky@

10 years agoAdd missing variable declarations when using RSS.
adrian [Fri, 27 Jun 2014 19:07:00 +0000 (19:07 +0000)]
Add missing variable declarations when using RSS.

Reported by: bryanv@

10 years agoSimplify the code a little bit using the update_sensor_sysctl() routine to
loos [Fri, 27 Jun 2014 18:58:22 +0000 (18:58 +0000)]
Simplify the code a little bit using the update_sensor_sysctl() routine to
retrieve the sensor temperature.

This also avoid the overflow that could happen on sysctlnametomib(3)
because the code was not checking the length of the mib array.

CID: 1222504

10 years agopw: fix up deletion of users from groups
mjg [Fri, 27 Jun 2014 18:51:19 +0000 (18:51 +0000)]
pw: fix up deletion of users from groups

Previuosly given 'foo,bar' members, removing 'foo' would result in an
infinite loop.

PR: 191427
Submitted by: Voradesh Yenbut <yenbut cs.washington.edu>
MFC after: 1 week

10 years agoCorrect the buffer length check to avoid overflows.
loos [Fri, 27 Jun 2014 18:40:14 +0000 (18:40 +0000)]
Correct the buffer length check to avoid overflows.

Found with: Coverity Scan
CID: 12225021222503

10 years agoMinor mdoc fix.
joel [Fri, 27 Jun 2014 18:32:20 +0000 (18:32 +0000)]
Minor mdoc fix.

10 years ago- SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4.
marius [Fri, 27 Jun 2014 18:24:20 +0000 (18:24 +0000)]
- SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4.
- vt_vga(4) is a driver rather than a function so reference it accordingly.
- Uncomment HISTORY section given that vt(4) will first appear in 9.3.

Reviewed by: emaste (modulo last part)
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoAdd post-mortem debugging for "EPT Misconfiguration" VM-exit. This error
neel [Fri, 27 Jun 2014 18:00:38 +0000 (18:00 +0000)]
Add post-mortem debugging for "EPT Misconfiguration" VM-exit. This error
is hard to reproduce so try to collect all the breadcrumbs when it happens.

Reviewed by: grehan

10 years agoUse a common tunable to choose between vt(4)/sc(4)
emaste [Fri, 27 Jun 2014 17:50:33 +0000 (17:50 +0000)]
Use a common tunable to choose between vt(4)/sc(4)

With this change and previous work from ray@ it will be possible to put
both in GENERIC, and have one enabled by default, but allow the other to
be selected via the loader.

(The previous implementation had separate kern.vt.disable and
hw.syscons.disable tunables, and would panic if both drivers were
compiled in and neither was explicitly disabled.)

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoAfter r267897 brought in a new version of file/libmagic, a filesystem image
neel [Fri, 27 Jun 2014 17:18:54 +0000 (17:18 +0000)]
After r267897 brought in a new version of file/libmagic, a filesystem image
is identified as "DOS/MBR boot sector" as opposed to "x86 boot sector".

This trips up vmrun.sh when using the new file(1) and makes it want to boot
into the installer instead.

Fix this by just looking for "boot sector" instead.

10 years agoExtend the meaning of the CTLFLAG_TUN flag to automatically check if
hselasky [Fri, 27 Jun 2014 16:33:43 +0000 (16:33 +0000)]
Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies

10 years agoDon't hide zero-length strings when doing sysctl listings.
hselasky [Fri, 27 Jun 2014 15:23:12 +0000 (15:23 +0000)]
Don't hide zero-length strings when doing sysctl listings.

MFC after: 1 week

10 years agoSort command flags in usage output and the manpages.
jhb [Fri, 27 Jun 2014 15:20:34 +0000 (15:20 +0000)]
Sort command flags in usage output and the manpages.

10 years agoAdd proper rangechecks in "axge_rx_frame()" function and
hselasky [Fri, 27 Jun 2014 10:24:36 +0000 (10:24 +0000)]
Add proper rangechecks in "axge_rx_frame()" function and
fix receive loop header parsing.

MFC after: 3 days
PR: 191432

10 years agoFix typo in r267481.
mav [Fri, 27 Jun 2014 06:52:37 +0000 (06:52 +0000)]
Fix typo in r267481.

MFC after: 3 days

10 years agoSet the version and date to fixed fields rather than using
grehan [Fri, 27 Jun 2014 05:27:37 +0000 (05:27 +0000)]
Set the version and date to fixed fields rather than using
preprocessor macros that don't allow reproducible builds.
As a side-effect, the date string is now spec-compliant.

root@bhyve:~ # dmidecode
# dmidecode 2.12
SMBIOS 2.4 present.
12 structures occupying 514 bytes.
Table at 0x000F101F.

Handle 0x0001, DMI type 0, 24 bytes
BIOS Information
        Vendor: BHYVE
        Version: 1.0
        Release Date: 03/14/2014

Submitted by: des (original version)
Reviewed by: tychon
MFC after: 1 week

10 years agoCheck lower bound of cmsg_len.
mjg [Fri, 27 Jun 2014 05:04:36 +0000 (05:04 +0000)]
Check lower bound of cmsg_len.

If passed cm->cmsg_len was below cmsghdr size the experssion:
datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data;

would give negative result. However, in practice it would not
result in a crash because the kernel would try to obtain garbage fds
for given process and would error out with EBADF.

PR: 124908
Submitted by: campbell mumble.net (modified a little)
MFC after: 1 week

10 years agoMFV illumos
rpaulo [Thu, 26 Jun 2014 23:24:59 +0000 (23:24 +0000)]
MFV illumos

4471 DTrace count() with histogram
4472 DTrace full width distribution histograms
4473 DTrace frequency trails

MFC after: 2 weeks

10 years agoMFV illumos
rpaulo [Thu, 26 Jun 2014 23:21:11 +0000 (23:21 +0000)]
MFV illumos

4474 DTrace Userland CTF Support
4475 DTrace userland Keyword
4476 DTrace tests should be better citizens
4479 pid provider types
4480 dof emulation is missing checks

MFC after: 2 weeks

10 years agoAdd stubs for CTF functions which are not yet implemented.
rpaulo [Thu, 26 Jun 2014 22:38:06 +0000 (22:38 +0000)]
Add stubs for CTF functions which are not yet implemented.

MFC after: 2 weeks

10 years agouse .Mt to mark up email addresses consistently (final part)
bapt [Thu, 26 Jun 2014 21:46:14 +0000 (21:46 +0000)]
use .Mt to mark up email addresses consistently (final part)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>

10 years agoMFV illumos
rpaulo [Thu, 26 Jun 2014 21:45:49 +0000 (21:45 +0000)]
MFV illumos

4477 DTrace should speak JSON

MFC after: 2 weeks

10 years agouse .Mt to mark up email addresses consistently (part6)
bapt [Thu, 26 Jun 2014 21:44:30 +0000 (21:44 +0000)]
use .Mt to mark up email addresses consistently (part6)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>

10 years agoSync the E1000 shared code with Intel internal, this adds fixes,
jfv [Thu, 26 Jun 2014 21:33:32 +0000 (21:33 +0000)]
Sync the E1000 shared code with Intel internal, this adds fixes,
and more importantly, new I218 adapter support to the em driver.

MFC after: 1 week

10 years ago- Document -b to enable the bvmcons console (but mark it as deprecated
jhb [Thu, 26 Jun 2014 20:12:38 +0000 (20:12 +0000)]
- Document -b to enable the bvmcons console (but mark it as deprecated
  similar to -g.)
- Document -U to set the SMBIOS UUID.
- Add missing options to the usage output and to the manpage Synopsis.
- Don't claim that bvmdebug is amd64-only (it is also a device, not an
  option).

10 years agoSimplify statistics calculation.
mav [Thu, 26 Jun 2014 20:06:37 +0000 (20:06 +0000)]
Simplify statistics calculation.

Instead of trying to guess size of disk I/O operations (it just won't work
that way for newly added commands, and is equal to data move size for old
ones), account data move traffic.  If disk I/Os are that interesting, then
backends have to account and provide that information.

Block backend already exports the information about disk I/Os via devstat,
so having it here too is excessive.

MFC after: 2 weeks

10 years ago OS-1723 DTrace should speak JSON
rpaulo [Thu, 26 Jun 2014 19:48:59 +0000 (19:48 +0000)]
OS-1723 DTrace should speak JSON
    Reviewed by: Bryan Cantrill <bmc@joyent.com>

illumos/illumos-gate@8017f1f8eea31bd1160b5e50755242a2a9aabc7d

10 years agoMFV illumos r266986:
rpaulo [Thu, 26 Jun 2014 19:38:16 +0000 (19:38 +0000)]
MFV illumos r266986:

2915 DTrace in a zone should see "cpu", "curpsinfo", et al
2916 DTrace in a zone should be able to access fds[]
2917 DTrace in a zone should have limited provider access

MFC after: 2 weeks

10 years agoRevert r267898.
rpaulo [Thu, 26 Jun 2014 17:34:42 +0000 (17:34 +0000)]
Revert r267898.

10 years agoUse dtrace -s instead of /bin/sh for DTrace scripts.
rpaulo [Thu, 26 Jun 2014 17:27:36 +0000 (17:27 +0000)]
Use dtrace -s instead of /bin/sh for DTrace scripts.

10 years agoFix whitspace indentation from spaces to tabs.
bz [Thu, 26 Jun 2014 17:26:33 +0000 (17:26 +0000)]
Fix whitspace indentation from spaces to tabs.

No functional changes.

MFC after: 2 weeks

10 years agoIntroduce opt_netfpga.h and allow setting NF10BMAC_64BIT from mips kernel
bz [Thu, 26 Jun 2014 17:20:45 +0000 (17:20 +0000)]
Introduce opt_netfpga.h and allow setting NF10BMAC_64BIT from mips kernel
configs.  Switch the BERI_NETFPGA_MDROOT to 64bit by default.

Give we have working interrupts also cleanup the extra polling CFLAGS from
the module Makefile.

MFC after: 2 weeks

10 years agoAdd support for emulating the move instruction: "mov r/m8, imm8".
tychon [Thu, 26 Jun 2014 17:15:41 +0000 (17:15 +0000)]
Add support for emulating the move instruction: "mov r/m8, imm8".

Reviewed by: neel

10 years agoAllow switching between 32bit and 64bit bus width data access at compile
bz [Thu, 26 Jun 2014 17:10:07 +0000 (17:10 +0000)]
Allow switching between 32bit and 64bit bus width data access at compile
time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
variable and return value widths.

Adjust comments to indicate the 32 or 64bit register widths.

MFC after: 2 weeks

10 years agoRather than using a constant use sizeof(val) allowing for the length
bz [Thu, 26 Jun 2014 17:03:08 +0000 (17:03 +0000)]
Rather than using a constant use sizeof(val) allowing for the length
to automatically change as we switch between 32/64bit.

MFC after: 2 weeks

10 years agoIn preparation for 64bit mode remove all the _4 from the function and
bz [Thu, 26 Jun 2014 16:49:45 +0000 (16:49 +0000)]
In preparation for 64bit mode remove all the _4 from the function and
macro names, rename val4 to val, and m4 to md.

No functional change.

MFC after: 2 weeks

10 years agoDelay the call to crhold() in vm_map_insert() until we know that we won't
alc [Thu, 26 Jun 2014 16:04:03 +0000 (16:04 +0000)]
Delay the call to crhold() in vm_map_insert() until we know that we won't
have to undo it by calling crfree().  This reduces the total number of calls
by vm_map_insert() to crhold() and crfree() by 45% in my tests.

Eliminate an unnecessary variable from vm_map_insert().

Reviewed by: kib
Tested by: pho