]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoIFC @r272887
neel [Fri, 10 Oct 2014 23:52:56 +0000 (23:52 +0000)]
IFC @r272887

9 years agoFix bhyvectl so it works correctly on AMD/SVM hosts. Also, add command line
neel [Fri, 10 Oct 2014 21:48:59 +0000 (21:48 +0000)]
Fix bhyvectl so it works correctly on AMD/SVM hosts. Also, add command line
options to display some key VMCB fields.

The set of valid options that can be passed to bhyvectl now depends on the
processor type. AMD-specific options are identified by a "--vmcb" or "--avic"
in the option name. Intel-specific options are identified by a "--vmcs" in
the option name.

Submitted by: Anish Gupta (akgupt3@gmail.com)

9 years agoMake sure SIZE is defined early
bapt [Fri, 10 Oct 2014 06:09:47 +0000 (06:09 +0000)]
Make sure SIZE is defined early

9 years agoAdd context pointer and source address to the UDP tunnel callback
bryanv [Fri, 10 Oct 2014 06:08:59 +0000 (06:08 +0000)]
Add context pointer and source address to the UDP tunnel callback

These are needed for the forthcoming vxlan implementation. The context
pointer means we do not have to use a spare pointer field in the inpcb,
and the source address is required to populate vxlan's forwarding table.

While I highly doubt there is an out of tree consumer of the UDP
tunneling callback, this change may be a difficult to eventually MFC.

Phabricator: https://reviews.freebsd.org/D383
Reviewed by: gnn

9 years agoDo not add late flag when file= is specified because it has a bad
hrs [Fri, 10 Oct 2014 03:20:12 +0000 (03:20 +0000)]
Do not add late flag when file= is specified because it has a bad
side-effect.  The specified file should exist before the fstab line.

Reported by: wblock (long time ago)
MFC after: 1 day

9 years agoaccept(2) may and can return EAGAIN, document it.
delphij [Fri, 10 Oct 2014 03:05:55 +0000 (03:05 +0000)]
accept(2) may and can return EAGAIN, document it.

MFC after: 1 week

9 years agoFor gcc 4.6 and newer, _Static_assert is a keyword, so don't try to
imp [Fri, 10 Oct 2014 00:35:13 +0000 (00:35 +0000)]
For gcc 4.6 and newer, _Static_assert is a keyword, so don't try to
redefine it. It does what we want, and is always available unlike
other alternatives.

9 years agoRestore the backed-out change, using __offsetof instead.
imp [Fri, 10 Oct 2014 00:35:08 +0000 (00:35 +0000)]
Restore the backed-out change, using __offsetof instead.

9 years agoFix a bug in decoding string indexes in snmp_target(3), thus causing
syrinx [Fri, 10 Oct 2014 00:26:28 +0000 (00:26 +0000)]
Fix a bug in decoding string indexes in snmp_target(3), thus causing
bsnmpd(1) to not send v3 notifications properly; while here add two
missing return statements which could lead to abort() in case of a
rollback

9 years agoBuild gperf only if we're using g++ (not clang++)
emaste [Thu, 9 Oct 2014 23:05:31 +0000 (23:05 +0000)]
Build gperf only if we're using g++ (not clang++)

gperf is used as a build tool for g++ and is not needed for Clang
architectures. Ports and third-party software that need it can use the
up-to-date devel/gperf port.

PR: 194103 (exp-run)
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D886

9 years agoUpdate dl_iterate_phdr(3) to follow r272842
emaste [Thu, 9 Oct 2014 22:58:33 +0000 (22:58 +0000)]
Update dl_iterate_phdr(3) to follow r272842

Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoThe value small=2**-(p+3), where p is the precision, can be determine from
kargl [Thu, 9 Oct 2014 22:39:52 +0000 (22:39 +0000)]
The value small=2**-(p+3), where p is the precision, can be determine from
lgamma(x) = -log(x) - log(1+x) + x*(1-g) + x**2*P(x) with g = 0.57...
being the Euler constant and P(x) a polynomial.  Substitution of small
into the RHS shows that the last 3 terms are negligible in comparison to
the leading term.  The choice of 3 may be conservative.

The value large=2**(p+3) is detemined from Stirling's approximation
lgamma(x) = x*(log(x)-1) - log(x)/2 + log(2*pi)/2 + P(1/x)/x
Again, substitution of large into the RHS reveals the last 3 terms
are negligible in comparison to the leading term.

