]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpgrade to OpenSSH 6.9p1.
des [Tue, 19 Jan 2016 18:55:44 +0000 (18:55 +0000)]
Upgrade to OpenSSH 6.9p1.

8 years agoRe-add HPN configuration options as deprecated options to avoid breaking
des [Tue, 19 Jan 2016 18:38:17 +0000 (18:38 +0000)]
Re-add HPN configuration options as deprecated options to avoid breaking
existing configurations that use them.  Note that there is no functional
difference between OpenSSH with HPN and OpenSSH without HPN.

8 years agobegone, foul autoprops!
des [Tue, 19 Jan 2016 18:32:51 +0000 (18:32 +0000)]
begone, foul autoprops!

8 years agoUpgrade to OpenSSH 6.8p1.
des [Tue, 19 Jan 2016 18:28:23 +0000 (18:28 +0000)]
Upgrade to OpenSSH 6.8p1.

8 years agoRemove local override for .cpp.o and .cpp.po rules
emaste [Tue, 19 Jan 2016 17:40:29 +0000 (17:40 +0000)]
Remove local override for .cpp.o and .cpp.po rules

The local build rule used to set -fvisibility=hidden and -fPIC, in
addition to -fexceptions and -D defines that had no effect.

With -fvisibility=hidden and -fPIC in STATIC_CXXFLAGS the standard
bsd.lib.mk rules are suitable for libgcc_s's C++ source.

PR: 206381
Sponsored by: The FreeBSD Foundation

8 years agoNow that we have local modifications in configure.ac and configure, run
des [Tue, 19 Jan 2016 17:20:07 +0000 (17:20 +0000)]
Now that we have local modifications in configure.ac and configure, run
autoheader and autoconf to avoid having to patch configure manually.

8 years agoDisallow zvol-backed ZFS pools
asomers [Tue, 19 Jan 2016 17:00:25 +0000 (17:00 +0000)]
Disallow zvol-backed ZFS pools

Using zvols as backing devices for ZFS pools is fraught with panics and
deadlocks. For example, attempting to online a missing device in the
presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
to completely disable vdev_geom from ever opening a zvol. The solution
relies on setting a thread-local variable during vdev_geom_open, and
returning EOPNOTSUPP during zvol_open if that thread-local variable is set.

Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
was to prevent a recursive mutex acquisition panic. However, the new check
for the thread-local variable also fixes that problem.

Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
function was set to panic. But it can occur that a device disappears during
tasting, and it causes no problems to ignore this departure.

Reviewed by: delphij
MFC after: 1 week
Relnotes: yes
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4986

8 years agoUpgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
des [Tue, 19 Jan 2016 16:18:26 +0000 (16:18 +0000)]
Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
upstream) and a number of security fixes which we had already backported.

MFC after: 1 week

8 years agoAdd optimizing LRO wrapper:
hselasky [Tue, 19 Jan 2016 15:33:28 +0000 (15:33 +0000)]
Add optimizing LRO wrapper:

- Add optimizing LRO wrapper which pre-sorts all incoming packets
  according to the hash type and flowid. This prevents exhaustion of
  the LRO entries due to too many connections at the same time.
  Testing using a larger number of higher bandwidth TCP connections
  showed that the incoming ACK packet aggregation rate increased from
  ~1.3:1 to almost 3:1. Another test showed that for a number of TCP
  connections greater than 16 per hardware receive ring, where 8 TCP
  connections was the LRO active entry limit, there was a significant
  improvement in throughput due to being able to fully aggregate more
  than 8 TCP stream. For very few very high bandwidth TCP streams, the
  optimizing LRO wrapper will add CPU usage instead of reducing CPU
  usage. This is expected. Network drivers which want to use the
  optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead
  of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of
  "tcp_lro_flush()". Further the LRO control structure must be
  initialized using "tcp_lro_init_args()" passing a non-zero number
  into the "lro_mbufs" argument.

