]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoFix FDP style nits found by igor(1).
gjb [Thu, 18 May 2017 15:41:59 +0000 (15:41 +0000)]
Fix FDP style nits found by igor(1).

Sponsored by: The FreeBSD Foundation

7 years agoDocument r311686, bsdinstall(8) hidden wifi network support.
gjb [Thu, 18 May 2017 15:41:58 +0000 (15:41 +0000)]
Document r311686, bsdinstall(8) hidden wifi network support.

Sponsored by: The FreeBSD Foundation

7 years agoMove the ixl(4) entry to the network driver section.
gjb [Thu, 18 May 2017 15:41:57 +0000 (15:41 +0000)]
Move the ixl(4) entry to the network driver section.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r310852, miibus(4) Microchip/Micrel KSZ9031 support.
gjb [Thu, 18 May 2017 15:41:56 +0000 (15:41 +0000)]
Document r310852, miibus(4) Microchip/Micrel KSZ9031 support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315330, etherswitch(4) support for RTL8366RB and RTL8366SR.
gjb [Thu, 18 May 2017 15:41:56 +0000 (15:41 +0000)]
Document r315330, etherswitch(4) support for RTL8366RB and RTL8366SR.
Correct the Netgate sponsor entity while here.

Sponsored by: The FreeBSD Foundation

7 years agoClarify the cxgbe(4) firmware update is for T4, T5, and T6 cards.
gjb [Thu, 18 May 2017 15:41:55 +0000 (15:41 +0000)]
Clarify the cxgbe(4) firmware update is for T4, T5, and T6 cards.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r307576, Elantech support added to atkbdc(4).
gjb [Thu, 18 May 2017 15:41:54 +0000 (15:41 +0000)]
Document r307576, Elantech support added to atkbdc(4).

Sponsored by: The FreeBSD Foundation

7 years agoAdd missing revision for cloudabi 32-bit support.
gjb [Thu, 18 May 2017 15:41:53 +0000 (15:41 +0000)]
Add missing revision for cloudabi 32-bit support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r314005, alc(4) Killer E2500 support.
gjb [Thu, 18 May 2017 15:41:52 +0000 (15:41 +0000)]
Document r314005, alc(4) Killer E2500 support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r312358, alc(4) Killer E2400 support.
gjb [Thu, 18 May 2017 15:41:51 +0000 (15:41 +0000)]
Document r312358, alc(4) Killer E2400 support.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r311506, cxgbe(4) firmware version 1.16.26.0.
gjb [Thu, 18 May 2017 15:41:50 +0000 (15:41 +0000)]
Document r311506, cxgbe(4) firmware version 1.16.26.0.

Sponsored by: The FreeBSD Foundation

7 years agoAdd qlnxe(4)
gjb [Thu, 18 May 2017 15:41:49 +0000 (15:41 +0000)]
Add qlnxe(4)

Sponsored by: The FreeBSD Foundation

7 years agoDocument r318357, ixl(4) updated to version 1.7.12-k.
gjb [Thu, 18 May 2017 15:41:49 +0000 (15:41 +0000)]
Document r318357, ixl(4) updated to version 1.7.12-k.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r307144, cloudabi 32-bit support on 64-bit envionments.
gjb [Thu, 18 May 2017 15:41:48 +0000 (15:41 +0000)]
Document r307144, cloudabi 32-bit support on 64-bit envionments.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r315435:
allanjude [Thu, 18 May 2017 13:19:07 +0000 (13:19 +0000)]
MFC r315435:
Add ZFS compressed ARC stats to top(1)

MFC r316314:
top(1) read the wrong amount of data from sysctl

MFC r318448:
Explain the new fields in top(1) related to ZFS compressed ARC

Remove the laundry field during the merge, does not exist in stable/11

7 years agoMFC r318294:
gjb [Thu, 18 May 2017 12:27:41 +0000 (12:27 +0000)]
MFC r318294:
 Correct the URL to instructions for updating system sources.

PR: 219303
Sponsored by: The FreeBSD Foundation

7 years agoMFC 317783
sephe [Thu, 18 May 2017 01:32:50 +0000 (01:32 +0000)]
MFC 317783
    hyperv/kvp: Fix pool direcrory and file permission

    PR: 209385
    Sponsored by: Microsoft

7 years agoDocument r318402, blacklistd refinement for OpenSSH.
gjb [Wed, 17 May 2017 14:35:21 +0000 (14:35 +0000)]
Document r318402, blacklistd refinement for OpenSSH.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r318242: Refine and update blacklist support in sshd
lidl [Wed, 17 May 2017 14:28:01 +0000 (14:28 +0000)]
MFC r318242: Refine and update blacklist support in sshd

Adjust notification points slightly to catch all auth failures, rather
than just the ones caused by bad usernames.  Modify notification point
for bad usernames to send new type of BLACKLIST_BAD_USER.  (Support in
libblacklist will be forthcoming soon.)  Add guards to allow library
headers to expose the enum of action values.

Reviewed by: des
Relnotes: yes
Sponsored by: The FreeBSD Foundation

7 years agoMFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
rpokala [Wed, 17 May 2017 05:53:25 +0000 (05:53 +0000)]
MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
a way to retrive it