Move the x=+-0 special case into the |x|<small block.

In the ld80 and ld128 implementaion, use fdlibm compatible comparisons
involving ix, lx, and llx.  This replaces several floating point
comparisons (some involving fabsl()) and also fixes the special cases
x=1 and x=2.

While here
  . Remove unnecessary parentheses.
  . Fix/improve comments due to the above changes.
  . Fix nearby whitespace.

* src/e_lgamma_r.c:
  . Sort declaration.
  . Remove unneeded explicit cast for type conversion.
  . Replace a double literal constant by an integer literal constant.

* src/e_lgammaf_r.c:
  . Sort declaration.

* ld128/e_lgammal_r.c:
  . Replace a long double literal constant by a double literal constant.

* ld80/e_lgammal_r.c:
  . Remove unused '#include float.h'
  . Replace a long double literal constant by a double literal constant.

Requested by: bde

9 years agoAdd missing UDP multicast receive dtrace probes
bryanv [Thu, 9 Oct 2014 22:36:21 +0000 (22:36 +0000)]
Add missing UDP multicast receive dtrace probes

Phabricator: https://reviews.freebsd.org/D924
Reviewed by: rpaulo markj
MFC after: 1 month

9 years agoFix problem on big endian systems introduced in r271579 - when we were
pjd [Thu, 9 Oct 2014 20:55:05 +0000 (20:55 +0000)]
Fix problem on big endian systems introduced in r271579 - when we were
returning from handling a nested nvlist we were resetting big-endian flag.

Reported by: Kuleshov Aleksey @ yandex.ru
Tested by: Kuleshov Aleksey @ yandex.ru

9 years agoAlways return pathname in dl_iterate_phdr's dlpi_name, as Linux does
emaste [Thu, 9 Oct 2014 20:39:18 +0000 (20:39 +0000)]
Always return pathname in dl_iterate_phdr's dlpi_name, as Linux does

Linux LD_ITERATE_PHDR(3):
    The dlpi_name field is a null-terminated string giving the
    pathname from which the shared object was loaded.

That functionality is much more useful than returning just the short
name.

Approved by: kan
Sponsored by: The FreeBSD Foundation

9 years agoEnsure that the flags field of sctp_tmit_chunks is initialized.
tuexen [Thu, 9 Oct 2014 20:08:12 +0000 (20:08 +0000)]
Ensure that the flags field of sctp_tmit_chunks is initialized.
Thanks to Peter Bostroem from Google for reporting the issue.

MFC after: 3 days

9 years agoMerge projects/ipfw to HEAD.
melifaro [Thu, 9 Oct 2014 19:32:35 +0000 (19:32 +0000)]
Merge projects/ipfw to HEAD.

Main user-visible changes are related to tables:

* Tables are now identified by names, not numbers.
 There can be up to 65k tables with up to 63-byte long names.
* Tables are now set-aware (default off), so you can switch/move
 them atomically with rules.
* More functionality is supported (swap, lock, limits, user-level lookup,
 batched add/del) by generic table code.
* New table types are added (flow) so you can match multiple packet fields at once.
* Ability to add different type of lookup algorithms for particular
 table type has been added.
* New table algorithms are added (cidr:hash, iface:array, number:array and
 flow:hash) to make certain types of lookup more effective.
* Table value are now capable of holding multiple data fields for
  different tablearg users

Performance changes:
* Main ipfw lock was converted to rmlock
* Rule counters were separated from rule itself and made per-cpu.
* Radix table entries fits into 128 bytes
* struct ip_fw is now more compact so more rules will fit into 64 bytes
* interface tables uses array of existing ifindexes for faster match

ABI changes:
All functionality supported by old ipfw(8) remains functional.
 Old & new binaries can work together with the following restrictions:
* Tables named other than ^\d+$ are shown as table(65535) in
 ruleset in old binaries

Internal changes:.
Changing table ids to numbers resulted in format modification for
 most sockopt codes. Old sopt format was compact, but very hard to
 extend (no versioning, inability to add more opcodes), so
* All relevant opcodes were converted to TLV-based versioned IP_FW3-based codes.
* The remaining opcodes were also converted to be able to eliminate
 all older opcodes at once