- Make LRO statistics 64-bit. Previously 32-bit integers were used for
  statistics which can be prone to wrap-around. Fix this while at it
  and update all SYSCTL's which expose LRO statistics.

- Ensure all data is freed when destroying a LRO control structures,
  especially leftover LRO entries.

- Reduce number of memory allocations needed when setting up a LRO
  control structure by precomputing the total amount of memory needed.

- Add own memory allocation counter for LRO.

- Bump the FreeBSD version to force recompilation of all KLDs due to
  change of the LRO control structure size.

Sponsored by: Mellanox Technologies
Reviewed by: gallatin, sbruno, rrs, gnn, transport
Tested by: Netflix
Differential Revision: https://reviews.freebsd.org/D4914

8 years agoTest for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH
bapt [Tue, 19 Jan 2016 15:02:37 +0000 (15:02 +0000)]
Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH

Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment,
libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists,
and to "/etc/ssl/cert.pem" otherwise. This has the consequence of
masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA
file is set but fails to load (see X509_STORE_load_locations()).

While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor
SSL_CA_CERT_PATH are set in the environment, and if neither of the
libfetch default CA files exists.

PR: 193871
Submitted by: John W. O'Brien <john@saltant.com>
Approved by: des
MFC after: 1 week

8 years agoAs previously threatened, remove the HPN patch from OpenSSH.
des [Tue, 19 Jan 2016 14:38:20 +0000 (14:38 +0000)]
As previously threatened, remove the HPN patch from OpenSSH.

8 years agoUse 'svn list -R' instead of find, and recognize comments in shell scripts
des [Tue, 19 Jan 2016 14:25:22 +0000 (14:25 +0000)]
Use 'svn list -R' instead of find, and recognize comments in shell scripts
and {ssh,sshd}_config.

8 years agoRecognize *roff comments.
des [Tue, 19 Jan 2016 13:15:57 +0000 (13:15 +0000)]
Recognize *roff comments.

8 years agoAdd "vidcontrol -i active", to print out active vty number,
trasz [Tue, 19 Jan 2016 13:09:20 +0000 (13:09 +0000)]
Add "vidcontrol -i active", to print out active vty number,
to be used with eg "vidcontrol -s".

Reviewed by: emaste@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4968

8 years agoUpdate the pre- and post-merge scripts to work correctly after the recent
des [Tue, 19 Jan 2016 12:38:53 +0000 (12:38 +0000)]
Update the pre- and post-merge scripts to work correctly after the recent
cleanup.  A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh)
now results in an unchanged working copy.

8 years agoFix an issue where the network adapter could be left in down state
hselasky [Tue, 19 Jan 2016 10:24:47 +0000 (10:24 +0000)]
Fix an issue where the network adapter could be left in down state
after changing the HW LRO sysctl when previously in up state.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4941

8 years agoAdd clarifying comment about CQE zipping.
hselasky [Tue, 19 Jan 2016 10:19:33 +0000 (10:19 +0000)]
Add clarifying comment about CQE zipping.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4940

8 years agoDeclare local variables at top of function.
hselasky [Tue, 19 Jan 2016 10:17:24 +0000 (10:17 +0000)]
Declare local variables at top of function.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4939

8 years agoAllow RX and TX pause frames to be set through ifconfig.
hselasky [Tue, 19 Jan 2016 10:10:02 +0000 (10:10 +0000)]
Allow RX and TX pause frames to be set through ifconfig.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4817

8 years agoAdjust i386 comment to match amd64 one after r294311.
kib [Tue, 19 Jan 2016 08:09:09 +0000 (08:09 +0000)]
Adjust i386 comment to match amd64 one after r294311.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoUse ANSI definitions. Wrap long line.
kib [Tue, 19 Jan 2016 08:08:08 +0000 (08:08 +0000)]
Use ANSI definitions.  Wrap long line.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoClear whole XMM register file instead of only XMM0. Also clear x87
kib [Tue, 19 Jan 2016 08:04:02 +0000 (08:04 +0000)]
Clear whole XMM register file instead of only XMM0.  Also clear x87
registers.  This brings amd64 on par with i386, providing consistent
initial FPU state.

