]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMFC r320108:
kib [Mon, 26 Jun 2017 12:17:04 +0000 (12:17 +0000)]
MFC r320108:
Allow negative aio_offset only for the read and write LIO ops on
device nodes.

Approved by: re (marius)

6 years agoMFC r320259: jedec_ts: read device id from the correct register
avg [Mon, 26 Jun 2017 09:32:57 +0000 (09:32 +0000)]
MFC r320259: jedec_ts: read device id from the correct register

Approved by: re (marius)

6 years agoMFC 320184
sephe [Mon, 26 Jun 2017 05:56:49 +0000 (05:56 +0000)]
MFC 320184

    hyperv/storvsc: Reduce log verbosity

    On some windows hosts TEST_UNIT_READY command will return
    SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium
    not present - tray closed)", this occurs periodically, and
    not hurt anything else.  So, we prefer to ignore this kind
    of errors.

    Approved by:    re (delphij)
    PR:             219973
    Submitted by:   Hongjiang Zhang <hongzhan microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11271

6 years agoMFC r320242, r320256:
cy [Mon, 26 Jun 2017 05:42:35 +0000 (05:42 +0000)]
MFC r320242, r320256:

Update leap-seconds to leap-seconds.3676924800.

As per https://datacenter.iers.org/eop/-/somos/5Rgv/latest/16:

     INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)

SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE

SERVICE DE LA ROTATION TERRESTRE
OBSERVATOIRE DE PARIS
61, Av. de l'Observatoire 75014 PARIS (France)
Tel.      : 33 (0) 1 40 51 23 35
FAX       : 33 (0) 1 40 51 22 91
Internet  : services.iers@obspm.fr

                                             Paris, 9 January 2017

                                             Bulletin C 53

                                             To authorities responsible
                                             for the measurement and
                                             distribution of time

                          INFORMATION ON UTC - TAI

 NO leap second will be introduced at the end of June 2017.
 The difference between Coordinated Universal Time UTC and the
 International Atomic Time TAI is :

     from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37 s

 Leap seconds can be introduced in UTC at the end of the months of December
 or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
 six months, either to announce a time step in UTC, or to confirm that there
 will be no time step at the next possible date.

                                            Christian BIZOUARD
                                            Director
                                            Earth Orientation Center of IERS
                                            Observatoire de Paris, France

Obtained from: ftp://time.nist.gov/pub/leap-seconds.3676924800
Approved by: re@ (delphij@)

6 years agoFix an incorrect revision number.
gjb [Sun, 25 Jun 2017 18:01:27 +0000 (18:01 +0000)]
Fix an incorrect revision number.

Submitted by: David Marec <david dot marec at @davenulle dot .org>
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r320216: Fix use-after-free introduced in r300388.
delphij [Sun, 25 Jun 2017 17:42:27 +0000 (17:42 +0000)]
MFC r320216: Fix use-after-free introduced in r300388.

In r300388, endnetconfig() was called on nc_handle which would release
the associated netconfig structure, which means tmpnconf->nc_netid
would be a use-after-free.

Solve this by doing endnetconfig() in return paths instead.

Reported by: jemalloc via kevlo
Reviewed by: cem, ngie (earlier version)
Approved by: re (kib)

6 years agoMFC r320052:
kib [Sat, 24 Jun 2017 14:41:57 +0000 (14:41 +0000)]
MFC r320052:
Do not leak syslog_mutex on cancellation.

Approved by: re (marius)

6 years agoMFC r320051:
kib [Sat, 24 Jun 2017 13:53:47 +0000 (13:53 +0000)]
MFC r320051:
Correct translations between abridged and full x87 tags.

Approved by: re (marius)

6 years agoMFC r320206,r320207:
bdrewery [Fri, 23 Jun 2017 20:49:23 +0000 (20:49 +0000)]
MFC r320206,r320207:

  r320206:
    Follow-up r308602: Don't add missing headers to .depend.tables.h.
  r320207:
    Tweak r320206: Still create the TABLE but not the .depend entry for missing
    headers.

Approved by: re (gjb)

6 years agoMFC r320174,r320204:
bdrewery [Fri, 23 Jun 2017 20:38:21 +0000 (20:38 +0000)]
MFC r320174,r320204:

  r320174:
    Fix 'make clean all' to work again.
  r320204:
    Fix various 'make *clean *all *install' combinations.

PR: 219819
Approved by: re (gjb)

6 years agoMFC r319861:
bdrewery [Fri, 23 Jun 2017 20:25:58 +0000 (20:25 +0000)]
MFC r319861:

  META_MODE: NO_FILEMON should imply nofilemon.

Approved by: re (gjb)

6 years agoMFC r319862,r319996,r320030:
bdrewery [Fri, 23 Jun 2017 20:07:56 +0000 (20:07 +0000)]
MFC r319862,r319996,r320030:

  r319862:
    META_MODE: Show .ERROR_CMD in error.
  r319996:
    WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.
  r320030:
    WITH_META_MODE: End each ERROR_CMD CMD line with ';'.

Approved by: re (gjb, marius)