* All IP_FW3 handlers uses special API instead of calling sooptcopy*
 directly to ease adding another communication methods
* struct ip_fw is now different for kernel and userland
* tablearg value has been changed to 0 to ease future extensions
* table "values" are now indexes in special value array which
 holds extended data for given index
* Batched add/delete has been added to tables code
* Most changes has been done to permit batched rule addition.
* interface tracking API has been added (started on demand)
 to permit effective interface tables operations
* O(1) skipto cache, currently turned off by default at
 compile-time (eats 512K).

* Several steps has been made towards making libipfw:
  * most of new functions were separated into "parse/prepare/show
    and actuall-do-stuff" pieces (already merged).
  * there are separate functions for parsing text string into "struct ip_fw"
    and printing "struct ip_fw" to supplied buffer (already merged).
* Probably some more less significant/forgotten features

MFC after: 1 month
Sponsored by: Yandex LLC

9 years agoSupport Intel-specific MSRs that are accessed when booting up a linux in bhyve:
neel [Thu, 9 Oct 2014 19:13:33 +0000 (19:13 +0000)]
Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
- MSR_PLATFORM_INFO
- MSR_TURBO_RATIO_LIMITx
- MSR_RAPL_POWER_UNIT

Reviewed by: grehan
MFC after: 1 week

9 years agoiasl(8) expects integer fields in data tables to be specified as hexadecimal
neel [Thu, 9 Oct 2014 19:02:32 +0000 (19:02 +0000)]
iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

Reviewed by: grehan
MFC after: 1 week

9 years agoRemove remnants of some cleanup; no functional changes.
trasz [Thu, 9 Oct 2014 18:49:58 +0000 (18:49 +0000)]
Remove remnants of some cleanup; no functional changes.

Sponsored by: The FreeBSD Foundation

9 years agoMerge HEAD@r272834
melifaro [Thu, 9 Oct 2014 18:03:12 +0000 (18:03 +0000)]
Merge HEAD@r272834

9 years agoDocument the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't
markj [Thu, 9 Oct 2014 17:45:58 +0000 (17:45 +0000)]
Document the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't
used or implemented on FreeBSD.

Reported by: kmacy
Reviewed by: kmacy, rpaulo
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoTwo more places where login_setcryptfmt() defaults to MD5 were missed
des [Thu, 9 Oct 2014 17:39:11 +0000 (17:39 +0000)]
Two more places where login_setcryptfmt() defaults to MD5 were missed
in r252688.

MFC after: 3 days

9 years agoBackout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change
bapt [Thu, 9 Oct 2014 17:26:29 +0000 (17:26 +0000)]
Backout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change

9 years agoShuffle things.
adrian [Thu, 9 Oct 2014 16:48:42 +0000 (16:48 +0000)]
Shuffle things.

Suggested by: jhb

Differential Revision: D906
Sponsored by: Norse Corp

9 years agoChange the hardcoded default back from SHA512 to DES.
des [Thu, 9 Oct 2014 16:45:11 +0000 (16:45 +0000)]
Change the hardcoded default back from SHA512 to DES.

PR: 192277
MFC after: 3 days

9 years agoWhen building with a newer GCC, suppress some warnings for the
imp [Thu, 9 Oct 2014 16:39:10 +0000 (16:39 +0000)]
When building with a newer GCC, suppress some warnings for the
moment. The kernel isn't ready for them without a lot of work.

9 years agoBump ipfw module version.
melifaro [Thu, 9 Oct 2014 16:12:01 +0000 (16:12 +0000)]
Bump ipfw module version.

9 years agoAdd size(1) to the cross build toolchain
bapt [Thu, 9 Oct 2014 15:52:01 +0000 (15:52 +0000)]
Add size(1) to the cross build toolchain

9 years agoSync to HEAD@r272825.
melifaro [Thu, 9 Oct 2014 15:35:28 +0000 (15:35 +0000)]
Sync to HEAD@r272825.

9 years agoUse offsetof() from sys/types.h instead of a custom one
bapt [Thu, 9 Oct 2014 15:26:22 +0000 (15:26 +0000)]
Use offsetof() from sys/types.h instead of a custom one
This fixes build with recent gcc versions