Note that we do not clear any extended state, at least because kernel
does not understand extended state structure and consequences of zero
overwrite after fninit()/fpusave().

Submitted by: joss.upton@yahoo.com
PR: 206370
MFC after: 2 weeks

8 years agosfxge: improve error handling in ef10_ev_rx()
arybchik [Tue, 19 Jan 2016 06:07:39 +0000 (06:07 +0000)]
sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4975

8 years agosfxge: select whether to read current or backup partition in Medford A/B scheme
arybchik [Tue, 19 Jan 2016 06:03:44 +0000 (06:03 +0000)]
sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4974

8 years agoRemove local override for .cpp.So rule
emaste [Tue, 19 Jan 2016 03:54:38 +0000 (03:54 +0000)]
Remove local override for .cpp.So rule

The standard bsd.lib.mk rule is suitable for libgcc_s's C++ source.

The local rule had the following non-functional argument differences
or additions:

1. -DSHARED (rather than -DPIC from bsd.lib.mk)

   The C++ sources don't have an #ifdef for either one.

2. -fexceptions

   This is enabled by default for C++ so does not need to be set
   explicitly.

3. -D__GLIBC__=3

   Not used by LLVM libunwind.

4. -DElfW=__ElfN

   LLVM libunwind provides its own definition.

PR: 206381
Differential Revision: The FreeBSD Foundation

8 years agoHide most of the PTE initialization and management.
jhibbits [Tue, 19 Jan 2016 03:07:25 +0000 (03:07 +0000)]
Hide most of the PTE initialization and management.

By confining the page table management to a handful of functions it'll be
easier to modify the page table scheme without affecting other functions.
This will be necessary when 64-bit support is added, and page tables become
much larger.

8 years agoAdd vrefl(), a locked variant of vref(9).
markj [Mon, 18 Jan 2016 22:21:46 +0000 (22:21 +0000)]
Add vrefl(), a locked variant of vref(9).

This API has no in-tree consumers at the moment but is useful to at least
one out-of-tree consumer, and naturally complements existing vnode refcount
functions (vholdl(9), vdropl(9)).

Obtained from: kib (sys/ portion)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4947
Differential Revision: https://reviews.freebsd.org/D4953

8 years agoImport misc.c,v 1.46 from OpenBSD (by espie@)
bapt [Mon, 18 Jan 2016 22:12:07 +0000 (22:12 +0000)]
Import misc.c,v 1.46 from OpenBSD (by espie@)

Yet another missed ferror call

8 years agoUpdate elftc version to 3272M, imported in r292120
emaste [Mon, 18 Jan 2016 21:53:39 +0000 (21:53 +0000)]
Update elftc version to 3272M, imported in r292120

8 years agoRestore ABI variants now that ldconfig groks -soft. In addition, as a
imp [Mon, 18 Jan 2016 21:40:20 +0000 (21:40 +0000)]
Restore ABI variants now that ldconfig groks -soft. In addition, as a
transition mechanism, if we don't have /usr/libsoft, assume that soft
float ABI binaries are the default, so treat them as default binaries.
When we've fully transitioned, it will make no sense to do this stat,
and it will be removed.

8 years agoAdd ldconfig -soft to process the soft float abi libraries and put it
imp [Mon, 18 Jan 2016 21:40:18 +0000 (21:40 +0000)]
Add ldconfig -soft to process the soft float abi libraries and put it
into startup scripts for armv6. It acts much like ldconfig -32 does.

8 years agoFix printing multibyte printing when performing a networked finger(1) request
bapt [Mon, 18 Jan 2016 20:47:04 +0000 (20:47 +0000)]
Fix printing multibyte printing when performing a networked finger(1) request

MFC after: 1 week

8 years agoReset the filesystem cache before reading from a potentially new
andrew [Mon, 18 Jan 2016 20:22:51 +0000 (20:22 +0000)]
Reset the filesystem cache before reading from a potentially new
filesystem. Without this we only read from the first UFS filesystem we
find, caching the result.