6 years agoMFC r320012,r320028,r320061,r320118:
bdrewery [Fri, 23 Jun 2017 19:44:20 +0000 (19:44 +0000)]
MFC r320012,r320028,r320061,r320118:

  r320012:
    Fix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd.
  r320028:
    Fix more incorrect library directories fix 'stale .depend' rebuilds.
  r320061:
    Fix Makefiles which override LIBDIR to not add incorrect dependencies into
    .depend.
  r320118:
    Follow-up r320061: Need to respect make.conf/env LIBDIR overrides.

Approved by: re (gjb)

6 years agoMFC r320038:
kib [Fri, 23 Jun 2017 18:57:56 +0000 (18:57 +0000)]
MFC r320038:
Style.

Approved by: re (gjb)

6 years agoUpdate stable/11 to BETA3 as part of the 11.1-RELEASE cycle.
gjb [Fri, 23 Jun 2017 00:00:00 +0000 (00:00 +0000)]
Update stable/11 to BETA3 as part of the 11.1-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r320124:
markj [Thu, 22 Jun 2017 18:40:34 +0000 (18:40 +0000)]
MFC r320124:
Fix the !TD_IS_IDLETHREAD(curthread) locking assertions.

Approved by: re (kib)

6 years agoDocument r320218, primes(6) updated to new limit of 2^64-1.
gjb [Thu, 22 Jun 2017 13:31:44 +0000 (13:31 +0000)]
Document r320218, primes(6) updated to new limit of 2^64-1.
Document r320164, qlnxe(4) firmware and hardware support updates.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319975:
kib [Thu, 22 Jun 2017 11:03:42 +0000 (11:03 +0000)]
MFC r319975:
Some minor improvements to vnode_pager_generic_putpages().

Approved by: re (marius)

6 years agoMFC r319491:
cperciva [Thu, 22 Jun 2017 05:30:27 +0000 (05:30 +0000)]
MFC r319491:

Skip setting the MTU in the netfront driver (xn# devices) if the new MTU
is the same as the old MTU.  In particular, on Amazon EC2 "T2" instances
without this change, the network interface is reinitialized every 30
minutes due to the MTU being (re)set when a new DHCP lease is obtained.

Approved by: re (delphij)

6 years agoMFC r31956[12]: Teach primes(6) to enumerate primes up to 2^64 - 1.
cperciva [Thu, 22 Jun 2017 05:26:08 +0000 (05:26 +0000)]
MFC r31956[12]: Teach primes(6) to enumerate primes up to 2^64 - 1.

Approved by:    re (delphij)
Relnotes:       primes(6) now enumerates primes beyond 3825123056546413050,
                up to a new limit of 2^64 - 1.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If and which Problem Report is related.
> Submitted by:             If someone else sent in the change.
> Reported by:              If someone else reported the issue.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

_M   .
M    usr.bin/factor/factor.6
M    usr.bin/primes/primes.c
M    usr.bin/primes/primes.h
M    usr.bin/primes/spsp.c

6 years agoMFC r320183: Reduce code duplication in rpc.lockd.
delphij [Thu, 22 Jun 2017 05:22:21 +0000 (05:22 +0000)]
MFC r320183: Reduce code duplication in rpc.lockd.

Reuse create_service code instead of duplicating it in
lookup_addresses for kernel NLM.

As a (good) side effect this also fixed a few issues that were
already fixed in the former but never applied to the latter.

Approved by: re (gjb)

6 years agoMFC 319702: Fix an off-by-one error in the VM page array on some systems.
jhb [Wed, 21 Jun 2017 14:36:25 +0000 (14:36 +0000)]
MFC 319702: Fix an off-by-one error in the VM page array on some systems.

r313186 changed how the size of the VM page array was calculated to be
less wasteful.  For most systems, the amount of memory is divided by
the overhead required by each page (a page of data plus a struct vm_page)
to determine the maximum number of available pages.  However, if the
remainder for the first non-available page was at least a page of data
(so that the only memory missing was a struct vm_page), this last page
was left in phys_avail[] but was not allocated an entry in the VM page
array.  Handle this case by explicitly excluding the page from
phys_avail[].

Approved by: re (kib)

6 years agoMFC r318968:
brooks [Tue, 20 Jun 2017 20:19:57 +0000 (20:19 +0000)]
MFC r318968:

Add missing usage and getopt(3) options

- Add the missing option 'n' to the getopt(3) string
- Add the missing options 'libxo' and 'N' to the usage message
- Add the missing options 'M' and 'N' to the man-page

Submitted by: Keegan Drake H.P. <kdrakehp@zoho.com>
Differential Revision: https://reviews.freebsd.org/D10915
Approved by: re (gjb)

6 years agoMFC r319964
davidcs [Tue, 20 Jun 2017 19:16:06 +0000 (19:16 +0000)]
MFC r319964
Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0
Add support for pci deviceID 0x8070 for QLE41xxx product line which
supports 10GbE/25GbE/40GbE

Approved by: re(gjb)

6 years agoMFC r319932:
markj [Tue, 20 Jun 2017 17:38:25 +0000 (17:38 +0000)]
MFC r319932:
Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs.

Approved by: re (gjb)

6 years agoMFC 319490: Remove stale cap_rights_get(2) manpage.
jhb [Tue, 20 Jun 2017 15:55:15 +0000 (15:55 +0000)]
MFC 319490: Remove stale cap_rights_get(2) manpage.

The documentation moved to section 3 several years ago, but
'man cap_rights_get' pulls up cap_rights_limit(2) (which is
MLINKed to cap_rights_get.2) instead of cap_rights_get(3).

Approved by: re (gjb)

6 years agoMFC 318996: Add descriptions for AES-GCM IPSec authentication (AH) counters.
jhb [Tue, 20 Jun 2017 15:10:14 +0000 (15:10 +0000)]
MFC 318996: Add descriptions for AES-GCM IPSec authentication (AH) counters.

Approved by: re (gjb)
Sponsored by: Chelsio Communications

6 years agoMFC r319916:
kib [Tue, 20 Jun 2017 12:40:25 +0000 (12:40 +0000)]
MFC r319916:
Remove stray return.

Approved by: re (marius)

6 years agoMFC r319895:
ae [Tue, 20 Jun 2017 05:57:28 +0000 (05:57 +0000)]
MFC r319895:
  Resurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib()
  with acquired RIB lock.

  This fixes a possible panic due to trying to acquire RIB rlock when it is
  already exclusive locked.

  PR: 215963, 215122
  Sponsored by: Yandex LLC
Approved by: re (delphij)

6 years agoDirect commit to stable/11 to correctly setting the EIAC and IMS
sbruno [Mon, 19 Jun 2017 15:03:47 +0000 (15:03 +0000)]
Direct commit to stable/11 to correctly setting the EIAC and IMS
registers to the same values when processing interrupts.  This reverts a
change made in r286831 that was not fully reverted in r311979

This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219

PR: 211219
Submitted by: Franco Fitchner <franco@opnsense.org>
Approved by: re (marius)

6 years agoMFC r318867: fix vmxnet3 crash when LRO is enabled
avg [Mon, 19 Jun 2017 14:45:20 +0000 (14:45 +0000)]
MFC r318867: fix vmxnet3 crash when LRO is enabled

The crash can occur when all of the following conditions are true:
- a packet consists of multiple segments (requires LRO enabled)
- there has been a failure to allocate an mbuf for the packet and
  the packet has to be dropped
- a host (vmware) still owned at least one segment of the packet,
  so the driver had to wait for another interrupt to proceed to
  discarding the remaining segment(s)

Reviewed by: rstone
Approved by: re (gjb)
Sponsored by: Panzura

6 years agoFix units in the r320088 entry. [1]
gjb [Mon, 19 Jun 2017 14:30:01 +0000 (14:30 +0000)]
Fix units in the r320088 entry. [1]
While here, move to a more appropriate section.

Submitted by: rpokala [1]
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319942 (jhb):
gjb [Mon, 19 Jun 2017 13:26:38 +0000 (13:26 +0000)]
MFC r319942 (jhb):

 Don't try to assign interrupts to a CPU on single-CPU systems.

 All interrupts are routed to the sole CPU in that case implicitly.
 This is a regression in EARLY_AP_STARTUP.  Previously the 'assign_cpu'
 variable was only set when a multi-CPU system finished booting, so
 its value both meant that interrupts could be assigned and that
 there was more than one CPU.

PR: 219882
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

6 years agoDocument r320088, default EFI partition size change.
gjb [Mon, 19 Jun 2017 13:25:47 +0000 (13:25 +0000)]
Document r320088, default EFI partition size change.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r320035:
kib [Mon, 19 Jun 2017 07:15:47 +0000 (07:15 +0000)]
MFC r320035:
Move the description of kern.kq_calloutmax sysctl into a new paragraph
for better presentation.

Approved by: re (delphij)

6 years agoMFC r320034:
kib [Mon, 19 Jun 2017 06:48:21 +0000 (06:48 +0000)]
MFC r320034:
Start a new sentence on the new line.

Approved by: re (delphij)

6 years agoMFC r319962:
cy [Mon, 19 Jun 2017 05:01:51 +0000 (05:01 +0000)]
MFC r319962:

Correct example directory location.

Submitted by: olivier@
Approved by: re@ (kib@)

6 years agobsdinstall: use consistent EFI configuration across platforms
emaste [Mon, 19 Jun 2017 03:07:00 +0000 (03:07 +0000)]
bsdinstall: use consistent EFI configuration across platforms

MFC r320007:
- increase arm64 EFI partition to 200M, as x86
- use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86
- increase ZFS EFI partition to 200M

MFC r320008: bsdinstall: correct comment after r320007

PR: 201898
Approved by: re (kib)
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319676:
pfg [Sun, 18 Jun 2017 21:46:54 +0000 (21:46 +0000)]
MFC r319676:
patch: if reading fails, do not go into infinite loop asking for a filename.

This can happen if no tty is available.

Obtained from: OpenBSD (CVS rev 1.54)
Approved by: re (marius)

6 years agoMFC r319355:
hselasky [Sun, 18 Jun 2017 18:09:31 +0000 (18:09 +0000)]
MFC r319355:
Minor code optimisation.
Avoid locking the global CUSE lock when the polling flags are zero.

Approved by: re (kib)

6 years agoMFC r317928
jhibbits [Sun, 18 Jun 2017 17:20:48 +0000 (17:20 +0000)]
MFC r317928

Add necessary bits to get FreeBSD booting on the Unifi Security Gateway

Summary:
The Ubiquiti Unifi Security Gateway is virtually identical to the
EdgeRouter Lite, with a smaller PCB and apparently a different board identifier.
Simply adding the new board identifier alongside the ERL identifier, FreeBSD
boots successfully, and can access the needed peripherals.

Approved by: re(bdrewery)

6 years agoMFC r319972:
hselasky [Sun, 18 Jun 2017 11:46:17 +0000 (11:46 +0000)]
MFC r319972:
Use static device numbering instead of dynamic one when creating
mlx4en network interfaces. This prevents infinite unit number growth
typically when the mlx4en driver is used inside virtual machines which
support runtime PCI attach and detach.

Approved by: re (gjb)
Sponsored by: Mellanox Technologies

6 years agolld: Fix weak symbols on arm and aarch64
emaste [Sat, 17 Jun 2017 19:00:12 +0000 (19:00 +0000)]
lld: Fix weak symbols on arm and aarch64

MFC r319955: lld: sort relocations

No functional change; applied to facilitate merge of later LLD commit.

MFC r319956: lld: Fix weak symbols on arm and aarch64

Given

.weak target
 .global _start
_start:
 b target

The intention is that the branch goes to the instruction after the
branch, effectively turning it on a nop. The branch adds the runtime
PC, but we were adding it statically too.

I noticed the oddity by inspection, but llvm-objdump seems to agree,
since it now prints things like:

b #-4 <_start+0x4>

Obtained from: LLD r298797, r305212
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319539:
kib [Sat, 17 Jun 2017 17:10:50 +0000 (17:10 +0000)]
MFC r319539:
Mitigate several problems with the softdep_request_cleanup() on busy
host.

Approved by: re (gjb)

6 years agoUpdate stable/11 to BETA2 as part of the 11.1-RELEASE cycle.
gjb [Fri, 16 Jun 2017 00:00:01 +0000 (00:00 +0000)]
Update stable/11 to BETA2 as part of the 11.1-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319540
alc [Thu, 15 Jun 2017 18:49:46 +0000 (18:49 +0000)]
MFC r319540
  The data type returned by vmoff() is too narrow in its range.  This could
  break the transmission of files longer than 4 GB on 32-bit architectures.

Approved by: re (gjb)

6 years agoMFC: r319863
allanjude [Thu, 15 Jun 2017 17:44:16 +0000 (17:44 +0000)]
MFC: r319863
bsdinstall: Make ZFS min_auto_ashift adjustment persistent

MFC: r319864
bsdinstall: support Auto ZFS mode for ARM64

Approved by: re (gjb)

6 years agoMFC: r319866, r319867
allanjude [Thu, 15 Jun 2017 17:43:40 +0000 (17:43 +0000)]
MFC: r319866, r319867
top: Change the way the ZFS ARC compression ratio is calculated
remove overhead statistics, already included in other counters

Approved by: re (gjb)

6 years agoMFC r318995
alc [Thu, 15 Jun 2017 17:06:04 +0000 (17:06 +0000)]
MFC r318995
  In r118390, the swap pager's approach to striping swap allocation over
  multiple devices was changed.  However, swapoff_one() was not fully and
  correctly converted.  In particular, with r118390's introduction of a per-
  device blist, the maximum swap block size, "dmmax", became irrelevant to
  swapoff_one()'s operation.  Moreover, swapoff_one() was performing out-of-
  range operations on the per-device blist that were silently ignored by
  blist_fill().

  This change corrects both of these problems with swapoff_one(), which will
  allow us to potentially increase MAX_PAGEOUT_CLUSTER.  Previously,
  swapoff_one() would panic inside of blist_fill() if you increased
  MAX_PAGEOUT_CLUSTER.

MFC r319001
  After r118390, the variable "dmmax" was neither the correct strip size
  nor the correct maximum block size.  Moreover, after r318995, it serves
  no purpose except to provide information to user space through a read-
  sysctl.

  This change eliminates the variable "dmmax" but retains the sysctl.  It
  also corrects the value returned by the sysctl.

MFC r319604
  Halve the memory being internally allocated by the blist allocator.  In
  short, half of the memory that is allocated to implement the radix tree is
  wasted because we did not change "u_daddr_t" to be a 64-bit unsigned int
  when we changed "daddr_t" to be a 64-bit (signed) int.  (See r96849 and
  r96851.)

MFC r319612
  When the function blist_fill() was added to the kernel in r107913, the swap
  pager used a different scheme for striping the allocation of swap space
  across multiple devices.  And, although blist_fill() was intended to support
  fill operations with large counts, the old striping scheme never performed a
  fill larger than the stripe size.  Consequently, the misplacement of a
  sanity check in blst_meta_fill() went undetected.  Now, moving forward in
  time to r118390, a new scheme for striping was introduced that maintained a
  blist allocator per device, but as noted in r318995, swapoff_one() was not
  fully and correctly converted to the new scheme.  This change completes what
  was started in r318995 by fixing the underlying bug in blst_meta_fill() that
  stops swapoff_one() from simply performing a single blist_fill() operation.

MFC r319627
  Starting in r118390, swaponsomething() began to reserve the blocks at the
  beginning of a swap area for a disk label.  However, neither r118390 nor
  r118544, which increased the reservation from one to two blocks, correctly
  accounted for these blocks when updating the variable "swap_pager_avail".
  This change corrects that error.

MFC r319655
  Originally, this file could be compiled as a user-space application for
  testing purposes.  However, over the years, various changes to the kernel
  have broken this feature.  This revision applies some fixes to get user-
  space compilation working again.  There are no changes in this revision
  to code that is used by the kernel.

Approved by: re (kib)

6 years agoMFC 319670
jpaetzel [Thu, 15 Jun 2017 16:12:45 +0000 (16:12 +0000)]
MFC 319670

Fix SMBFS when saved passwords are greater than 18 character

PR: 132302
Submitted by: dhorn2000@gmail.com guru@unixarea.de
Approved by: re (gjb)

6 years agoMFC r319954:
gjb [Thu, 15 Jun 2017 15:50:17 +0000 (15:50 +0000)]
MFC r319954:
 Modernize FreeBSD version numbers in freebsd-update(8).
 While here, expand a contraction to make textproc/igor happy.

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319852:
delphij [Thu, 15 Jun 2017 15:24:15 +0000 (15:24 +0000)]
MFC r319852:

Fix buffer lengths.

After r319369, the RPC code validates caller supplied buffer length in
taddr2uaddr.  When no -h is specified, the sizeof(ai_addr) is used,
which is always smaller than the required size and therefore uaddr
would be NULL, causing the kernel to copyin() from userland NULL
and fail with EFAULT.

Approved by: re (kib)

6 years agoMFC r319869:
kib [Thu, 15 Jun 2017 15:08:54 +0000 (15:08 +0000)]
MFC r319869:
Decode recently added flags.

Approved by: re (marius)

6 years agoNull pointer must be checked before use. This fixes a regression introduced
jkim [Thu, 15 Jun 2017 02:39:33 +0000 (02:39 +0000)]
Null pointer must be checked before use.  This fixes a regression introduced
in r318716.

Note it is a direct commit to stable/11 because head removed support for
idle page zeroing in r305362.

PR: 219994
Reviewed by: markj
Approved by: re (gjb)

6 years agoMFC: 319690
dexuan [Wed, 14 Jun 2017 13:44:32 +0000 (13:44 +0000)]
MFC: 319690

Approved by: re (marius)

r319690
hyperv/pcib: use the device serial number as PCI domain

Currently the PCI domain is initialized with the instance GUID in
vmbus_pcib_attach(). It turns out the GUID can change across VM reboot,
while some users want a persistent value for PCI domain. The solution is
that we can change to use the device serial number, which starts with 1
and is unique within a VM.

Obtained from: Haiyang Zhang
Sponsored by: Microsoft

6 years agoMFC r319825:
kib [Wed, 14 Jun 2017 05:12:09 +0000 (05:12 +0000)]
MFC r319825:
More accurately handle early EFER restoration on resume.

Approved by: re (delphij)

6 years agoMFC r307517, r314342, r316357, r317545, r317777:
rgrimes [Tue, 13 Jun 2017 22:34:42 +0000 (22:34 +0000)]
MFC r307517, r314342, r316357, r317545, r317777:

r307517:
Typo fixed: arbitraty -> arbitrary.
PR: 213559

r314342:
bhyve: document virtio-console in the manpage

r316357:
Minor style improvements in bhyve.8
Replace "as of now" with "at present". As the change is a really minor one,
don't bump .Dd.

r317545:
Document raw framebuffer device and XHCI device configurations.

r317777:
Improve documentation of fbuf device.

Approved by: grehan (mentor)
Approved by: re (gjb)

6 years agoMFC r317428 (cognet): fix arm64 MSI
emaste [Tue, 13 Jun 2017 18:59:34 +0000 (18:59 +0000)]
MFC r317428 (cognet): fix arm64 MSI

In arm_gicv2m_alloc_msi(), if we found a suitable irq range, leave the loop
before we increase irq again, or we'd end up choosing an irq, and then
really using the next one, even if it's not available.
Also in the inner loop, correct the end check so that we check every irq,
even the last one.
This makes the msk(4) adapter able to use MSI on Softiron Overdrive 1000.

PR: 219956
Approved by: re (gjb)

6 years agoMFC r319610:
allanjude [Tue, 13 Jun 2017 15:23:49 +0000 (15:23 +0000)]
MFC r319610:
  usr.sbin/sesutil: correct 'locate all off' to deactivate empty slot LEDs

PR: 217409
Approved by: re (marius)

6 years agoDocument r319884, make(1) version 20170510.
gjb [Tue, 13 Jun 2017 01:13:09 +0000 (01:13 +0000)]
Document r319884, make(1) version 20170510.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoUpdate bmake to 20170510
sjg [Tue, 13 Jun 2017 00:22:15 +0000 (00:22 +0000)]
Update bmake to 20170510

Approved by: re@

6 years agoMFC r313398:
ngie [Mon, 12 Jun 2017 17:37:18 +0000 (17:37 +0000)]
MFC r313398:

Approved by: re (gjb)

Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD

YYINT on FreeBSD is int, not short

I'll work with the upstream maintainer or come up with a build
method of modifying their definitions on install instead of
having to modify tests to match our forked YYINT definition.

PR: 216891

6 years agoMFC r319571:
dchagin [Sun, 11 Jun 2017 09:33:09 +0000 (09:33 +0000)]
MFC r319571:

On success, getrandom() Linux system call returns the number of bytes that
were copied to the buffer supplied by the user.

PR: 219464
Submitted by: Maciej Pasternacki
Reported by: Maciej Pasternacki
Approved by: re (kib)

6 years agoMFC r318765:
allanjude [Sun, 11 Jun 2017 02:04:39 +0000 (02:04 +0000)]
MFC r318765:
Allow cpuset_{get,set}affinity in capabilities mode

Approved by: re (marius)

6 years agoMFC r319518:
kib [Sat, 10 Jun 2017 11:14:54 +0000 (11:14 +0000)]
MFC r319518:
Ensure that cached struct thread does not keep spurious td_su
reference on an UFS mount point.

MFC r319519:
Clean possible td_su reference on the struct mount being unmounted as
the last step of ffs_unmount().

Approved by: re (gjb)

6 years agoRename stable/11 from PRERELEASE to BETA1 as part of the 11.1-RELEASE
gjb [Thu, 8 Jun 2017 23:56:23 +0000 (23:56 +0000)]
Rename stable/11 from PRERELEASE to BETA1 as part of the 11.1-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r317806:
glebius [Thu, 8 Jun 2017 22:13:29 +0000 (22:13 +0000)]
MFC r317806:
  The nandsim(4) simulator driver doesn't have any protection against
  races at least in its ioctl handler, and at the same time it creates
  device entry with 0666 permissions.

  To plug possible issues in it:
  - Mark it as needing Giant.
  - Switch device mode to 0600.

Submitted by: C Turt
Reviewed by: imp
Security: Possible double free in ioctl handler
Approved by: re (marius)

6 years agoMFC r318677:
glebius [Thu, 8 Jun 2017 22:12:10 +0000 (22:12 +0000)]
MFC r318677:
  Fix regression in ndis(4) after r286410. This adds a bunch of checks for
  whether this is a Ethernet or 802.11 device and does proper dereferencing.

  PR: 213237
  Submitted by: <ota j.email.ne.jp>
  Approved by: re (marius)

6 years agoMFC r319621:
gjb [Thu, 8 Jun 2017 17:54:27 +0000 (17:54 +0000)]
MFC r319621:

 Ensure ${_CW} is uppercase when passing '-c' to mk-vmimage.sh,
 otherwise with 'CLOUDWARE=vagrant-virtualbox', the path to the
 configuration file may be incorrect.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319473:
dim [Thu, 8 Jun 2017 17:10:58 +0000 (17:10 +0000)]
MFC r319473:

For arm targets, place ABI at the end of the target triple

For some reason, we have been inserting the ABI specification into the
middle of the target triple, when building LLVM, like so:

    armv6-gnueabi-freebsd12.0

This is the wrong way around.  LLVM even auto-canonicalizes it to:

    armv6--freebsd12.0-gnueabi

Let's do this the right way in llvm.build.mk instead.  While here,
define a proper VENDOR macro which can be overridden easily.

Approved by: re (gjb)
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D10846

6 years agoCurrently stable/11 is using custom DTS for beaglebone(-black) while CURRENT
manu [Thu, 8 Jun 2017 15:50:50 +0000 (15:50 +0000)]
Currently stable/11 is using custom DTS for beaglebone(-black) while CURRENT
is using the upstream ones from Linux.
U-Boot ports have been changed to use the upstream names so 11.1-PRERELEASE
doesn't boot.
Since we cannot MFC the DTS easily (a lot of drivers would have to be modified)
add links on the dts with upstream names.

This is a direct commit to stable/11

Approved by: re (marius)

6 years agoMFC r319603, r319608, r319609:
gjb [Thu, 8 Jun 2017 15:47:52 +0000 (15:47 +0000)]
MFC r319603, r319608, r319609:

 Create a hard link for sun7i-a20-cubieboard2.dtb to allow the
 cubieboard2 to find the correct dtb file.

Note: r319608 and r319609 are included, but are no-op changes to
the original change, and only included to prevent these commits
from showing up on the MFC tracking page.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r318970: Call VLAN_CAPABILITIES() when LAGG capabilities change.
mav [Thu, 8 Jun 2017 14:34:39 +0000 (14:34 +0000)]
MFC r318970: Call VLAN_CAPABILITIES() when LAGG capabilities change.

This makes VLAN on top of LAGG to expose proper capabilities if they are
changed after creation.

Approved by: re (marius)

6 years agoMFC r318966: Improve applying unified capabilities to the lagg ports.
mav [Thu, 8 Jun 2017 14:33:47 +0000 (14:33 +0000)]
MFC r318966: Improve applying unified capabilities to the lagg ports.

Some NICs have some capabilities dependent, so that disabling one
require disabling some other (TXCSUM/RXCSUM on em).  This code tries to
reach the consensus more insistently.

Approved by: re (marius)

6 years agoMFC r318907: Remove some code, dead from the day one.
mav [Thu, 8 Jun 2017 14:32:42 +0000 (14:32 +0000)]
MFC r318907: Remove some code, dead from the day one.

Approved by: re (marius)

6 years agoMFC r319556:
tuexen [Wed, 7 Jun 2017 12:50:54 +0000 (12:50 +0000)]
MFC r319556:
Fix the ICMP6 handling for TCP.

The ICMP6 packets might not be contained in a single mbuf. So don't
assume this. Keep the IPv4 and IPv6 code in sync and make explicit
that the syncache code only need the TCP sequence number, not the
complete TCP header.

Approved by: re (marius)

6 years agoMFC r318780:
kib [Wed, 7 Jun 2017 11:39:52 +0000 (11:39 +0000)]
MFC r318780:
Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE.

Approved by: re (marius)

6 years agoMFC r318781:
kib [Wed, 7 Jun 2017 11:30:28 +0000 (11:30 +0000)]
MFC r318781:
Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2().

Approved by: re (marius)

6 years agoMFC r318998:
cy [Tue, 6 Jun 2017 19:20:28 +0000 (19:20 +0000)]
MFC r318998:

Fix return value of ip_sync_nat. Previously, regardless of error it
always returned a return code of 0.

Obtained from: NetBSD ip_sync.c r1.5
Approved by: re (delphij)

6 years agoMFC r319076:
trasz [Tue, 6 Jun 2017 17:27:41 +0000 (17:27 +0000)]
MFC r319076:

Declutter rctl(8) by moving kernel build instructions into newly
created rctl(4).

Approved by: re (gjb)

6 years agoMFC r319075:
trasz [Tue, 6 Jun 2017 17:10:34 +0000 (17:10 +0000)]
MFC r319075:

Random tweaks to rctl(8).

This is just wording and formatting fixes.

MFC r319432:

Use proper capitalization with .Dd.

Approved by: re (gjb)

6 years agoMFC r319074:
trasz [Tue, 6 Jun 2017 17:00:21 +0000 (17:00 +0000)]
MFC r319074:

Minor tweaks to iscsi(4) and iscsid(8).

This is mostly wording and clarification of the userspace/kernel split.

Approved by: re (gjb)

6 years agoMFC r318943 (avg):
gjb [Tue, 6 Jun 2017 14:46:23 +0000 (14:46 +0000)]
MFC r318943 (avg):

 MFV r318942: 8166 zpool scrub thinks it repaired offline device

 https://www.illumos.org/issues/8166
  If we do a scrub while a leaf device is offline (via "zpool offline"),
  we will inadvertently clear the DTL (dirty time log) of the offline
  device, even though it is still damaged. When the device comes back
  online, we will incompletely resilver it, thinking that the scrub
  repaired blocks written before the scrub was started. The incomplete
  resilver can lead to data loss if there is a subsequent failure of a
  different leaf device.
  The fix is to never clear the DTL of offline devices. Note that if a
  device is onlined while a scrub is in progress, the scrub will be
  restarted.
  The problem can be worked around by running "zpool scrub" after
  "zpool online".
  See also https://github.com/zfsonlinux/zfs/issues/5806

PR: 219537
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319073:
trasz [Tue, 6 Jun 2017 14:40:53 +0000 (14:40 +0000)]
MFC r319073:

Random tweaks to cfiscsi(4) man page.

This improves wording and adds a few Xrs.

Approved by: re (gjb)

6 years agoRevert r319607, which documents items that existed in 11.0-RELEASE.
gjb [Tue, 6 Jun 2017 14:26:37 +0000 (14:26 +0000)]
Revert r319607, which documents items that existed in 11.0-RELEASE.

Submitted by: jhb
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319072:
trasz [Tue, 6 Jun 2017 09:43:28 +0000 (09:43 +0000)]
MFC r319072:

Make ctld(8) mention cfiscsi(4).

Approved by: re (marius)

6 years agoMFC r318816:
trasz [Tue, 6 Jun 2017 09:23:12 +0000 (09:23 +0000)]
MFC r318816:

Don't end up manpage titles with a full stop.

Approved by: re (marius)

6 years agoMFC r318861:
trasz [Tue, 6 Jun 2017 08:55:11 +0000 (08:55 +0000)]
MFC r318861:

Create /net by default, for autofs.

Approved by: re (kib)

6 years agoMFC r318398:
trasz [Tue, 6 Jun 2017 08:33:19 +0000 (08:33 +0000)]
MFC r318398:

Bump default MAXTSIZ (kern.maxtsiz) from 128MB to 32GB. The old limit
prevents one from running eg clang built with debug; the new one is
arbitrary (equal to MAXDSIZ) and... well, should be quite future-proof.

Same fix might be applicable to other 64 bit architectures; I'll ask
their respective maintainers to make sure it won't break anything.

Approved by: re (kib)

6 years agoMFC r319369:
delphij [Tue, 6 Jun 2017 07:21:33 +0000 (07:21 +0000)]
MFC r319369:

 * limit size of buffers to RPC_MAXDATASIZE
 * don't leak memory
 * be more picky about bad parameters

From:

https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt

via NetBSD.

Approved by: re (kib)

6 years agoDocument r295930, truss(1) '-H' flag.
gjb [Mon, 5 Jun 2017 18:56:45 +0000 (18:56 +0000)]
Document r295930, truss(1) '-H' flag.
Document r308154, cxgbe(4) additional virtual interface support.

Submitted by: jhb
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

6 years agoMFC r319118:
ae [Mon, 5 Jun 2017 11:11:07 +0000 (11:11 +0000)]
MFC r319118:
  Disable IPsec debugging code by default when IPSEC_DEBUG kernel option
  is not specified.

  Due to the long call chain IPsec code can produce the kernel stack
  exhaustion on the i386 architecture. The debugging code usually is not
  used, but it requires a lot of stack space to keep buffers for strings
  formatting. This patch conditionally defines macros to disable building
  of IPsec debugging code.

  IPsec currently has two sysctl variables to configure debug output:
   * net.key.debug variable is used to enable debug output for PF_KEY
     protocol. Such debug messages are produced by KEYDBG() macro and
     usually they can be interesting for developers.
   * net.inet.ipsec.debug variable is used to enable debug output for
     DPRINTF() macro and ipseclog() function. DPRINTF() macro usually
     is used for development debugging. ipseclog() function is used for
     debugging by administrator.

  The patch disables KEYDBG() and DPRINTF() macros, and formatting buffers
  declarations when IPSEC_DEBUG is not present in kernel config. This
  reduces stack requirement for up to several hundreds of bytes.
  The net.inet.ipsec.debug variable still can be used to enable ipseclog()
  messages by administrator.

  PR: 219476

MFC r319412:
  Build kdebug_secreplay() function only when IPSEC_DEBUG is defined.
  This should fix the build on sparc.

Approved by: re (kib)

6 years agoMFC r319052:
dchagin [Sun, 4 Jun 2017 19:58:14 +0000 (19:58 +0000)]
MFC r319052:

Strip _binary_linux_locore_o_size from ${VDSO}.so as it is a low absolute
symbol, and this breaks symbol lookup in ddb.

Approved by: re (kib)

6 years agoMFC r317601:
dchagin [Sun, 4 Jun 2017 19:56:21 +0000 (19:56 +0000)]
MFC r317601:

Fix symlinkat() which use the newdfd argument to look up the old path,
while it should use it for the new path instead.

Approved by: re (kib)

6 years agoMFC r318194,r319481:
bdrewery [Sun, 4 Jun 2017 19:09:50 +0000 (19:09 +0000)]
MFC r318194,r319481:

  r318194:
    Tell bmake (meta mode) to ignore changes to /usr/local/etc/libmap.d/*
  r319481:
    META_MODE: Move ignoring of /usr/local/etc/libmap.d to proper place.

Approved by: re (gjb)

6 years agoMFC r319413:
hselasky [Sun, 4 Jun 2017 08:45:13 +0000 (08:45 +0000)]
MFC r319413:
Free hardware queue resource after port is stopped in the mlx4en(4)
driver. Else if the port is up the resource might still be busy and
the MTT free will fail.

PR: 216493
Approved by: re (kib)
Sponsored by: Mellanox Technologies

6 years agoMFC r319414:
hselasky [Sun, 4 Jun 2017 08:25:28 +0000 (08:25 +0000)]
MFC r319414:
Allow communication between functions on the same host when using the
mlx4en(4) driver in SRIOV mode.

Place a copy of the destination MAC address in the send WQE only under
SRIOV/eSwitch configuration or when the device is in selftest. This
allows communication between functions on the same host.

PR: 216493
Approved by: re (kib)
Sponsored by: Mellanox Technologies

6 years agoMFC r319294:
ngie [Sun, 4 Jun 2017 02:21:38 +0000 (02:21 +0000)]
MFC r319294:

Approved by: re (gjb)

Fix "make rebase" after ^/head@r315776

"make rebase" can be used for rebasing the output files from mkimg
after making a change to mkimg. This will come in handy soon, per
bug 219673.

6 years agoMFC r316503,r316504,r316505:
ngie [Sat, 3 Jun 2017 20:39:48 +0000 (20:39 +0000)]
MFC r316503,r316504,r316505:

Approved by: re (gjb)

r316503:

Clean up trailing whitespace

r316504:

Clean up more trailing whitespace in the licensing tort that
happened to be spaces, not tabs

r316505:

Don't assume NAME_MAX is 255

Query the filesystem limit via getconf(3) instead

6 years agoMFC r318974: uart: add AMT SOL PCI ID
emaste [Sat, 3 Jun 2017 03:15:57 +0000 (03:15 +0000)]
MFC r318974: uart: add AMT SOL PCI ID

I adjusted the description to be similar to existing AMT entries.

PR: 219384
Approved by: re (gjb)