9 years agoRegenerate after r272823:
marcel [Thu, 9 Oct 2014 15:19:35 +0000 (15:19 +0000)]
Regenerate after r272823:
Move the SCTP syscalls to netinet with the rest of the SCTP code.

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: tuexen, rrs
Obtained from: Juniper Networks, Inc.

9 years agoMove the SCTP syscalls to netinet with the rest of the SCTP code. The
marcel [Thu, 9 Oct 2014 15:16:52 +0000 (15:16 +0000)]
Move the SCTP syscalls to netinet with the rest of the SCTP code.  The
syscalls themselves are tightly coupled with the network stack and
therefore should not be in the generic socket code.

The following four syscalls have been marked as NOSTD so they can be
dynamically registered in sctp_syscalls_init() function:
  sys_sctp_peeloff
  sys_sctp_generic_sendmsg
  sys_sctp_generic_sendmsg_iov
  sys_sctp_generic_recvmsg

The syscalls are also set up to be dynamically registered when COMPAT32
option is configured.

As a side effect of moving the SCTP syscalls, getsock_cap needs to be
made available outside of the uipc_syscalls.c source file.  A proper
prototype has been added to the sys/socketvar.h header file.

API tests from the SCTP reference implementation have been run to ensure
compatibility. (http://code.google.com/p/sctp-refimpl/source/checkout)

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: tuexen, rrs
Obtained from: Juniper Networks, Inc.

9 years agoAdd sysctl knob to disable port power on a specific USB HUB. You need
hselasky [Thu, 9 Oct 2014 14:43:43 +0000 (14:43 +0000)]
Add sysctl knob to disable port power on a specific USB HUB. You need
to reset the USB HUB using "usbconfig -d X.Y reset" or boot having the
setting in /boot/loader.conf before it activates.

9 years agoFix core on table destroy inroduced by table values code.
melifaro [Thu, 9 Oct 2014 14:33:20 +0000 (14:33 +0000)]
Fix core on table destroy inroduced by table values code.
Rename @ti array copy to 'ti_copy'.

9 years agoAdd example devd configuration file for USB printers.
hselasky [Thu, 9 Oct 2014 13:58:19 +0000 (13:58 +0000)]
Add example devd configuration file for USB printers.

9 years ago* Fix use-after-free in table printing code.
melifaro [Thu, 9 Oct 2014 12:54:56 +0000 (12:54 +0000)]
* Fix use-after-free in table printing code.
* Fix showing human-readable error in table cmds code.

9 years ago* Wire large user buffer before processing GET request.
melifaro [Thu, 9 Oct 2014 12:37:53 +0000 (12:37 +0000)]
* Wire large user buffer before processing GET request.
* Fix incorrect size calculation for IP_FW_XGET request.

9 years agoOnly catch the line from the compiler output where 'version' is a word
bapt [Thu, 9 Oct 2014 12:35:17 +0000 (12:35 +0000)]
Only catch the line from the compiler output  where 'version' is a word
This allows to build the kernel with gcc 4.9.1 from ports

9 years agoFix typo
bapt [Thu, 9 Oct 2014 12:20:00 +0000 (12:20 +0000)]
Fix typo

9 years agoAdd OBJCOPY to the list of external tools
bapt [Thu, 9 Oct 2014 10:47:14 +0000 (10:47 +0000)]
Add OBJCOPY to the list of external tools

9 years agoFix build when XCC is defined and X_COMPILER_TYPE is not
bapt [Thu, 9 Oct 2014 09:46:44 +0000 (09:46 +0000)]
Fix build when XCC is defined and X_COMPILER_TYPE is not

9 years agoMake iSCSI connection close somewhat less aggressive.
mav [Thu, 9 Oct 2014 09:12:08 +0000 (09:12 +0000)]
Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.

9 years agoAdd CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
bapt [Thu, 9 Oct 2014 09:04:01 +0000 (09:04 +0000)]
Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
The goal is to provide pre seeded toolchain configurations withing the ports tree
to allow the use of an external toolchain in a simple way:

make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld

This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk
While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow
to deal with differences between gcc and clang in regards of cross building

9 years agoMFV r272804:
delphij [Thu, 9 Oct 2014 07:52:51 +0000 (07:52 +0000)]
MFV r272804:

Refactor the code and stop restore_object from creating two transactions.

Illumos issue:
    3693 restore_object uses at least two transactions to restore an object

MFC after: 2 weeks

9 years agoMFV r272803:
delphij [Thu, 9 Oct 2014 07:18:40 +0000 (07:18 +0000)]
MFV r272803:

Illumos issue:
    5175 implement dmu_read_uio_dbuf() to improve cached read performance

MFC after: 2 weeks

9 years agoFix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp
bapt [Thu, 9 Oct 2014 06:58:33 +0000 (06:58 +0000)]
Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp

9 years agoRefine support for disabling USB enumeration to allow device detach
hselasky [Thu, 9 Oct 2014 06:24:06 +0000 (06:24 +0000)]
Refine support for disabling USB enumeration to allow device detach
and suspend and resume of existing devices.

MFC after: 2 weeks

9 years agoMFV r272802:
delphij [Thu, 9 Oct 2014 06:02:53 +0000 (06:02 +0000)]
MFV r272802:

 - Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection

MFC after: 2 weeks

9 years agoUse proper variable when looping through periphs with CAM_PERIPH_FREE.
mav [Thu, 9 Oct 2014 05:53:58 +0000 (05:53 +0000)]
Use proper variable when looping through periphs with CAM_PERIPH_FREE.

PR: 194256
Submitted by: Scott M. Ferris <smferris@gmail.com>
MFC after: 3 days
Sponsored by: EMC/Isilon Storage Division

9 years agoMove the calls to u_tun_func() into udp6_append()
bryanv [Thu, 9 Oct 2014 05:42:07 +0000 (05:42 +0000)]
Move the calls to u_tun_func() into udp6_append()

A similar cleanup for UDPv4 was performed in r220620.

Phabricator: https://reviews.freebsd.org/D383
Reviewed by: gnn
MFC after: 1 month

9 years agoMissing from previous commit - keep the VM domain -> PXM mapping
adrian [Thu, 9 Oct 2014 05:34:28 +0000 (05:34 +0000)]
Missing from previous commit - keep the VM domain -> PXM mapping
array and use it to map PXM -> VM domain when needed.

Differential Revision: D906
Reviewed by: jhb

9 years agoAdd a bus method to fetch the VM domain for the given device/bus.
adrian [Thu, 9 Oct 2014 05:33:25 +0000 (05:33 +0000)]
Add a bus method to fetch the VM domain for the given device/bus.

* Add a bus_if.m method - get_domain() - returning the VM domain or
  ENOENT if the device isn't in a VM domain;
* Add bus methods to print out the domain of the device if appropriate;
* Add code in srat.c to save the PXM -> VM domain mapping that's done and
  expose a function to translate VM domain -> PXM;
* Add ACPI and ACPI PCI methods to check if the bus has a _PXM attribute
  and if so map it to the VM domain;
* (.. yes, this works recursively.)
* Have the pci bus glue print out the device VM domain if present.

Note: this is just the plumbing to start enumerating information -
it doesn't at all modify behaviour.

Differential Revision: D906
Reviewed by: jhb
Sponsored by: Norse Corp

9 years agoCheck for mbuf copy failure when there are multiple multicast sockets
bryanv [Thu, 9 Oct 2014 05:17:47 +0000 (05:17 +0000)]
Check for mbuf copy failure when there are multiple multicast sockets

This partitular case is the only path where the mbuf could be NULL.
udp_append() checked for a NULL mbuf only after invoking the tunneling
callback. Our only in tree tunneling callback - SCTP - assumed a non
NULL mbuf, and it is a bit odd to make the callbacks responsible for
checking this condition.

This also reduces the differences between the IPv4 and IPv6 code.

MFC after: 1 month

9 years agoAdd M_FLOWID to M_COPYFLAGS
bryanv [Thu, 9 Oct 2014 04:40:19 +0000 (04:40 +0000)]
Add M_FLOWID to M_COPYFLAGS

The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.

Phabricator: https://reviews.freebsd.org/D914
Reviewed by: adrian
Obtained from: NetApp
MFC after: 1 week

9 years agoFix draining in ttydev_leave():
marcel [Thu, 9 Oct 2014 02:30:38 +0000 (02:30 +0000)]
Fix draining in ttydev_leave():
1.  ERESTART is not only returned when the revoke count changed. It
    is also returned when a signal is received. While a change in
    the revoke count should be ignored, a signal should not.
2.  Waiting until the output queue is entirely drained can cause a
    hang when the underlying device is stuck or broken.

Have tty_drain() take care of this by telling it when we're leaving.
When leaving, tty_drain() will use a timed wait to address point 2
above and it will check the revoke count to handle point 1 above.
The timeout is set to 1 second, which is arbitrary and long enough
to expect a change in the output queue.

Discussed with: jilles@
Reported by: Yamagi Burmeister <lists@yamagi.org>

9 years agoIntegrate usr.bin/gzip/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 02:24:34 +0000 (02:24 +0000)]
Integrate usr.bin/gzip/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests
ngie [Thu, 9 Oct 2014 02:07:34 +0000 (02:07 +0000)]
Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests

Sponsored by: EMC / Isilon Storage Division

9 years agoApply r269126 to tty_timedwait():
marcel [Thu, 9 Oct 2014 01:59:25 +0000 (01:59 +0000)]
Apply r269126 to tty_timedwait():
Don't return ERESTART when the device is gone.

9 years agoProperly NUL-terminate the on-stack buffer for reading /boot.config
marcel [Thu, 9 Oct 2014 01:54:32 +0000 (01:54 +0000)]
Properly NUL-terminate the on-stack buffer for reading /boot.config
or /boot/config. In qemu, on a warm boot, the stack is not all zeroes
and we parse beyond the file's contents.

Obtained from: Juniper Networks, Inc.

9 years agoIntegrate usr.bin/grep/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:53:23 +0000 (01:53 +0000)]
Integrate usr.bin/grep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cut/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:46:31 +0000 (01:46 +0000)]
Integrate usr.bin/cut/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate bin/sleep/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 01:39:07 +0000 (01:39 +0000)]
Integrate bin/sleep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/dirname/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:55:04 +0000 (00:55 +0000)]
Integrate usr.bin/dirname/tests from NetBSD into atf/kyua

In collaboration with: pho, sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cmp/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:50:33 +0000 (00:50 +0000)]
Integrate usr.bin/cmp/tests from NetBSD into atf/kyua