X-MFC with: The recent boot1.efi changes

8 years agomdoc: sort Xr
joel [Mon, 18 Jan 2016 20:21:38 +0000 (20:21 +0000)]
mdoc: sort Xr

8 years agoboot1: correct typo in error message
emaste [Mon, 18 Jan 2016 18:41:09 +0000 (18:41 +0000)]
boot1: correct typo in error message

8 years agoCorrect RISC-V exception types.
br [Mon, 18 Jan 2016 17:49:32 +0000 (17:49 +0000)]
Correct RISC-V exception types.

8 years agoMove RTAS PCI-specific interpretation of the "reg" property of the PCI host
nwhitehorn [Mon, 18 Jan 2016 17:27:16 +0000 (17:27 +0000)]
Move RTAS PCI-specific interpretation of the "reg" property of the PCI host
device to the RTAS driver, where it belongs.

8 years agoUse OF_decode_addr() to create a bus_space tag and handle for the console
ian [Mon, 18 Jan 2016 17:03:12 +0000 (17:03 +0000)]
Use OF_decode_addr() to create a bus_space tag and handle for the console
on FDT/OFW platforms.

After the refactoring of the powerpc code so that OF_decode_addr() is usable
on all FDT/OFW platforms, this switches uart(4) to using it.

Differential Revision: https://reviews.freebsd.org/D4675

8 years agoAdd RISC-V relocation types.
br [Mon, 18 Jan 2016 16:54:26 +0000 (16:54 +0000)]
Add RISC-V relocation types.

Reviewed by: emaste

8 years agoEnable AIO interface on ARM64 platforms
zbb [Mon, 18 Jan 2016 14:11:34 +0000 (14:11 +0000)]
Enable AIO interface on ARM64 platforms

Add VFS_AIO to generic config to allow using of high-performance
asynchronous disk AIO operation.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4979

8 years agoUpdate ThunderX PCIe driver to fit new DTS layout
zbb [Mon, 18 Jan 2016 13:31:29 +0000 (13:31 +0000)]
Update ThunderX PCIe driver to fit new DTS layout

In recent EFI the DTS entries changed for PCIe controller.
This commit fixes internal PCIe, external is yet TBD.

Submitted by:  Dominik Ermel <der@semihalf.com>
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4976

8 years agoFix EFI_DEBUG option
smh [Mon, 18 Jan 2016 12:02:05 +0000 (12:02 +0000)]
Fix EFI_DEBUG option

Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoFix compilation on MIPS (typo introduced in r294227).
br [Mon, 18 Jan 2016 09:36:10 +0000 (09:36 +0000)]
Fix compilation on MIPS (typo introduced in r294227).

8 years agoMFV r294260:
delphij [Mon, 18 Jan 2016 08:52:09 +0000 (08:52 +0000)]
MFV r294260:

Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@

8 years agosfxge: regenerate EF10 registers definition for Medford
arybchik [Mon, 18 Jan 2016 06:59:00 +0000 (06:59 +0000)]
sfxge: regenerate EF10 registers definition for Medford

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: fix unused function warning
arybchik [Mon, 18 Jan 2016 06:54:15 +0000 (06:54 +0000)]
sfxge: fix unused function warning

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: regenerate siena_flash.h from FW sources
arybchik [Mon, 18 Jan 2016 06:45:45 +0000 (06:45 +0000)]
sfxge: regenerate siena_flash.h from FW sources

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: remove extra empty lines
arybchik [Mon, 18 Jan 2016 06:39:06 +0000 (06:39 +0000)]
sfxge: cleanup: remove extra empty lines

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: highlight that descriptor cache sizes are configured using TLV now
arybchik [Mon, 18 Jan 2016 06:38:21 +0000 (06:38 +0000)]
sfxge: highlight that descriptor cache sizes are configured using TLV now

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: support RFID-selectable segments of dynamic configuration
arybchik [Mon, 18 Jan 2016 06:33:15 +0000 (06:33 +0000)]
sfxge: support RFID-selectable segments of dynamic configuration

tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU
arybchik [Mon, 18 Jan 2016 06:19:28 +0000 (06:19 +0000)]
sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU

This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4958

8 years agosfxge: convert nvram set_version method to use partition id
arybchik [Mon, 18 Jan 2016 06:18:01 +0000 (06:18 +0000)]
sfxge: convert nvram set_version method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: convert nvram get_version method to use partition id
arybchik [Mon, 18 Jan 2016 06:16:51 +0000 (06:16 +0000)]
sfxge: convert nvram get_version method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: convert nvram rw_finish method to use partition id
arybchik [Mon, 18 Jan 2016 06:14:43 +0000 (06:14 +0000)]
sfxge: convert nvram rw_finish method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: convert nvram write method to use partition id
arybchik [Mon, 18 Jan 2016 06:13:09 +0000 (06:13 +0000)]
sfxge: convert nvram write method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4961

8 years ago[iwm] fix up the rate control setup code to initialise rates in the order
adrian [Mon, 18 Jan 2016 05:43:34 +0000 (05:43 +0000)]
[iwm] fix up the rate control setup code to initialise rates in the order
we want to use it.

The rate table was being initialised in low->high, but the link quality
table was being initialised high->low. So, when we did a lookup, we
would get the indexes wrong.

This started by a patch from dragonflybsd which reversed how the ni->in_ridx[]
array is being used; I'd rather it all be consistent.  So, this is consistent.

Inspired by: what I did to iwn(4) a while ago
Inspired by: DragonflyBSD; <imre@vdsz.com>

8 years agoAdd extra checks to make sure the size is valid. We may get an integer
andrew [Mon, 18 Jan 2016 00:07:04 +0000 (00:07 +0000)]
Add extra checks to make sure the size is valid. We may get an integer
underflow when we have small blocks of memory at the start and end of the
32-bit address range.

While here, only insert mappings pointing at a non-zero amount of memory.

Sponsored by: ABT Systems Ltd

8 years agoQuick exit after setting the clock control register.
jhibbits [Sun, 17 Jan 2016 23:03:21 +0000 (23:03 +0000)]
Quick exit after setting the clock control register.

Discussed with: ian

8 years agoMake PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
ian [Sun, 17 Jan 2016 21:19:45 +0000 (21:19 +0000)]
Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
Previously the polarity was for TTL levels, which are the reverse of RS-232.

Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
value, the same as was recently added to uart(4), so that people using TTL
level connections can request a logical inverting of the signal.

Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
capture modes and option bits.

8 years agoutimensat(2): Correct description of [EINVAL] error.
jilles [Sun, 17 Jan 2016 21:14:27 +0000 (21:14 +0000)]
utimensat(2): Correct description of [EINVAL] error.

MFC after: 4 days

8 years agoPrevent double free of control in common sendmsg path as sosend
dchagin [Sun, 17 Jan 2016 19:28:13 +0000 (19:28 +0000)]
Prevent double free of control in common sendmsg path as sosend
already freeing it.

8 years agoBring in initial libc and libstand support for RISC-V.
br [Sun, 17 Jan 2016 15:21:23 +0000 (15:21 +0000)]
Bring in initial libc and libstand support for RISC-V.

Reviewed by: andrew, emaste, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4943

8 years agoWhen cleaning up from failed adv locking and checking for write, do
kib [Sun, 17 Jan 2016 08:40:51 +0000 (08:40 +0000)]
When cleaning up from failed adv locking and checking for write, do
not call VOP_CLOSE() manually.  Instead, delegate the close to
fo_close() performed as part of the fdrop() on the file failed to
open.  For this, finish constructing file on error, in particular, set
f_vnode and f_ops.

Forcibly resetting f_ops to badfileops disabled additional cleanups
performed by fo_close() for some file types, in this case it was noted
that cdevpriv data was corrupted.  Since fo_close() call must be
enabled for some file types, it makes more sense to enable it for all
files opened through vn_open_cred().