The MAC address reported by `ifconfig ${nic} ether' does not always match
the address in the hardware, as reported by the driver during attach. In
particular, NICs which are components of a lagg(4) interface all report the
same MAC.

When attaching, the NIC driver passes the MAC address it read from the
hardware as an argument to ether_ifattach(). Keep a second copy of it, and
create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
with the active MAC address.

PR: 194386

7 years agoMFC r317743:
araujo [Wed, 17 May 2017 05:47:31 +0000 (05:47 +0000)]
MFC r317743:

Use nitems() from sys/param.h.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D9942

7 years agoMFC r317742:
araujo [Wed, 17 May 2017 05:28:16 +0000 (05:28 +0000)]
MFC r317742:

Free the memory allocated to trackbuf before exiting, it might fix a potential
memory leak.

Submitted by: trix@juniper.net
Differential Revision: https://reviews.freebsd.org/D9856

7 years agoMFC r315112, r315196
araujo [Wed, 17 May 2017 05:21:03 +0000 (05:21 +0000)]
MFC r315112, r315196

r315112:
Add the capability to refresh the gpart(8) label without need a reboot.

gpart(8) has functionality to change the label of an GPT partition.
This functionality works like it should, however, after a label change
the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
unchanged. The change only takes effect after a reboot.

PR: 162690
Submitted by: sub.mesa@gmail, Ben RUBSON <ben.rubson@gmail.com>, ae
Reviewed by: allanjude, bapt, bcr
Differential Revision: https://reviews.freebsd.org/D9935

r315196:
After r315112 I broke the tests with eli, instead to pass 0, I should pass
M_NOWAIT to g_media_changed() that will call g_post_event() with this flag.

Reported by: lwhsu, ngie and ae

7 years agoMFC 318136
sephe [Wed, 17 May 2017 01:48:44 +0000 (01:48 +0000)]
MFC 318136

    hyperv/vmbus: Reorganize vmbus device tree

    For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
    resources for PCI passthrough and SR-IOV.  There is no
    acpi_syscontainer0 on GEN1 Hyper-V.

    For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
    contains the resources for PCI passthrough and SR-IOV.  There is
    no pcib0 on GEN2 Hyper-V.

    The ACPI VMBUS device now only holds its _CRS, which is empty as
    of this commit; its existence is mainly for upward compatibility.

    Device tree structure is suggested by jhb@.

    Tested-by: dexuan@
    Collabrated-wth: dexuan@
    Sponsored by: Microsoft
    Differential Revision: https://reviews.freebsd.org/D10565

7 years agoMFC r318283:
cy [Wed, 17 May 2017 01:45:26 +0000 (01:45 +0000)]
MFC r318283:

As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no
need to put a colon (:) in the message string.

7 years agoMFC r318281:
cy [Wed, 17 May 2017 01:38:32 +0000 (01:38 +0000)]
MFC r318281:

Separate the ipfilter function/static string from the error with a
colon (:) in error messages to assist the user in parsing out the error
from where or which object the error message refers to.

7 years agoMFC r317784:
mjg [Tue, 16 May 2017 19:35:25 +0000 (19:35 +0000)]
MFC r317784:

cache: stop holding the ncneg_hot lock across purging

Only non-hot entries are purged so the lock is not needed in the first place.
This saves one lock/unlock pair.

7 years agoMFC r318259:
dim [Tue, 16 May 2017 18:54:25 +0000 (18:54 +0000)]
MFC r318259:

Silence a -Wunused warning about the junk variable being used to raise
an inexact floating point exception.  The variable cannot be eliminated,
unfortunately, otherwise the desired addition triggering the exception
will be emitted neither by clang, nor by gcc.

Reviewed by: Steve Kargl, bde

7 years agoMFC r318147: Add several new media types to if_media.h
erj [Tue, 16 May 2017 17:51:30 +0000 (17:51 +0000)]
MFC r318147: Add several new media types to if_media.h

These include several 25G types (for active direct attach cables and LR modules),
and a missing type for 10G active direct attach.

Sponsored by: Intel Corporation

7 years agoMFC r313497: ixl(4): Update to 1.7.12-k.
erj [Tue, 16 May 2017 17:49:15 +0000 (17:49 +0000)]
MFC r313497: ixl(4): Update to 1.7.12-k.

Refresh upstream driver before impending conversion to iflib.

Major new features:

- Support for Fortville-based 25G adapters
- Support for I2C reads/writes

(To prevent getting or sending corrupt data, you should set
dev.ixl.0.debug.disable_fw_link_management=1 when using I2C
[this will disable link!], then set it to 0 when done. The driver implements
the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data,
but there are read_i2c and write_i2c sysctls under the .debug sysctl tree
[the latter being useful for upper page support in QSFP+]).

- Addition of an iWARP client interface (so the future iWARP driver for
  X722 devices can communicate with the base driver).
    - Add "options IXL_IW" to kernel config to enable this option.

Sponsored by: Intel Corporation

7 years agoMCF r310418: xen: fix IPI setup with EARLY_AP_STARTUP
royger [Tue, 16 May 2017 09:39:20 +0000 (09:39 +0000)]
MCF r310418: xen: fix IPI setup with EARLY_AP_STARTUP

Sponsored by: Citrix Systems R&D

7 years agoMFC r318092:
bdrewery [Tue, 16 May 2017 02:23:54 +0000 (02:23 +0000)]
MFC r318092:

  PROGS+META_MODE: Avoid rebuilding common sources when recursing.

7 years agoMFC r317585: Propagate IFCAP_LRO from trunk to vlan interface.
mav [Tue, 16 May 2017 00:34:53 +0000 (00:34 +0000)]
MFC r317585: Propagate IFCAP_LRO from trunk to vlan interface.

False positive here cost nothing, while false negative may lead to some
confusions.

7 years agoMFC r317547: Allow some control over enabled capabilities for if_vlan.
mav [Tue, 16 May 2017 00:33:46 +0000 (00:33 +0000)]
MFC r317547: Allow some control over enabled capabilities for if_vlan.

It improves interoperability with if_bridge, which may need to disable
some capabilities not supported by other members.  IMHO there is still
open question about LRO capability, which may need to be disabled on
physical interface.

7 years agoMFC r317696, r317723, r317836: Introduce sleepable locks into if_lagg.
mav [Tue, 16 May 2017 00:30:40 +0000 (00:30 +0000)]
MFC r317696, r317723, r317836:  Introduce sleepable locks into if_lagg.

Before this change if_lagg was using nonsleepable rmlocks to protect its
internal state.  This patch introduces another sx lock to protect code
paths that require sleeping, while still uses old rmlock to protect hot
nonsleepable data paths.

This change allows to remove taskqueue decoupling used before to change
interface addresses without holding the lock.  Instead it uses sx lock to
protect direct if_ioctl() calls.

As another bonus, the new code synchronizes enabled capabilities of member
interfaces, and allows to control them with ifconfig laggX, that was
impossible before.  This part should fix interoperation with if_bridge,
that may need to disable some capabilities, such as TXCSUM or LRO, to allow
bridging with noncapable interfaces.

7 years agoMFC r317659, r317752:
mav [Tue, 16 May 2017 00:21:03 +0000 (00:21 +0000)]
MFC r317659, r317752:
Make some UART consoles to not spin wait for data to be sent.

At least with Tx FIFO enabled it shows me ~10% reduction of verbose boot
time with serial console at 115200 baud.

7 years agoMFC 316658:
avatar [Mon, 15 May 2017 22:51:22 +0000 (22:51 +0000)]
MFC 316658:

Adding SIOCGIFNAME support in Linuxulator.  This should silence the console warning associated
with linux-opera:
linux: pid 23492 (opera): ioctl fd=5, cmd=0x8910 ('\M^I',16) is not implemented
linux: pid 23492 (opera): ioctl fd=28, cmd=0x8910 ('\M^I',16) is not implemented
...

Reviewed by: kib, marcel, dchagin
Tested with: linux-opera-12.16_3

7 years agoMFC r317660, r317710
brooks [Mon, 15 May 2017 22:41:01 +0000 (22:41 +0000)]
MFC r317660, r317710

r317660:
Support clnt_raw's use of FD_SETSIZE as a fake file descriptor.

Accomplish this by allocating space for it in __svc_xports and allowing
it to be registered.  The failure to allocate space was causing an
out-of-bounds read in svc_getreq_common().  The failure to register
caused PR 211804.

The bug was found with CHERI bounds checking.

PR: 211804
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D10528

r317710:
Remove expected failure now that it was fixed in r317660.

PR: 211804
Reviewed by: ngie
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10576

7 years agoMFC r317658:
bdrewery [Mon, 15 May 2017 18:38:01 +0000 (18:38 +0000)]
MFC r317658:

  Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean'

7 years agoMFC r317996
davidcs [Mon, 15 May 2017 18:07:57 +0000 (18:07 +0000)]
MFC r317996
  Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked.
  Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi()

7 years agoMFC r318126
davidcs [Mon, 15 May 2017 17:45:05 +0000 (17:45 +0000)]
MFC r318126
  llh_func_filter needs to be configured for 100G

7 years agoMFC r318185:
ken [Mon, 15 May 2017 15:28:01 +0000 (15:28 +0000)]
MFC r318185:

  Add LTO-8 density codes.

  lib/libmt/mtlib.c:
   Add the LTO-8 density code to the density table in libmt.

  usr.bin/mt/mt.1:
   Add the LTO-8 density code, tracks, bpmm, and bpi to the density
   table in the mt(1) man page.

Sponsored by: Spectra Logic

7 years agoMFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp
emaste [Mon, 15 May 2017 14:41:47 +0000 (14:41 +0000)]
MFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp

We must ensure there's space for the terminating null in the temporary
buffer in imgact_binmisc_populate_interp().

Note that there's no buffer overflow here because xbe->xbe_interpreter's
length and null termination is checked in imgact_binmisc_add_entry()
before imgact_binmisc_populate_interp() is called. However, the latter
should correctly enforce its own bounds.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r314054: Exclude -flto when building *genassym.o
emaste [Mon, 15 May 2017 14:23:53 +0000 (14:23 +0000)]
MFC r314054: Exclude -flto when building *genassym.o

The build process generates *assym.h using nm from *genassym.o (which is
in turn created from *genassym.c).

When compiling with link-time optimization (LTO) using -flto, .o files
are LLVM bitcode, not ELF objects. This is not usable by genassym.sh,
so remove -flto from those ${CC} invocations.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317376: Add sysutils/tmux to the DVD package set
emaste [Mon, 15 May 2017 14:22:03 +0000 (14:22 +0000)]
MFC r317376: Add sysutils/tmux to the DVD package set

The zsh + tmux combination is commonly wanted.

Sponsored by: The FreeBSD Foundation

7 years agoRegenerate src.conf.5 after r318286
emaste [Mon, 15 May 2017 14:11:18 +0000 (14:11 +0000)]
Regenerate src.conf.5 after r318286

r318286 removed the $FreeBSD$ tags copied from the source WITH_/WITHOUT_
description snippets.  Regenerate src.conf.5 now so that only relevant
changes appear in it when it is next regenerated after an MFC.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r310271 (gjb): Comment the RCSID (in WITH_REPRODUCIBLE_BUILD)
emaste [Mon, 15 May 2017 13:50:21 +0000 (13:50 +0000)]
MFC r310271 (gjb): Comment the RCSID (in WITH_REPRODUCIBLE_BUILD)

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317156: makeman: add a comment describing purpose and invocation
emaste [Mon, 15 May 2017 13:41:38 +0000 (13:41 +0000)]
MFC r317156: makeman: add a comment describing purpose and invocation

Sponsored by: The FreeBSD Foundation

7 years agoMFC r316706: makeman: don't copy $FreeBSD$ tags from source files into output
emaste [Mon, 15 May 2017 13:05:02 +0000 (13:05 +0000)]
MFC r316706: makeman: don't copy $FreeBSD$ tags from source files into output

Copying the source VCS ID from WITH_/WITHOUT_* into the generated
src.conf.5 is not necessary, as it is generally possible to determine
the same information using the VCS to examine commit metadata. The
individual source files also match the name of the option recorded in
the generated file, so it is clear from where the content originated.

The copied IDs generate extraneous, non-content noise in the generated
src.conf.5 in some cases, including the first time the file is generated
on a stable branch. In addition, the source file $FreeBSD$ tags are not
expanded by git or other non-Subversion VCSs, which means that makeman
previously could not be used in a non-Subversion working tree.

I accept that there's some desire to keep these, but on balance believe
there is more benefit in removing them.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317912: sh: Fix INTOFF leak after a builtin with different locale
jilles [Sun, 14 May 2017 20:17:50 +0000 (20:17 +0000)]
MFC r317912: sh: Fix INTOFF leak after a builtin with different locale
settings.

After executing a builtin with different locale settings such as
  LC_ALL=C true
SIGINT handling was left disabled indefinitely.

7 years agoMFC r318254:
jasone [Sun, 14 May 2017 17:10:55 +0000 (17:10 +0000)]
MFC r318254:

Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather
than on success.  This regression was introduced by r300043 (Add implementation
of robust mutexes...).

7 years agoMFC: r317982
marius [Sun, 14 May 2017 14:21:09 +0000 (14:21 +0000)]
MFC: r317982

- Also outside of the KOBJOPLOOKUP macro - which in turn is used by
  the code auto-generated for *.m - kobj_lookup_method(9) is useful;
  for example in back-ends or base class device drivers in order to
  determine whether a default method has been overridden. Thus, allow
  for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in
  order to update the cache entry - of kobj_lookup_method(9), to be
  NULL. Actually, that pointer is redundant as it's just set to the
  same kobj_method_t that the kobj_lookup_method(9) function returns
  in the first place, but probably it serves to reduce the number of
  instructions generated for KOBJOPLOOKUP.
- For the same reason, move updating kobj_lookup_{hits,misses} (if
  KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP.
  As a side-effect, this gets rid of the convoluted approach of always
  incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of
  a cache miss, decrementing it in kobj_lookup_method(9) again.

7 years agoMFC: r317578
marius [Sun, 14 May 2017 14:04:25 +0000 (14:04 +0000)]
MFC: r317578

Fix a bug introduced as part of r287726; use the right device_t for
determining the softc of the bridge in psycho_route_interrupt(). [1]
While at it, update the corresponding comment that the code in
question is also necessary for U30s in addition to E450s (a fact
that has been known for ages).

PR: 218478 [1]
Submitted by: Yoshihiko Iwama [1]

7 years agoMFC: r317343
marius [Sun, 14 May 2017 13:59:36 +0000 (13:59 +0000)]
MFC: r317343

In fill_ip6(), the value of the pointer av changes before it is
free(3)ed. Thus, introduce a new variable to track the original
value.

7 years agoMFC r316874: restore ability to shutdown(2) datagram sockets.
sobomax [Sun, 14 May 2017 12:41:58 +0000 (12:41 +0000)]
MFC r316874: restore ability to shutdown(2) datagram sockets.

7 years agoMFC r317908:
kib [Sun, 14 May 2017 11:51:30 +0000 (11:51 +0000)]
MFC r317908:
Remove spl() calls from UFS code.

7 years agoMFC r316718, r316738: make mksnap_ffs functional in the chroot'ed environment.
sobomax [Sun, 14 May 2017 10:48:47 +0000 (10:48 +0000)]
MFC r316718, r316738: make mksnap_ffs functional in the chroot'ed environment.

7 years agoMFC r318190:
gjb [Sun, 14 May 2017 10:15:04 +0000 (10:15 +0000)]
MFC r318190:
 Update release/scripts/atlas-upload.sh to account for API changes
 made recently by Atlas Hashicorp.  The data returned from GET and
 POST requests has changed, which caused a number of regex patterns
 to fail to be properly identified as 'success' or 'failure', which
 ended up in upload/publish failures.

Sponsored by: The FreeBSD Foundation

7 years agoMFC: r317576
rmacklem [Sun, 14 May 2017 00:12:29 +0000 (00:12 +0000)]
MFC: r317576
Modify the NFSv4.1/pNFS client to ask for a maximum length of layout.

The code specified the length of a layout as INT64_MAX instead of
UINT64_MAX. This could result in getting a layout for less than the
full file for extremely large files. Although having little practical
effect, this patch corrects this in the code.
Detected during recent testing of the pNFS server.

7 years agoMFC r308945:
gjb [Fri, 12 May 2017 18:37:08 +0000 (18:37 +0000)]
MFC r308945:
 Set the 'vital' flag on the runtime and jail packages.

 The default pkg(8) from pkg.freebsd.org requires libjail.so,
 so mark the jail package as vital along with the runtime
 package to avoid errors when libjail.so is removed.  This is
 a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8)
 built from the Ports Collection.

 In order to make this work without marking packages such as
 the jail-lib32, for example, the jail.ucl file needed to be
 split out into separate files similarly to the runtime-*.ucl
 files.

Sponsored by: The FreeBSD Foundation

7 years agoMFC 317412,317413: Fixes for info file removal.
jhb [Fri, 12 May 2017 18:06:13 +0000 (18:06 +0000)]
MFC 317412,317413: Fixes for info file removal.

317412:
Add info files for GCC 4.2 to the list of info files to remove.

This would only affect upgrades from older versions of non-clang
platforms.

317413:
Remove info files from optional old files.

Info files are now all removed unconditionally after the removal of
texinfo.

7 years agoMFC 316510: Don't leak a session and lock if a GMAC key has an invalid length.
jhb [Fri, 12 May 2017 18:01:05 +0000 (18:01 +0000)]
MFC 316510: Don't leak a session and lock if a GMAC key has an invalid length.

7 years agoMFC r317845-r317846
brooks [Fri, 12 May 2017 17:40:34 +0000 (17:40 +0000)]
MFC r317845-r317846

r317845:
Provide a freebsd32 implementation of sigqueue()

The previous misuse of sys_sigqueue() was sending random register or
stack garbage to 64-bit targets.  The freebsd32 implementation preserves
the sival_int member of value when signaling a 64-bit process.

Document the mixed ABI implementation of union sigval and the
incompability of sival_ptr with pointer integrity schemes.

Reviewed by: kib, wblock
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10605

r317846:
Regen post r317845.

MFC with: r317845
Sponsored by: DARPA, AFRL

7 years agoDocument r318239, blacklistd updated to 20170503 snapshot.
gjb [Fri, 12 May 2017 15:08:23 +0000 (15:08 +0000)]
Document r318239, blacklistd updated to 20170503 snapshot.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317862:
lidl [Fri, 12 May 2017 15:03:09 +0000 (15:03 +0000)]
MFC r317862:
Improve blacklist support before upgrading libblacklist

The locally declared enum of blacklistd actions needs to be
hidden when the soon to be committed changes to libblacklist
are brought into the tree.  Fix the type of the "msg" parameter
to match the library.

There should be no functional changes.
Sponsored by: The FreeBSD Foundation

7 years agoMFC r317802:
lidl [Fri, 12 May 2017 15:00:06 +0000 (15:00 +0000)]
MFC r317802:
Merge latest version of blacklist sources from NetBSD (@ 20170503)

Sponsored by: The FreeBSD Foundation

7 years agoMFC r317709: csplit: Fix check of fputs() return value, making csplit work
jilles [Fri, 12 May 2017 14:38:09 +0000 (14:38 +0000)]
MFC r317709: csplit: Fix check of fputs() return value, making csplit work
again.

As of r295638, fputs() returns the number of bytes written (if not more than
INT_MAX). This broke csplit completely, since csplit assumed success only
for the return value 0.

PR: 213510
Relnotes: yes

7 years agoMFC r318015:
bz [Fri, 12 May 2017 11:40:58 +0000 (11:40 +0000)]
MFC r318015:

  Adjust a comment.

7 years agoMFC 317786
sephe [Fri, 12 May 2017 03:06:45 +0000 (03:06 +0000)]
MFC 317786

    pcicfg: Fix direct calls of pci_cfg{read,write} on systems w/o PCI host bridge.

    Reported by:    dexuan@
    Reviewed by:    jhb@
    Sponsored by:   Microsoft
    Differential Revision: https://reviews.freebsd.org/D10564

7 years agoMFC 317830:
cy [Fri, 12 May 2017 02:32:01 +0000 (02:32 +0000)]
MFC 317830:

Ifdef out a redundant if statement when INET6 is disabled.

7 years agoRevert r318203: Neglected to put "MFC 318203:" in the log.
cy [Fri, 12 May 2017 02:26:39 +0000 (02:26 +0000)]
Revert r318203: Neglected to put "MFC 318203:" in the log.

Pointy hat to: cy

7 years agoMFC r318109:
gjb [Fri, 12 May 2017 02:12:38 +0000 (02:12 +0000)]
MFC r318109:
 Correct "first appeared in" entries for various drivers that
 exist in stable/11.

Sponsored by: The FreeBSD Foundation

7 years agoIfdef out a redundant if statement when INET6 is disabled.
cy [Fri, 12 May 2017 02:12:03 +0000 (02:12 +0000)]
Ifdef out a redundant if statement when INET6 is disabled.

7 years agoClarify the syslogd(8) 'include' directive is specified in syslog.conf(5).
gjb [Thu, 11 May 2017 23:49:53 +0000 (23:49 +0000)]
Clarify the syslogd(8) 'include' directive is specified in syslog.conf(5).

Submitted by: jilles
Sponsored by: The FreeBSD Foundation

7 years agoMFC: r315431
marius [Thu, 11 May 2017 21:13:01 +0000 (21:13 +0000)]
MFC: r315431

- Adds macros for the content of SDHCI_ADMA_ERR and SDHCI_HOST_CONTROL2
  registers.
- Add slot type capability bits. These bits should allow recognizing
  removable card slots, embedded cards and shared buses (shared bus
  supposedly is always comprised of non-removable cards).
- Dump CAPABILITIES2, ADMA_ERR, HOST_CONTROL2 and ADMA_ADDRESS_LO
  registers in sdhci_dumpregs().
- The drive type support flags in the CAPABILITIES2 register are for
  drive types A,C,D, drive type B is the default setting (value 0) of
  the drive strength field in the SDHCI_HOST_CONTROL2 register.

Obtained from: DragonFlyBSD (9e3c8f63455bd1b1)

7 years agoMFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760,
marius [Thu, 11 May 2017 20:55:11 +0000 (20:55 +0000)]
MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760,
     r315845, 315430, r317981, r315466

o Fix some overly long lines, whitespace and other bugs according to
  style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4).

o In the mmc(4) bridges and sdhci(4) (bus) front-ends:
  - Remove redundant assignments of the default bus_generic_print_child
    device method,
  - use DEVMETHOD_END,
  - use NULL instead of 0 for pointers.

o Trim/adjust includes.

o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges
  as kernel drivers and their dependency onto mmc(4).

o Add support for eMMC "partitions". Besides the user data area, i. e.
  the default partition, eMMC v4.41 and later devices can additionally
  provide up to:
  1 enhanced user data area partition
  2 boot partitions
  1 RPMB (Replay Protected Memory Block) partition
  4 general purpose partitions (optionally with a enhanced or extended
    attribute)

  Besides simply subdividing eMMC devices, some Intel NUCs having UEFI
  code in the boot partitions etc., another use case for the partition
  support is the activation of pseudo-SLC mode, which manufacturers of
  eMMC chips typically associate with the enhanced user data area and/
  or the enhanced attribute of general purpose partitions.

  CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation.

o Now that properly issuing CMD6 is crucial (so data isn't written to
  the wrong partition for example), make a step into the direction of
  correctly handling the timeout for these commands in the MMC layer.
  Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as
  recommended by relevant specifications.

o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible
  with Linux so that the GNU mmc-utils can be ported to and used with
  FreeBSD (note that due to the remaining deficiencies outlined above
  SANITIZE operations issued by/with `mmc` currently most likely will
  fail). These latter have been added to ports as sysutils/mmc-utils.
  Among others, the `mmc` tool of mmc-utils allows for partitioning
  eMMC devices (tested working).

o For devices following the eMMC specification v4.41 or later, year 0
  is 2013 rather than 1997; so correct this for assembling the device
  ID string properly.

o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at
  least for some of the above a matching pair is required.

o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC
  controllers as such in order to match the PCI one.
  Additionally, in the entry for the 80860F14 SDXC controller remove
  the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET.

7 years agoMFC r315031:
gonzo [Thu, 11 May 2017 20:30:44 +0000 (20:30 +0000)]
MFC r315031:

[fdt] Make DTBs generated by make_dtb.sh overlay-ready

Generate symbols node when compiling dts files so they can be modified
during boot-time by applying overlays.

7 years agoMFC 313407,313449: Copy ELF machine/flags from binaries to core dumps.
jhb [Thu, 11 May 2017 17:26:34 +0000 (17:26 +0000)]
MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps.

313407:
Copy the e_machine and e_flags fields from the binary into an ELF core dump.

In the kernel, cache the machine and flags fields from ELF header to use in
the ELF header of a core dump. For gcore, the copy these fields over from
the ELF header in the binary.

This matters for platforms which encode ABI information in the flags field
(such as o32 vs n32 on MIPS).

313449:
Trim trailing whitespace (mostly introduced in r313407).

Sponsored by: DARPA / AFRL

7 years agoMFC r317584:
hselasky [Thu, 11 May 2017 13:49:05 +0000 (13:49 +0000)]
MFC r317584:
Correct manual page link to usbdi(9).

7 years agoMFC r317523:
kib [Thu, 11 May 2017 09:36:51 +0000 (09:36 +0000)]
MFC r317523:
Add asserts to verify stability of struct proc and struct thread layouts.

7 years agoMFC 313999: Consolidate statements to initialize files.
jhb [Thu, 11 May 2017 04:29:20 +0000 (04:29 +0000)]
MFC 313999: Consolidate statements to initialize files.

Previously, the first lines of various generated files from system call
tables were generated in two sections.  Some of the initialization was
done in BEGIN, and the rest was done when the first line was encountered.
The main reason for this split before r313564 was that most of the
initialization done in the second section depended on the $FreeBSD$ tag
extracted from the system call table.  Now that the $FreeBSD$ tag is no
longer used, consolidate all of the file initialization in the BEGIN
section.

This change was tested by confirming that the content of generated files
did not change.

7 years agoMFC 316512,316537: Use correct linker emulations for armeb and riscv.
jhb [Thu, 11 May 2017 03:41:55 +0000 (03:41 +0000)]
MFC 316512,316537: Use correct linker emulations for armeb and riscv.

7 years agoMFC 316493: Assert that the align parameter to uma_zcreate() is valid.
jhb [Thu, 11 May 2017 03:37:05 +0000 (03:37 +0000)]
MFC 316493: Assert that the align parameter to uma_zcreate() is valid.

7 years agoMFC 315323: Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment.
jhb [Thu, 11 May 2017 00:27:26 +0000 (00:27 +0000)]
MFC 315323: Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment.

uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1,
and uma.h provides a set of helper macros for common types.  Passing
sizeof(void *) results in all of the members being misaligned triggering
unaligned access faults on certain architectures (notably MIPS).

7 years agoMFC 314894: Fix a couple of typos and reword some sentences in bsd.README.
jhb [Wed, 10 May 2017 23:14:09 +0000 (23:14 +0000)]
MFC 314894: Fix a couple of typos and reword some sentences in bsd.README.

7 years agoMFC 313564:
jhb [Wed, 10 May 2017 23:09:17 +0000 (23:09 +0000)]
MFC 313564:
Drop the "created from" line from files generated by makesyscalls.sh.

This information is less useful when the generated files are included in
source control along with the source.  If needed it can be reconstructed
from the $FreeBSD$ tag in the generated file.  Removing this information
from the generated output permits committing the generated files along
with the change to the system call master list without having inconsistent
metadata in the generated files.

Regenerate the affected files along with the MFC.

7 years agoMFC: r314097
marius [Wed, 10 May 2017 21:42:12 +0000 (21:42 +0000)]
MFC: r314097

- Allow different slicers for different flash types to be registered
  with geom_flashmap(4) and teach it about MMC for slicing enhanced
  user data area partitions. The FDT slicer still is the default for
  CFI, NAND and SPI flash on FDT-enabled platforms.
- In addition to a device_t, also pass the name of the GEOM provider
  in question to the slicers as a single device may provide more than
  one provider.
- Build a geom_flashmap.ko.
- Use MODULE_VERSION() so other modules can depend on geom_flashmap(4).
- Remove redundant/superfluous GEOM routines that either do nothing
  or provide/just call default GEOM (slice) functionality.
- Trim/adjust includes

7 years agoMFC: r305507
marius [Wed, 10 May 2017 20:53:13 +0000 (20:53 +0000)]
MFC: r305507

Disable vt(4) by default on sparc64 as creator_vt(4) and vt_ofwfb(4)
have the serious problem of not actually attaching the hardware they
are driving at the bus level. This causes creator(4) and machfb(4)
to attach and drive the very same hardware in parallel when both
syscons(4) and vt(4) as well as their associated hardware drivers
are built into a kernel, i. e. GENERIC, at the same time.
Also, syscons(4) and its drivers still are way superior to vt(4) and
its equivalents; unlike the syscons(4) counterparts the vt(4) drivers
don't provide hardware acceleration resulting in considerably slower
screen drawing, creator_vt(4) doesn't provide a /dev/fb node as
required by the Xorg sunffb(4) etc. In theory, vt_ofwfb(4) should be
able to handle more devices than machfb(4). However, testing shows
that it hardly works with any hardware machfb(4) isn't also able to
drive, making vt(4) and vt_ofwfb(4) not favorable for the time being
from that perspective either.

7 years agoMFC: r311817
marius [Wed, 10 May 2017 20:46:55 +0000 (20:46 +0000)]
MFC: r311817

In dummynet(4), random chunks of memory are casted to struct dn_*,
potentially leading to fatal unaligned accesses on architectures with
strict alignment requirements. This change fixes dummynet(4) as far
as accesses to 64-bit members of struct dn_* are concerned, tripping
up on sparc64 with accesses to 32-bit members happening to be correctly
aligned there. In other words, this only fixes the tip of the iceberg;
larger parts of dummynet(4) still need to be rewritten in order to
properly work on all of !x86.
In principle, considering the amount of code in dummynet(4) that needs
this erroneous pattern corrected, an acceptable workaround would be to
declare all struct dn_* packed, forcing compilers to do byte-accesses
as a side-effect. However, given that the structs in question aren't
laid out well either, this would break ABI/KBI.
While at it, replace all existing bcopy(9) calls with memcpy(9) for
performance reasons, as there is no need to check for overlap in these
cases.

PR: 189219

7 years agoMFC: r310712
marius [Wed, 10 May 2017 20:29:33 +0000 (20:29 +0000)]
MFC: r310712

- Use correct offsets into the keys set array. As the elements of this
  zero-length array are dynamically sized at run-time based on the use
  of hints, compilers can't be expected to figure out these offsets on
  their own. [1]
- Fix incorrect comparison in cmp_nans(). [2]

PR: 204571 [1], 202301 [2]
Submitted by: David Binderman [2]

7 years agoMFC r317740:
ken [Wed, 10 May 2017 18:59:18 +0000 (18:59 +0000)]
MFC r317740:

  Correct loop mode CRN resets to adhere to FCP-4 section 4.10

  Prior to this change, the CRN (Command Reference Number) is reset on any
  firmware LIP, LOOP DOWN, or LOOP RESET event in violation of FCP-4 which
  specifies that the CRN should only be reset in response to a LIP Reset
  (LIPyx) primitive. FCP-4 also indicates PLOGI/LOGO and PRLI/PRLO ELS
  actions as conditions for resetting the CRN for the associated initiator
  port.

  These violations manifest themselves when the HBA is removed from the
  loop, or a target device is removed (especially during an outstanding
  command) without power cycling. If the HBA and and the target device
  determine upon re-establishing the loop that no PLOGI or PRLI is
  required, and the target does not issue a LIPxy to the initiator, the
  CRN for the target will have been improperly reset by the isp driver. As
  a result, the target port will silently ignore all FCP commands issued
  during the device probe (which will time out) preventing the device from
  attaching.

  This change corrects thie CRN reset behavior in response to loop state
  changes, also introduces CRN resets for the above mentioned ELS actions
  as encountered through async PDB change events.

  This change also adds cleanup of outstanding commands in isp_loop_dead()
  that was previously missing.

  sys/dev/isp/isp.c
   Add the last login state to debug output when syncing the pdb

  sys/dev/isp/isp_freebsd.c
   Replace binary statement setting aborted ccb status in
   isp_watchdog() with the XS_SETERR macro used elsewhere

   In isp_loop_dead(), abort or complete pending commands as done
   in isp_watchdog()

   In isp_async(), segregate the ISPASYNC_LOOP_RESET action from
   ISPASYNC_LIP, ISPASYNC_LOOP_DOWN, and ISPASYNC_LOOP_UP
   fallthroughs, and only reset the CRN in the RESET case. Also add
   checks to handle false LOOP RESET actions that do not have a
   proper associated LIP primitive, and log the primitive in the
   debug messages

   In isp_async(), remove the goto from ISP_ASYNC_DEV_STAYED, and
   only reset the CRN in the DEV_CHANGED action

   In isp_async(), when processing an ISPASYNC_CHANGE_PDB status,
   reset CRN(s) for the associated nphdl (or all ports) if the
   change reason is some form of ELS login/logout. Also remove
   assignment to fc since it is not used in the scope

  sys/dev/isp/ispmbox.h
   Add macro definition for the global N-Port handle, and correct a
   macro typo 'PDB24XX_AE_PRLI_DONJE'

  sys/dev/isp/ispvar.h
   Add macros FCP_AL_DA_ALL, FCP_AL_PA, and FCP_IS_DEST_ALPD for
   more legible code when determining if an AL_PD port matches the
   portid for a given struct fcparam* by value or by virtue of the
   AL_PD port being 0xFF

Submitted by: Reid Linnemann
Sponsored by: Spectra Logic

7 years agoDocument r308914, zfsbootcfg(8) addition.
gjb [Wed, 10 May 2017 17:32:29 +0000 (17:32 +0000)]
Document r308914, zfsbootcfg(8) addition.

Sponsored by: The FreeBSD Foundation

7 years agoMFC 313409: Defer startup of gjournal switcher kproc.
jhb [Wed, 10 May 2017 16:32:12 +0000 (16:32 +0000)]
MFC 313409: Defer startup of gjournal switcher kproc.

Don't start switcher kproc until the first GEOM is created.

7 years agoMFC r317775:
ken [Wed, 10 May 2017 15:20:38 +0000 (15:20 +0000)]
MFC r317775:

  Fix error recovery behavior in the pass(4) driver.

  After FreeBSD SVN revision 236814, the pass(4) driver changed from
  only doing error recovery when the CAM_PASS_ERR_RECOVER flag was
  set on a CCB to sometimes doing error recovery if the passed in
  retry count was non-zero.

  Error recovery would happen if two conditions were met:

  1.  The error recovery action was simply a retry.  (Which is most
      cases.)
  2.  The retry_count is non-zero. (Which happened a lot because of
      cut-and-pasted code.)

  This explains a bug I noticed in with camcontrol:

  # camcontrol tur da34 -v
  Unit is ready
  # camcontrol reset da34
  Reset of 1:172:0 was successful

  At this point, there should be a Unit Attention:

  # camcontrol tur da34 -v
  Unit is ready

  No Unit Attention.

  Try it again:

  # camcontrol reset da34
  Reset of 1:172:0 was successful

  Now set the retry_count to 0 for the TUR:

  # camcontrol tur da34 -v -C 0
  Unit is not ready
  (pass42:mps1:0:172:0): TEST UNIT READY. CDB: 00 00 00 00 00 00
  (pass42:mps1:0:172:0): CAM status: SCSI Status Error
  (pass42:mps1:0:172:0): SCSI status: Check Condition
  (pass42:mps1:0:172:0): SCSI sense: UNIT ATTENTION asc:29,2 (SCSI bus reset
  occurred)
  (pass42:mps1:0:172:0): Field Replaceable Unit: 2

  There is the unit attention. camcontrol(8) has a default
  retry_count of 1, in case someone sets the -E flag without
  setting -C.

  The CAM_PASS_ERR_RECOVER behavior was only broken with the
  CAMIOCOMMAND ioctl, which is the synchronous pass(4) API.  It has
  worked as intended (error recovery is only done when the flag
  is set) in the asynchronous API (CAMIOQUEUE ioctl).

  sys/cam/scsi/scsi_pass.c:
   In passsendccb(), when calling cam_periph_runccb(), only
   specify the error routine when CAM_PASS_ERR_RECOVER is set.

  share/man/man4/pass.4:
   Document that CAM_PASS_ERR_RECOVER is needed to enable
   error recovery.

Reported by: Terry Kennedy <TERRY@glaver.org>
PR: kern/218572
Sponsored by: Spectra Logic

7 years agoMFC r317666:
ae [Wed, 10 May 2017 05:05:21 +0000 (05:05 +0000)]
MFC r317666:
  Add sets support for ipfw table info/list/flush commands.

  PR: 212668

7 years agoMFC r317667:
ae [Wed, 10 May 2017 05:04:16 +0000 (05:04 +0000)]
MFC r317667:
  In parse_range() validate both range values instead of checking
  the top value twice.

  PR: 202295

7 years agoMFC r317663:
ae [Wed, 10 May 2017 05:02:38 +0000 (05:02 +0000)]
MFC r317663:
  Properly initialize ipfw_range_tlv variable to fix possible EINVAL
  in case when ipfw delete/zero/resetlog command issued for several rules
  in the loop. Also reorder some variables by size.

  PR: 218993

7 years agoMFC r317682:
ae [Wed, 10 May 2017 05:01:05 +0000 (05:01 +0000)]
MFC r317682:
  Add `ipfw table all destroy` support.

  PR: 212669

7 years agoMFC: r317465
rmacklem [Wed, 10 May 2017 01:28:58 +0000 (01:28 +0000)]
MFC: r317465
Fix handling of a NFSv4.1 callback reply from the session cache.

The nfsv4_seqsession() call returns NFSERR_REPLYFROMCACHE when it has a
reply in the session, due to a requestor retry. The code erroneously
assumed a return of 0 for this case. This patch fixes this and adds
a KASSERT(). This would be an extremely rare occurrence. It was found
during code inspection during the pNFS server development.

7 years agoMFC r317265:
pfg [Tue, 9 May 2017 23:31:09 +0000 (23:31 +0000)]
MFC r317265:
lib: initial use of reallocarray(3).

Make some use of reallocarray, attempting to limit it to cases where the
parameters are unsigned and there is some theoretical chance of overflow.