In collaboration with: sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.sbin/basename/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:41:42 +0000 (00:41 +0000)]
Integrate usr.sbin/basename/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoSet the autoindent to 4 spaces with vim in BSD.tests.dist
ngie [Thu, 9 Oct 2014 00:37:58 +0000 (00:37 +0000)]
Set the autoindent to 4 spaces with vim in BSD.tests.dist

This will prevent vim users from accidentally checking in buggy mtree files
(mixed tabs/spaces).

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
ngie [Thu, 9 Oct 2014 00:32:33 +0000 (00:32 +0000)]
Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoForgot to bump Dd.
jhb [Wed, 8 Oct 2014 21:56:00 +0000 (21:56 +0000)]
Forgot to bump Dd.

Pointy hat to: jhb

9 years agoRewrite timeout(9) to be callout(9)-centric instead. Move the description
jhb [Wed, 8 Oct 2014 21:53:24 +0000 (21:53 +0000)]
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.

Differential Revision: https://reviews.freebsd.org/D847
Reviewed by: wblock, bjk
MFC after: 1 week

9 years agoWhen tunneling interface is going to insert mbuf into netisr queue after stripping
ae [Wed, 8 Oct 2014 21:23:34 +0000 (21:23 +0000)]
When tunneling interface is going to insert mbuf into netisr queue after stripping
outer header, consider it as new packet and clear the protocols flags.

This fixes problems when IPSEC traffic goes through various tunnels and router
doesn't send ICMP/ICMPv6 errors.

PR: 174602
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoImport byacc 20141006
bapt [Wed, 8 Oct 2014 20:46:38 +0000 (20:46 +0000)]
Import byacc 20141006

9 years agoPass up the error status of minidumpsys() to its callers.
markj [Wed, 8 Oct 2014 20:25:21 +0000 (20:25 +0000)]
Pass up the error status of minidumpsys() to its callers.

PR: 193761
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove one second wait for threads exit from icl_conn_close().
mav [Wed, 8 Oct 2014 19:54:42 +0000 (19:54 +0000)]
Remove one second wait for threads exit from icl_conn_close().

Switch it from polling with pause() to using cv_wait()/cv_signal().