In collaboration with: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAssert that the linkage between struct cdev_privdata and and struct
kib [Sun, 17 Jan 2016 08:34:35 +0000 (08:34 +0000)]
Assert that the linkage between struct cdev_privdata and and struct
file is consistent.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agosfxge: convert nvram erase method to use partition id
arybchik [Sun, 17 Jan 2016 05:12:37 +0000 (05:12 +0000)]
sfxge: convert nvram erase method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4957

8 years ago[PR 206224] bv_cnt is sometimes examined without holding the bufobj lock
rpokala [Sun, 17 Jan 2016 01:04:20 +0000 (01:04 +0000)]
[PR 206224] bv_cnt is sometimes examined without holding the bufobj lock

Add locking around access to bv_cnt which is currently being done unlocked

PR: 206224
Reviewed by: imp
Approved by: jhb
MFC after: 1 week
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4931

8 years agoRemove leading slashes added to ObsoleteFiles.inc in r294113.
dim [Sun, 17 Jan 2016 00:52:28 +0000 (00:52 +0000)]
Remove leading slashes added to ObsoleteFiles.inc in r294113.

8 years agourtwn: add ROM structure for RTL8188EU
avos [Sun, 17 Jan 2016 00:52:21 +0000 (00:52 +0000)]
urtwn: add ROM structure for RTL8188EU

- Add the structure with already known fields offsets
  (some of them were taken from this driver,
  some (channel_plan, rf_* fields) - from TP-LINK official driver)
- Fix a typo / dehardcode a constant in RTL8192C ROM structure.

Tested with RTL8188EU, STA mode

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4274

8 years agoe5500 HWPMC is identical to e500mc, so add support check for it.
jhibbits [Sun, 17 Jan 2016 00:14:22 +0000 (00:14 +0000)]
e5500 HWPMC is identical to e500mc, so add support check for it.

8 years agoDon't bother checking an ip[46].addr netmask/prefixlen. This is already
jamie [Sat, 16 Jan 2016 22:32:57 +0000 (22:32 +0000)]
Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
handled by ifconfig, and it was doing it wrong when the paramater included
extra ifconfig options.

PR: 205926
MFC after: 5 days

8 years agoPartially revert r294055.
jhibbits [Sat, 16 Jan 2016 21:24:12 +0000 (21:24 +0000)]
Partially revert r294055.

This part was a botched revert of a test change.

Spotted by: alc

8 years agoNever 4k align the MBR bootpool because zfsldr can not deal with a gap
allanjude [Sat, 16 Jan 2016 19:25:16 +0000 (19:25 +0000)]
Never 4k align the MBR bootpool because zfsldr can not deal with a gap

If the bootpool does not start at the first sector of the BSD partition
then zfsldr seeks to the wrong offset inside the ZFS vdev label, and is
unable to find zfsboot, so the system does not boot

If 4k alignment is requested, align the BSD partition in the MBR table,
and align the swap and data pool, but the bootpool must start at sector 1

While here, if 4k alignment is requested, disable MBR CHS alignment, as
this results in not-4k aligned partitions.

Reported by: Alex Wilkinson
MFC after: 5 days
Sponsored by: ScaleEngine Inc.

8 years agoClear errno before calling getpw*.
jamie [Sat, 16 Jan 2016 18:13:28 +0000 (18:13 +0000)]
Clear errno before calling getpw*.

8 years agoUse __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes
andrew [Sat, 16 Jan 2016 10:12:50 +0000 (10:12 +0000)]
Use __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes
an issue with clang 3.8.0 where none of the __ARM_ARCH_*__ macros were
defined on some ARMv6 kernel configs.

Sponsored by: ABT Systems Ltd

8 years agoBusy the mount point which is the owner of the audit vnode, around
kib [Sat, 16 Jan 2016 10:06:33 +0000 (10:06 +0000)]
Busy the mount point which is the owner of the audit vnode, around
audit_record_write().  This is important so that VFS_STATFS() is not
done on the NULL or freed mp and the check for free space is
consistent with the vnode used for write.

Add vn_start_write() braces around VOP_FSYNC() calls on the audit vnode.

Move repeated code to fsync vnode and panic to the helper
audit_worker_sync_vp().

Reviewed by: rwatson
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoCompile for specific cortex model inside the RPi 2. It's closer to
imp [Sat, 16 Jan 2016 05:58:17 +0000 (05:58 +0000)]
Compile for specific cortex model inside the RPi 2. It's closer to
working, and might actually work...

8 years agoWe don't need at91_bs_tag. arm_base_bs_tag works now that we have
imp [Sat, 16 Jan 2016 05:47:34 +0000 (05:47 +0000)]
We don't need at91_bs_tag. arm_base_bs_tag works now that we have
better dynamic device mapping that didn't exit when we started this
port. Remove it, since everything works w/o it.

8 years agoBump .Dd for the content changes
ngie [Sat, 16 Jan 2016 05:35:42 +0000 (05:35 +0000)]
Bump .Dd for the content changes

8 years agoMove ohci files to their proper place in the tree for atmel.
imp [Sat, 16 Jan 2016 04:47:32 +0000 (04:47 +0000)]
Move ohci files to their proper place in the tree for atmel.
Fix when it is included (we don't have a at91rm9200 device).
From a similar patch in the PR, with tweaked names.

PR: 206229

8 years agoA fix to r292469: Iterate over the physical segments in descending rather
alc [Sat, 16 Jan 2016 04:41:40 +0000 (04:41 +0000)]
A fix to r292469: Iterate over the physical segments in descending rather
than ascending order in vm_phys_alloc_contig() so that, for example, a
sequence of contigmalloc(low=0, high=4GB) calls doesn't exhaust the supply
of low physical memory resulting in a later contigmalloc(low=0, high=1MB)
failure.

Reported by: cy
Tested by: cy
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wunused warning with clang/gcc
ngie [Sat, 16 Jan 2016 02:19:56 +0000 (02:19 +0000)]
Fix -Wunused warning with clang/gcc

- Get rid of unused argc/argv variables in main
- Bump WARNS to 6

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix warnings with clang/gcc
ngie [Sat, 16 Jan 2016 02:18:36 +0000 (02:18 +0000)]
Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix warnings with gcc 5.0
ngie [Sat, 16 Jan 2016 02:15:13 +0000 (02:15 +0000)]
Fix warnings with gcc 5.0

reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division

8 years agoTest for EPROTOTYPE not EPROTONOSUPPORT
ngie [Sat, 16 Jan 2016 02:02:50 +0000 (02:02 +0000)]
Test for EPROTOTYPE not EPROTONOSUPPORT

- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing newline to message about requiring root privileges
ngie [Sat, 16 Jan 2016 01:37:17 +0000 (01:37 +0000)]
Add missing newline to message about requiring root privileges

This will help ensure that scripts/parsers don't get confused when the message
is printed out

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agotrim-time? What was I thinking. run-time.
imp [Sat, 16 Jan 2016 01:30:55 +0000 (01:30 +0000)]
trim-time? What was I thinking. run-time.

Noticed by: Allan Jude

8 years agoAdd some clarifications.
imp [Sat, 16 Jan 2016 01:13:27 +0000 (01:13 +0000)]
Add some clarifications.

8 years agoImprove the sentence flow as well which has the happy benefit of
imp [Sat, 16 Jan 2016 00:45:48 +0000 (00:45 +0000)]
Improve the sentence flow as well which has the happy benefit of
making read-only modify a noun, a case where it unquestionably should
be hyphenated.

8 years agoAlthough not directly modifying a noun, read-only should be hyphenated
imp [Sat, 16 Jan 2016 00:43:10 +0000 (00:43 +0000)]
Although not directly modifying a noun, read-only should be hyphenated
in this context (or in any, really).

8 years agoRead-only is typically hyphenated. Move (read only) to a spot where it
imp [Sat, 16 Jan 2016 00:39:36 +0000 (00:39 +0000)]
Read-only is typically hyphenated. Move (read only) to a spot where it
modifies a noun and hyphenate.

8 years agoRead-only is hyphenated when it modifies a noun.
imp [Sat, 16 Jan 2016 00:37:27 +0000 (00:37 +0000)]
Read-only is hyphenated when it modifies a noun.

8 years agoUpdate mandoc to 20160116
bapt [Fri, 15 Jan 2016 23:28:12 +0000 (23:28 +0000)]
Update mandoc to 20160116

8 years agoRemove config.h imported by accident
bapt [Fri, 15 Jan 2016 23:16:04 +0000 (23:16 +0000)]
Remove config.h imported by accident

8 years ago- Add support for zip to lesspipe.sh
ak [Fri, 15 Jan 2016 23:13:01 +0000 (23:13 +0000)]
- Add support for zip to lesspipe.sh

Approved by: des

8 years agoImport mdocml CVS snapshot 20160116
bapt [Fri, 15 Jan 2016 23:08:59 +0000 (23:08 +0000)]
Import mdocml CVS snapshot 20160116

8 years ago- Match directory extraction message with Infozip [1]
ak [Fri, 15 Jan 2016 23:04:36 +0000 (23:04 +0000)]
- Match directory extraction message with Infozip [1]
- Add comment explaining masks in check_binary()

Obtained from: NetBSD [1]
Approved by: des

8 years ago- Extract common code from extract()/extract_stdout() to extract2fd()
ak [Fri, 15 Jan 2016 22:58:23 +0000 (22:58 +0000)]
- Extract common code from extract()/extract_stdout() to extract2fd()
- Update information about central directory handling

Obtained from: NetBSD
Approved by: des

8 years agoFAST_DEPEND: Fix incremental builds leading to kernel panics.
bdrewery [Fri, 15 Jan 2016 22:08:58 +0000 (22:08 +0000)]
FAST_DEPEND: Fix incremental builds leading to kernel panics.

This fixes .depend.genassym.o not being included.  genassym.o depends on
all of the system headers and when rebuilt regenerates assym.s which
lists offsets for critial .S files to utilize.  By having a struct in a
system header change its offsets and not have generassym.o be rebuilt,
this would lead to panics.

The flaw in the initial commit was seeing ${OBJS} in ${SYSTEM_OBJS} and
assuming it had all of ${SRCS} in it.  This is not the case though.  The
older mkdep code splits out all of the various SRC lists for generating
the .depend file.  It also includes ${GEN_CFILES}, which had genassym.c
and was the only significant file lacking from ${SYSTEM_OBJS} upon inspection,
since it is not linked in.  Rather than duplicate the likely
soon-to-be-removed mkdep lists, just add genassym.o to the DEPENDOBJS
list.  Using ${SRCS} as bsd.dep.mk does would be nice but there are many
files in the build that are only added to ${OBJS} and not ${SRCS}, such
as bf_enc.o derived from bf_enc.S for i386.

Sponsored by: EMC / Isilon Storage Division
Reported by: dhw (several panics on current@)
Pointyhat to: bdrewery

8 years agoFAST_DEPEND: Rework optimization for r290524.
bdrewery [Fri, 15 Jan 2016 22:08:51 +0000 (22:08 +0000)]
FAST_DEPEND: Rework optimization for r290524.

The .MAKEFLAGS check inside of the .for loop is extremely slow for some
reason.  Just moving it out of the loop trimmed -V lookup time from 11
seconds to 1 second in the kernel obj directory.

Sponsored by: EMC / Isilon Storage Division

8 years ago- Check for accf_filter before running the tests, otherwise it will always
ngie [Fri, 15 Jan 2016 21:59:18 +0000 (21:59 +0000)]
- Check for accf_filter before running the tests, otherwise it will always
  fail at subtest 9/11
- Use strncpy instead of strcpy with afa.af_name