9 years agoIt looks like an entry for the R215 is not required in cdce(4) after all.
gavin [Wed, 8 Oct 2014 19:49:10 +0000 (19:49 +0000)]
It looks like an entry for the R215 is not required in cdce(4) after all.

9 years agoIf we fail to send a signal after rotation, print the pidfile from which
markj [Wed, 8 Oct 2014 17:44:30 +0000 (17:44 +0000)]
If we fail to send a signal after rotation, print the pidfile from which
the corresponding PID was obtained.

PR: 194143
Submitted by: Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after: 1 week

9 years agoCorrect scale factor for T terabyte suffix
emaste [Wed, 8 Oct 2014 17:40:58 +0000 (17:40 +0000)]
Correct scale factor for T terabyte suffix

PR: 194250
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd an argument to the x86 pmap_invalidate_cache_range() to request
kib [Wed, 8 Oct 2014 16:48:03 +0000 (16:48 +0000)]
Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.  Some recent Intel GPUs in some modes are not
coherent, and dirty lines in CPU cache must be flushed before the
pages are transferred to GPU domain.

Reviewed by: alc (previous version)
Tested by: pho (amd64)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd schedgraph traces for callout handlers. Specifically, a callwheel logs
jhb [Wed, 8 Oct 2014 16:22:59 +0000 (16:22 +0000)]
Add schedgraph traces for callout handlers.  Specifically, a callwheel logs
a running event each time it executes a callout function.  The event
includes the function pointer, argument, and whether or not it was run from
hardware interrupt context.  The callwheel is marked idle when each handler
completes.  This effectively logs the duration of each callout routine in
the graph.

9 years agoProperly report 12Gbps connection rate.
mav [Wed, 8 Oct 2014 16:22:26 +0000 (16:22 +0000)]
Properly report 12Gbps connection rate.

Reviewed by: kadesai, slm
MFC after: 1 week

9 years agoEnsure that the list of streams sent in a stream reset parameter fits
tuexen [Wed, 8 Oct 2014 15:30:59 +0000 (15:30 +0000)]
Ensure that the list of streams sent in a stream reset parameter fits
in an mbuf-cluster.
Thanks to Peter Bostroem for drawing my attention to this part of the code.

9 years agoEnsure that the number of stream reported in srs_number_streams is
tuexen [Wed, 8 Oct 2014 15:29:49 +0000 (15:29 +0000)]
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.

9 years agoFix comment.
ae [Wed, 8 Oct 2014 12:33:31 +0000 (12:33 +0000)]
Fix comment.

MFC after: 1 week

9 years agoImplement software (mode page) and hardware (config) write protection.
mav [Wed, 8 Oct 2014 12:24:24 +0000 (12:24 +0000)]
Implement software (mode page) and hardware (config) write protection.

9 years agoRevert r156046. We support setting dumpdev via loader tunable again.
ae [Wed, 8 Oct 2014 12:19:48 +0000 (12:19 +0000)]
Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after: 3 weeks

9 years agoAdd an ability to set dumpdev via loader(8) tunable.
ae [Wed, 8 Oct 2014 12:18:16 +0000 (12:18 +0000)]
Add an ability to set dumpdev via loader(8) tunable.

MFC after: 3 weeks

9 years agoAdd IP_FW_DUMP_SOPTCODES sopt to be able to determine
melifaro [Wed, 8 Oct 2014 11:12:14 +0000 (11:12 +0000)]
Add IP_FW_DUMP_SOPTCODES sopt to be able to determine
which opcodes are currently available in kernel.

9 years agoNo logical code change in this pathc.
kadesai [Wed, 8 Oct 2014 10:14:37 +0000 (10:14 +0000)]
No logical code change in this pathc.
Only Style 9 changes for mrsas driver.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoSimplify; no functional changes.
trasz [Wed, 8 Oct 2014 09:44:02 +0000 (09:44 +0000)]
Simplify; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoDriver version upgrade.
kadesai [Wed, 8 Oct 2014 09:39:18 +0000 (09:39 +0000)]
Driver version upgrade.
Bring head mrsas same as internal Phase 6.5.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoIn the passthru IOCTL path, the mfi command pool was freely accessible N times
kadesai [Wed, 8 Oct 2014 09:37:47 +0000 (09:37 +0000)]
In the passthru IOCTL path, the mfi command pool was freely accessible N times
where as there are limited number(32) of mfi commands in the pool.
The mfi command pool is now restricted to 27 simultaneous accesses by using
a counting semaphore while calling the passthru function.

In the mrsas_cam.c source file there was a same function name mrsas_poll(),
which was same as the mrsas_poll() implemented in the mrsas.c file for the
polling interface.
To clearly distinguish the functionality by usage we have renamed the former
as mrsas_cam_poll().

In the passthru function let's say it has got an mfi command from the pool
but it has failed in one of the DMA function call which will lead to leak
an mfi command because in the ERROR case it directly returns and not freeing up
the occupied mfi command.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agod_poll() callback function is the entry point for poll system call for the application.
kadesai [Wed, 8 Oct 2014 09:35:52 +0000 (09:35 +0000)]
d_poll() callback function is the entry point for poll system call for the application.
It is meant to notify the applications which will be waiting for some
controller events to be occured.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoExtended MSI-x vectors support for Invader and Fury(12Gb/s HBA).
kadesai [Wed, 8 Oct 2014 09:34:25 +0000 (09:34 +0000)]
Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA).

This Driver will create multiple MSI-x vector depending upon what FW expose.
As of now 12 Gbp/s MR controller (Invader and Fury) expose 96 msix vector.
As of now 6 Gbp/s MR controller (Thunderbolt) expose 16 msix vector.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoFix the minor svn add issue. $FreeBSD$ expands at the time of
kadesai [Wed, 8 Oct 2014 09:30:35 +0000 (09:30 +0000)]
Fix the minor svn add issue. $FreeBSD$ expands at the time of
snv add, so I have added $FreeBSD$ as comment.

This commit is contininous of last mrsas commit, so that compilation
does not break.

Obtained from: AVAGO Technologies
MFC after: 2 weeks

9 years agoThis is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
kadesai [Wed, 8 Oct 2014 09:19:35 +0000 (09:19 +0000)]
This is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
machine, for which 32bit compatibilty code has been added.
As in linux there is only one device entry that is used to fire IOCTL commands,
a new device entry megaraid_sas_ioctl_node is added for solely this
purpose.

From one dev node i.e mrgaraid_sa_ioctl_node we have to find out the
controller instance in case of multicontroller, for which one management info
structure has been added.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAlways wait 'command done' interrupt status bit before proceeding next command.
br [Wed, 8 Oct 2014 08:51:05 +0000 (08:51 +0000)]
Always wait 'command done' interrupt status bit before proceeding next command.

Sponsored by: DARPA, AFRL

9 years agoCurrent MegaRAID firmware and hence the driver only supported 64VDs.
kadesai [Wed, 8 Oct 2014 08:48:18 +0000 (08:48 +0000)]
Current MegaRAID firmware and hence the driver only supported 64VDs.
E.g: If the user wants to create more than 64VD on a controller,
    it is not possible on current firmware/driver.

New feature and requirement to support upto 256VD, firmware/driver/apps need changes.
In addition to that, there must be a backward compatibility of the new driver with the
older firmware and vice versa.

RAID map is the interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.
In the earlier design driver was using the FW copy of RAID map where as
in the new design the Driver will keep the RAID map copy of its own; on which
it will operate for any raid map access in fast path.

Local driver raid map copy will provide ease of access through out the code
and provide generic interface for future FW raid map changes.

For the backward compatibility driver will notify FW that it supports 256VD
to the FW in driver capability field.
Based on the controller properly returned by the FW, the Driver will know
whether it supports 256VD or not and will copy the RAID map accordingly.

At any given time, driver will always have old or new Raid map.

Reviewed by : ambrisko
MFC after : 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAdd support for WRITE ATOMIC (16) command and report SBC-4 compliance.
mav [Wed, 8 Oct 2014 07:48:36 +0000 (07:48 +0000)]
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.

9 years agoAdd support for disabling USB enumeration in general or on selected
hselasky [Wed, 8 Oct 2014 07:00:50 +0000 (07:00 +0000)]
Add support for disabling USB enumeration in general or on selected
USB HUBs.

MFC after: 2 weeks

9 years agoOops, fix typo made in r272729.
yongari [Wed, 8 Oct 2014 05:53:04 +0000 (05:53 +0000)]
Oops, fix typo made in r272729.