]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoUpdate stable/11 to BETA3 as part of the 11.2-RELEASE cycle.
gjb [Fri, 25 May 2018 00:00:00 +0000 (00:00 +0000)]
Update stable/11 to BETA3 as part of the 11.2-RELEASE cycle.

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

6 years agoMFC: r333955
marius [Thu, 24 May 2018 23:11:25 +0000 (23:11 +0000)]
MFC: r333955

- Unbreak booting sparc64 kernels after the metadata unification in
  r329190 (MFCed to stable/11 in r332150); sparc64 kernels are always
  64-bit but with that revision in place, the loader was treating them
  as 32-bit ones.
- In order to reduce the likelihood of this kind of breakage in the
  future, #ifdef out md_load() on sparc64 and make md_load_dual() -
  which is currently local to metadata.c anyway - static.
- Make md_getboothowto() - also local to metadata.c - static.
- Get rid of the unused DTB pointer on sparc64.

Approved by: re (kib)

6 years agoMFC: r333792
shurd [Thu, 24 May 2018 18:53:29 +0000 (18:53 +0000)]
MFC: r333792

Avoid spurious warnings when hardware LRO is enabled by not attempting
to configure invalid VNICs.

Approved by: re (gjb)
Submitted by:   bhargava.marreddy@broadcom.com
Sponsored by:   Broadcom Limited

6 years agoMFC r334004:
kib [Thu, 24 May 2018 13:17:24 +0000 (13:17 +0000)]
MFC r334004:
Add Intel Spec Store Bypass Disable control.

This also includes the i386/include/pcpu.h part of the r334018.

Security: CVE-2018-3639
Approved by: re (gjb)

6 years agoMFC r334004:
kib [Thu, 24 May 2018 12:14:14 +0000 (12:14 +0000)]
MFC r334004:
Add definition for Intel Speculative Store Bypass Disable MSR bits.

Security: CVE-2018-3639
Approved by: re (gjb)

6 years agoMFC r334003:
kib [Thu, 24 May 2018 11:59:33 +0000 (11:59 +0000)]
MFC r334003:
Preserve other bits in IA32_SPEC_CTL MSR when changing the IBRS and
STIBP states.

Approved by: re (gjb)

6 years agoMFC r333986:
ae [Thu, 24 May 2018 11:02:21 +0000 (11:02 +0000)]
MFC r333986:
  Remove check for matching the rulenum, ruleid and rule pointer from
  dyn_lookup_ipv[46]_state_locked(). These checks are remnants of not
  ready to be committed code, and they are there by accident.
  Due to the race these checks can lead to creating of duplicate states
  when concurrent threads in the same time will try to add state for two
  packets of the same flow, but in reverse directions and matched by
  different parent rules.

  Reported by: lev

MFC r334039:
  Restore the ability to keep states after parent rule deletion.

  This feature is disabled by default and was removed when dynamic states
  implementation changed to be lockless. Now it is reimplemented with small
  differences - when dyn_keep_states sysctl variable is enabled,
  dyn_match_ipv[46]_state() function doesn't match child states of deleted
  rule. And thus they are keept alive until expired. ipfw_dyn_lookup_state()
  function does check that state was not orphaned, and if so, it returns
  pointer to default_rule and its position in the rules map. The main visible
  difference is that orphaned states still have the same rule number that
  they have before parent rule deleted, because now a state has many fields
  related to rule and changing them all atomically to point to default_rule
  seems hard enough.

  Reported by: <lantw44 at gmail.com>
Approved by: re (kib)

6 years agoMFC r333892:
kib [Tue, 22 May 2018 14:36:46 +0000 (14:36 +0000)]
MFC r333892:
Fix PCID+PTI pmap operations on Xen/HVM.

Approved by: re (marius)

6 years agoMFC r333891:
kib [Tue, 22 May 2018 14:25:40 +0000 (14:25 +0000)]
MFC r333891:
Fix IBRS handling around MWAIT.

Approved by: re (marius)

6 years agoMFC r333896:
kib [Tue, 22 May 2018 14:08:54 +0000 (14:08 +0000)]
MFC r333896:
Style.

Approved by: re (marius)

6 years agoMFC r333099: Included opt_stack.h in Makefile, to fix module build outside kernel...
ram [Tue, 22 May 2018 10:23:12 +0000 (10:23 +0000)]
MFC r333099: Included opt_stack.h in Makefile, to fix module build outside kernel build environment.

PR: 227823
Reported by: eugen
Approved by: re

6 years agoMFC r333492:
ken [Mon, 21 May 2018 18:59:34 +0000 (18:59 +0000)]
MFC r333492:
  ------------------------------------------------------------------------
  r333492 | ken | 2018-05-11 08:50:26 -0600 (Fri, 11 May 2018) | 10 lines

  Clear out the entire structure, not just the size of a pointer to it.

  sys/dev/ocs/ocs_os.c:
   In ocs_thread_create(), use sizeof(*thread) (instead of
   sizeof(thread)) as the size argument to memset so that we clear
   out the entire thread structure instead of just a few bytes of it.

  Submitted by: jtl

  ------------------------------------------------------------------------

Approved by: re (marius, gjb)

6 years agoMFC r333715:
dim [Sun, 20 May 2018 16:03:21 +0000 (16:03 +0000)]
MFC r333715:

Pull in r322325 from upstream llvm trunk (by Matthias Braun):

  PeepholeOpt cleanup/refactor; NFC

  - Less unnecessary use of `auto`
  - Add early `using RegSubRegPair(AndIdx) =` to avoid countless
    `TargetInstrInfo::` qualifications.
  - Use references instead of pointers where possible.
  - Remove unused parameters.
  - Rewrite the CopyRewriter class hierarchy:
     - Pull out uncoalescable copy rewriting functionality into
       PeepholeOptimizer class.
     - Use an abstract base class to make it clear that rewriters are
       independent.
  - Remove unnecessary \brief in doxygen comments.
  - Remove unused constructor and method from ValueTracker.
  - Replace UseAdvancedTracking of ValueTracker with DisableAdvCopyOpt
    use.

Even though upstream marked this as "No Functional Change", it does
contain some functional changes, and these fix a compiler hang for one
particular source file in the devel/godot port.

Approved by: re (kib)
PR: 228261

6 years agoMFC r333623:
hselasky [Sat, 19 May 2018 19:09:41 +0000 (19:09 +0000)]
MFC r333623:
Add support for setting type of service, TOS, for outgoing RDMA connections
in the krping kernel test utility.

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

6 years agoMFC r333534:
kib [Sat, 19 May 2018 18:02:46 +0000 (18:02 +0000)]
MFC r333534:
Add a test for vm86(2).

Approved by: re (gjb)

6 years agoUpdate stable/11 to BETA2 as part of the 11.2-RELEASE cycle.
gjb [Fri, 18 May 2018 14:59:04 +0000 (14:59 +0000)]
Update stable/11 to BETA2 as part of the 11.2-RELEASE cycle.

As 11.2-BETA2 needs to be rebuilt, this commit marks the real point
in time for the rename.

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

6 years agoMFC r315733, r315737, r315740, r330054:
gjb [Fri, 18 May 2018 14:57:58 +0000 (14:57 +0000)]
MFC r315733, r315737, r315740, r330054:

 r315733 (imp):
  Impelemnt ttys onifexists in init.

  Implement a new init(8) option in /etc/ttys. If this option is present
  on the entry in /etc/ttys, the entry will be active if and only if it
  exists.  If the name starts with a '/', it will be considered an
  absolute path. If not, it will be a path relative to /dev.

  This allows one to turn off video console getty that aren't present
  (while running a getty on them even when they aren't the system
  console). Likewise with serial ports.

  It differs from onifconsole in only requiring the device exist rather
  than it be listed as one of the system consoles.

 r315737 (ngie):
  Unbreak world by adding sys/stat.h for stat(2)

 r315740 (imp):
  Simplify the code a little.

 r330054 (trasz):
  Improve missing tty handling in init(8).  This removes a check that did
  nothing - it was checking for ENXIO, which, with devfs, is no longer
  returned - and was badly placed anyway, and replaces it with similar
  one that works, and is done just before starting getty, instead of being
  done when rereading ttys(5).

  From the practical point of view, this makes init(8) handle disappearing
  terminals (eg /dev/ttyU*) gracefully, without unneccessary getty restarts
  and resulting error messages.

Reported by: Bart Ender, Andre Albsmeier
PR: 228315
Blocks: 11.2-BETA2
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

6 years agoRevert r333774, which renames stable/11 from BETA1 to BETA2 in
gjb [Fri, 18 May 2018 14:57:06 +0000 (14:57 +0000)]
Revert r333774, which renames stable/11 from BETA1 to BETA2 in
order to address an issue what was discovered with the BETA2
builds.

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

6 years agoMFC r333497:
ae [Fri, 18 May 2018 10:17:13 +0000 (10:17 +0000)]
MFC r333497:
  Apply the change from r272770 to if_ipsec(4) interface.

  It is guaranteed that if_ipsec(4) interface is used only for tunnel
  mode IPsec, i.e. decrypted and decapsulated packet has its own IP header.
  Thus we can consider it as new packet and clear the protocols flags.
  This allows ICMP/ICMPv6 properly handle errors that may cause this packet.

  PR: 228108
Approved by: re (kib)

6 years agoUpdate stable/11 to BETA2 as part of the 11.2-RELEASE cycle.
gjb [Thu, 17 May 2018 23:59:56 +0000 (23:59 +0000)]
Update stable/11 to BETA2 as part of the 11.2-RELEASE cycle.

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

6 years agoMFC: r333600 (phil)
marius [Thu, 17 May 2018 21:49:34 +0000 (21:49 +0000)]
MFC: r333600 (phil)

Handle thread-local storage (TLS) segments correctly when
copying (objcopy) and displaying (readelf) them.

PR: 227552
Submitted by: kaiw (maintainer)
Approved by: re (gjb)

6 years agoMFC: r333614
marius [Thu, 17 May 2018 21:23:14 +0000 (21:23 +0000)]
MFC: r333614

Let mmcsd_ioctl() ensure appropriate privileges via priv_check(9).

Approved by: re (gjb, kib)

6 years agoMFC: r333613
marius [Thu, 17 May 2018 21:22:19 +0000 (21:22 +0000)]
MFC: r333613

The broken DDR52 support of Intel Bay Trail eMMC controllers rumored
in the commit log of r321385 has been confirmed via the public VLI54
erratum. Thus, stop advertising DDR52 for these controllers.
Note that this change should hardly make a difference in practice as
eMMC chips from the same era as these SoCs most likely support HS200
at least, probably even up to HS400ES.

Approved by: re (gjb, kib)

6 years agoDocument r333410, i386 memory stick installer images now use MBR.
gjb [Thu, 17 May 2018 18:59:12 +0000 (18:59 +0000)]
Document r333410, i386 memory stick installer images now use MBR.

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

6 years agoFurther expand on the description of r333006, noting the ISO images
gjb [Thu, 17 May 2018 18:40:06 +0000 (18:40 +0000)]
Further expand on the description of r333006, noting the ISO images
can now be used to write to a memory stick, as well as a CD.

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

6 years agoDocument r333738, vxge(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:05 +0000 (18:40 +0000)]
Document r333738, vxge(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333412, lmc(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:04 +0000 (18:40 +0000)]
Document r333412, lmc(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333367, nxge(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:03 +0000 (18:40 +0000)]
Document r333367, nxge(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333171, ixgb(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:02 +0000 (18:40 +0000)]
Document r333171, ixgb(4) deprecation in FreeBSD 12.

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

6 years agoDocument r332519, various GEOM classes deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:01 +0000 (18:40 +0000)]
Document r332519, various GEOM classes deprecation in FreeBSD 12.

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

6 years agoDocument r331882, cm(4) and fpa(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:00 +0000 (18:40 +0000)]
Document r331882, cm(4) and fpa(4) deprecation in FreeBSD 12.

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

6 years agoMFC r333229:
kib [Thu, 17 May 2018 17:40:06 +0000 (17:40 +0000)]
MFC r333229:
Add helper macros to hide some boring repeatable ceremonies to define
ifuncs on x86.

Approved by: re (marius)

6 years agoMFC r333079 (imp):
gjb [Thu, 17 May 2018 17:00:49 +0000 (17:00 +0000)]
MFC r333079 (imp):
 No need to make objects here.

 This fixes polluting the src checkout when building arm64/aarch64.

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

6 years agoMFC r333737:
manu [Thu, 17 May 2018 17:00:07 +0000 (17:00 +0000)]
MFC r333737:

release: arm: Format FAT partition as FAT16

r332674 raised the size of the FAT partition from 2MB to 41MB for some
boards. But we format them in FAT12 and this size appears to be to big
for FAT12 and some SoC bootrom cannot cope with that.
Format the msdosfs partition as FAT16,

PR:             228285
Approved by: re (marius)

6 years agoMFC r333499
sbruno [Thu, 17 May 2018 16:32:38 +0000 (16:32 +0000)]
MFC r333499

Add deprecation notice for vxge.

This driver was merged to HEAD one week prior to Exar publicly
announcing theyhad left the Ethernet market. It is not known to be used
and has various code quality issues spotted by Brooks and Hiren. Retire
it in preparation for FreeBSD 12.0.

Submitted by: kbowling
Reported by: rgrimes
Approved by: re (gjb)
Relnotes: yes

6 years agoDocument r333312, tzdata version 2018e.
gjb [Thu, 17 May 2018 15:53:46 +0000 (15:53 +0000)]
Document r333312, tzdata version 2018e.

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

6 years agoDocument r332929, pwd_mkdb(8) deprecation notice when legacy (-l)
gjb [Thu, 17 May 2018 15:53:45 +0000 (15:53 +0000)]
Document r332929, pwd_mkdb(8) deprecation notice when legacy (-l)
mode is used.

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

6 years agoDocument r332460, makefs(8) default block and fragment sizes
gjb [Thu, 17 May 2018 15:53:44 +0000 (15:53 +0000)]
Document r332460, makefs(8) default block and fragment sizes
synced with newfs(8).

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

6 years agoDocument r322753, mount(8) 'autoro' option addition.
gjb [Thu, 17 May 2018 15:53:44 +0000 (15:53 +0000)]
Document r322753, mount(8) 'autoro' option addition.

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

6 years agoDocument r333006, amd64 hybrid ISO images.
gjb [Thu, 17 May 2018 15:53:43 +0000 (15:53 +0000)]
Document r333006, amd64 hybrid ISO images.

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

6 years agoDocument r332947, etdump(1) utility addition.
gjb [Thu, 17 May 2018 15:53:42 +0000 (15:53 +0000)]
Document r332947, etdump(1) utility addition.

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

6 years agoDocument r328138, indent(1) supports the SIMPLE_BACKUP_SUFFIX
gjb [Thu, 17 May 2018 15:53:41 +0000 (15:53 +0000)]
Document r328138, indent(1) supports the SIMPLE_BACKUP_SUFFIX
environment variable also used by patch(1).

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

6 years agoDocument r322509, top(1) enhancement to filter on multiple user
gjb [Thu, 17 May 2018 15:53:40 +0000 (15:53 +0000)]
Document r322509, top(1) enhancement to filter on multiple user
names.

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

6 years agoDocument r327837, lint(1) is no longer built and installed by
gjb [Thu, 17 May 2018 15:53:39 +0000 (15:53 +0000)]
Document r327837, lint(1) is no longer built and installed by
default.

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

6 years agoBump copyright year.
gjb [Thu, 17 May 2018 15:53:37 +0000 (15:53 +0000)]
Bump copyright year.

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

6 years agoDocument r322555, various bsdgrep(1) pattern matching fixes.
gjb [Thu, 17 May 2018 15:53:36 +0000 (15:53 +0000)]
Document r322555, various bsdgrep(1) pattern matching fixes.

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

6 years agoDocument r322525, rgrep(1) hard link addition.
gjb [Thu, 17 May 2018 15:53:35 +0000 (15:53 +0000)]
Document r322525, rgrep(1) hard link addition.

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

6 years agoDocument r324124, getconf(1) '-a' flag addition.
gjb [Thu, 17 May 2018 15:53:34 +0000 (15:53 +0000)]
Document r324124, getconf(1) '-a' flag addition.

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

6 years agoDocument r328139, du(1) '--si' option.
gjb [Thu, 17 May 2018 15:53:33 +0000 (15:53 +0000)]
Document r328139, du(1) '--si' option.

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

6 years agoDocument r328495, dtc(1) update from upstream.
gjb [Thu, 17 May 2018 15:53:32 +0000 (15:53 +0000)]
Document r328495, dtc(1) update from upstream.

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

6 years agoDocument r331465, BSD-licensed diff(1) imported from OpenBSD.
gjb [Thu, 17 May 2018 15:53:31 +0000 (15:53 +0000)]
Document r331465, BSD-licensed diff(1) imported from OpenBSD.

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

6 years agoMFC r333228
kib [Thu, 17 May 2018 15:24:53 +0000 (15:24 +0000)]
MFC r333228
Implement support for ifuncs in the kernel linker on x86.

MFC r333411:
Avoid calls to bzero() before ireloc

Approved by: re (marius)

6 years agoMFC r333458:
ae [Thu, 17 May 2018 10:01:47 +0000 (10:01 +0000)]
MFC r333458:
  Fix the printing of rule comments.

  Change uint8_t type of opcode argument to int in the print_opcode()
  function. Use negative value to print the rest of opcodes, because
  zero value is O_NOP, and it can't be uses for this purpose.

  Reported by: lev
Approved by: re (gjb)

6 years agoMFC 332891,332892: Fixes for atomic_*cmpset() on arm.
jhb [Wed, 16 May 2018 21:04:19 +0000 (21:04 +0000)]
MFC 332891,332892: Fixes for atomic_*cmpset() on arm.

332891:
Fix some harmless type mismatches in the ARM atomic_cmpset implementations.

The return value of atomic_cmpset() and atomic_fcmpset() is an int (which
is really a bool) that has the values 0 or 1.  Some of the inlines were
using the type being operated on (e.g. uint32_t) as either the return type
of the function, or the type of a local 'ret' variable used to hold the
return value.  Fix all of these to just use plain 'int'.  Due to C promotion
rules and the fact that the value can only be 0 or 1, these should all be
harmless.

332892:
Implement 32-bit atomic_fcmpset() in userland for armv4/v5.

- Add an implementation of atomic_fcmpset_32() using RAS for armv4/v5.
  This fixes recent world breakage due to use of atomic_fcmpset() in
  userland.
- While here, be more careful to not expose wrapper macros for 64-bit
  atomic_*cmpset to userland for armv4/v5 as only 32-bit cmpset is
  implemented.

This has been reviewed, but not runtime-tested, but should fix the arm.arm
and arm.armeb worlds that have been broken for a while.

Approved by: re (kib)

6 years agoMFC r333436: only launch getty if underlying device exists
imp [Wed, 16 May 2018 13:18:37 +0000 (13:18 +0000)]
MFC r333436: only launch getty if underlying device exists

Note: pc98 isn't run under VM, so I didn't do a direct commit to it.

Approved by: re@ (gjb@)

6 years agoMFC r333404, r333405:
kib [Wed, 16 May 2018 11:06:39 +0000 (11:06 +0000)]
MFC r333404, r333405:
Remove PG_U from the recursive pte for kernel pmap' PML4 page
and from the rest of the kernel pmap ptes.

Approved by: re (marius)

6 years agoMFC r331340, r331342, r331472, r332050, r333276, r333448:
np [Tue, 15 May 2018 18:41:01 +0000 (18:41 +0000)]
MFC r331340, r331342, r331472, r332050, r333276, r333448:

r331340:
cxgbe(4): Tunnel congestion drops on a port should be cleared when the
stats for that port are cleared.

r331342:
cxgbe(4): Do not read MFG diags information from custom boards.

r331472:
cxgbe(4): Always initialize requested_speed to a valid value.

This fixes an avoidable EINVAL when the user tries to disable AN after
the port is initialized but l1cfg doesn't have a valid speed to use.

r332050:
cxgbe(4): Always display an error message if SIOCSIFFLAGS will leave
IFF_UP and IFF_DRV_RUNNING out of sync.  ifhwioctl in the kernel pays no
attention to the return code from the driver ioctl during SIOCSIFFLAGS
so these messages are the only indication that the ioctl was called but
failed.

r333276:
cxgbe(4): Update all firmwares to 1.19.1.0.

r333448:
cxgbe(4): Disable write-combined doorbells by default.

This had been the default behavior but was changed accidentally as part
of the recent iw_cxgbe+OFED overhaul.  Fix another bug in that change
while here: the global knob affects all the adapters in the system and
should be left alone by per-adapter code.

Approved by: re@ (marius@)
Sponsored by: Chelsio Communications

6 years agoMFC r333521:
kib [Tue, 15 May 2018 12:11:52 +0000 (12:11 +0000)]
MFC r333521:
PROC_PDEATHSIG_CTL will appear first in 11.2.

Approved by: re (marius)

6 years agoMFC r333244:
ae [Tue, 15 May 2018 11:43:05 +0000 (11:43 +0000)]
MFC r333244:
  Immediately propagate EACCES error code to application from tcp_output.

  In r309610 and r315514 the behavior of handling EACCES was changed, and
  tcp_output() now returns zero when EACCES happens. The reason of this
  change was a hesitation that applications that use TCP-MD5 will be
  affected by changes in project/ipsec.

  TCP-MD5 code returns EACCES when security assocition for given connection
  is not configured. But the same error code can return pfil(9), and this
  change has affected connections blocked by pfil(9). E.g. application
  doesn't return immediately when SYN segment is blocked, instead it waits
  when several tries will be failed.

  Actually, for TCP-MD5 application it doesn't matter will it get EACCES
  after first SYN, or after several tries. Security associtions must be
  configured before initiating TCP connection.

  I left the EACCES in the switch() to show that it has special handling.

  Reported by: Andreas Longwitz <longwitz at incore dot de>
Approved by: re (marius)

6 years agoMFC r333504:
kib [Tue, 15 May 2018 11:25:10 +0000 (11:25 +0000)]
MFC r333504:
Remove dead declaration.

Approved by: re (marius)

6 years agoHandle the difference between HEAD and stable/11 tests build.
kib [Tue, 15 May 2018 10:10:14 +0000 (10:10 +0000)]
Handle the difference between HEAD and stable/11 tests build.
This is a direct commit to stable/11.

PR: 228018, 228233
Tested by: Helge Oldach <freebsd@oldach.net>
Sponsored by: The FreeBSD Foundation
Approved by: re (marius)

6 years agoMFC r333362:
hselasky [Tue, 15 May 2018 09:40:52 +0000 (09:40 +0000)]
MFC r333362:
Fix for missing network interface address event when adding the default IPv6
based link-local address.

The default link local address for IPv6 is added as part of bringing the
network interface up. Move the call to "EVENTHANDLER_INVOKE(ifaddr_event,)"
from the SIOCAIFADDR_IN6 ioctl(2) handler to in6_notify_ifa() which should
catch all the cases of adding IPv6 based addresses to a network interface.
Add a witness warning in case the event handler is not allowed to sleep.

Approved by: re (marius)
Reviewed by: network (ae), kib
Differential Revision: https://reviews.freebsd.org/D13407
Sponsored by: Mellanox Technologies

6 years agoMFC r331906:
gonzo [Tue, 15 May 2018 02:26:50 +0000 (02:26 +0000)]
MFC r331906:

Approved by: re (gjb)

Fix accidental USB port resets by GPIO on Zynq/Zedboard boards

The Zynq/Zedboard GPIO driver attempts to tri-state all GPIO pins on
boot up but the order in which I reset the hardware can cause the pins
to be briefly held low before being tri-stated.  This is a problem on
boards that use GPIO pins to reset devices.

In particular, the Zybo and ZC-706 boards use a GPIO pin as a USB PHY
reset.  If U-boot enables the USB port before booting the kernel, the
GPIO driver attach causes a glitch on the USB PHY reset and the USB
port loses power.  My fix is to have the GPIO driver leave the pins in
whatever configuration U-boot placed them.

PR: 225713
Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>

6 years agoMFC SVN r329188,329334,329353,329914,329995-329996: DTrace Enhancements
dteske [Tue, 15 May 2018 00:00:44 +0000 (00:00 +0000)]
MFC SVN r329188,329334,329353,329914,329995-329996: DTrace Enhancements

r329188: Use tabs in io.d, fix alignment issues, remove extra newlines
r329334: Add errno definitions to /usr/lib/dtrace/errno.d
r329353: Add inline to errno.d for translating int to string
r329914: Updates and enhancements to io.d to aid DTrace scripting
r329995: Updates and enhancements to signal.d to aid DTrace scripting
r329996: Consistent casing for fallback SIGCHLD (s/Unknown/unknown/)

MFC SVN r330559-330560,330672,332865-332867,333513-333519: dwatch(1)

r330559: Introduce dwatch(1) as a tool for making DTrace more useful
r330560: Bump dwatch(1) internal version from 1.0-beta-91 to 1.0
r330672: Fix display of wrong pid from dtrace_sched(4)
r332865: Add `-dev' option to aid debugging of profiles
r332866: Add profile for send(2)/recv(2) syscalls
r332867: Remove the line used to demonstrate `-dev' option
r333513: Bugfix, usage displayed with `-1Q'
r333514: Separate default values so `-[BK] num' don't affect usage
r333515: Simplify info message test
r333516: Export ARGV to profiles loaded via load_profile()
r333517: Allow `-E code' to override profile EVENT_DETAILS
r333518: Expose process for ip/tcp/udp
r333519: Refactor sendrecv profile

Reviewed by: markj, gnn, bdrewery (head; earlier version)
Approved by: re (gjb)
Relnotes: yes
Sponsored by: Smule, Inc.
Differential Revision: https://reviews.freebsd.org/D15418

6 years agoMFC r332317, r332439, r332442
gonzo [Mon, 14 May 2018 23:12:30 +0000 (23:12 +0000)]
MFC r332317, r332439, r332442

Approved by: re

r332317:
[man] Fix return type of BUS_ADD_CHILD(9)

Fix return type of BUS_ADD_CHILD(9) in SYNOPSYS section,
it should be device_t, not int

PR: 207389

r332439:
Fix quotes in the example code in syslog(3) BUGS section

mdoc treats verbatim quotes in .Dl as a string delimiter and does
not pass them to the rendered output. Use special char \*q to specify
double quote

PR: 216755

r332442:
Bump .Dd value (forgot to do this in r332439)

6 years agoMFC r303848
sbruno [Mon, 14 May 2018 22:56:41 +0000 (22:56 +0000)]
MFC r303848

Repair trivial panic in ng_uncallout.  Fixes bugzilla #211031

PR: 211031
Approved by: re (gjb)

6 years agoMFC r333239:
pfg [Mon, 14 May 2018 19:20:37 +0000 (19:20 +0000)]
MFC r333239:
msdosfs: long names of files are created incorrectly.

This fixes a regression that happened in r120492 (2003) where libkiconv
was introduced and we went from checking unlen to checking for '\0'.

PR: 111843
Patch by: Damjan Jovanovic
Approved by: re (gjb)

6 years agoMFC r333473:
gjb [Mon, 14 May 2018 17:43:43 +0000 (17:43 +0000)]
MFC r333473:
 Add a special GCE_LICENSE variable to Makefile.gce, which when set,
 will include license metadata in the resultant GCE image.

 GCE_LICENSE is unset by default, as it primarily pertains to images
 produced by the FreeBSD Project, but for downstream FreeBSD consumers,
 it can be set in the make(1) environment in the format of:

   --licenses="projects/PROJECT_ID/global/licenses/LICENSE_NAME"

 The "license" is not a license, per se, but required metadata that
 is required by the GCE marketplace.  For the FreeBSD Project, the
 license name is simply 'freebsd', with the description of 'FreeBSD'.

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

6 years agoMFC r333493:
trasz [Mon, 14 May 2018 15:35:54 +0000 (15:35 +0000)]
MFC r333493:

Set kldxref_enable="YES" for ARM images. Without it, the images are missing
the /boot/kernel/linker.hints file, which breaks loading some of the modules
with dependencies, eg cfiscsi.ko.

This is a minimal fix for ARM images, in order to safely MFC it before
11.2-RELEASE.  Afterwards, however, I believe we should actually just change
the default (as in, etc/defaults/rc.conf).  The reason is that it's required
for every image that's being cross-built, as kldxref(1) cannot handle files
for non-native architectures.  For the one that is not - amd64 - having it
on by default doesn't change anything - the script is noop if the linker.hints
already exists.

The long-term solution would be to rewrite kldxref(1) to handle other
architectures, and generate linker.hints at build time.

Approved by: re (marius@)
Sponsored by: DARPA, AFRL

6 years agoMFC r333460:
kib [Sun, 13 May 2018 17:44:26 +0000 (17:44 +0000)]
MFC r333460:
Add the test program to examine CPU behaviour for pop ss issue
CVE-2018-8897.

Approved by: re (marius)

6 years agoMFC r332504:
kib [Sat, 12 May 2018 11:40:34 +0000 (11:40 +0000)]
MFC r332504:
Set PG_G global mapping bit on the trampoline ptes.

Approved by: re (marius)

6 years agoMFC r332450:
kib [Sat, 12 May 2018 11:18:14 +0000 (11:18 +0000)]
MFC r332450:
Optimize context switch for PTI on PCID pmap.

Approved by: re (marius)

6 years agor285910 attempted to make shutdown() be POSIX compliant by returning
jtl [Sat, 12 May 2018 01:55:24 +0000 (01:55 +0000)]
r285910 attempted to make shutdown() be POSIX compliant by returning
ENOTCONN when shutdown() is called on unconnected sockets.  This change was
slightly modified by r316874, which returns ENOTCONN in the case of an
unconnected datagram socket, but still runs the shutdown code for the
socket.  This specifically supports the case where the user-space code is
using the shutdown() call to wakeup another thread blocked on the socket.

In PR 227259, a user is reporting that they have code which is using
shutdown() to wakup another thread blocked on a stream listen socket.  This
code is failing, while it used to work on FreeBSD 10 and still works on
Linux.

It seems reasonable to add another exception to support something users are
actually doing, which used to work on FreeBSD 10, and still works on Linux.
And, it seems like it should be acceptable to POSIX, as we still return
ENOTCONN.

This is a direct commit to stable/11.  The listen socket code changed
substantially in head, and the code change there will be substantially
more complex.  In the meantime, it seems to make sense to commit this
trivial fix to stable/11 given the fact that users appear to depend on
this behavior, this appears to have been an unintended change in stable/11,
and we did not announce the change.

PR: 227259
Reviewed by: ed
Approved by: re (gjb)
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D15021
Tested by: Eric Masson (emss at free.fr)

6 years agoCreate a sun7i-a20-bananapi.dtb hard link to bananapi.dtb to fix
gjb [Fri, 11 May 2018 21:46:53 +0000 (21:46 +0000)]
Create a sun7i-a20-bananapi.dtb hard link to bananapi.dtb to fix
a boot failure on the Banana Pi SoC.

This is a direct commit to stable/11, as the sun7i-a20-bananapi.dtb
file exists in head, but appears to have been part of a larger
rework of dtb-related files that may have larger consequences than
hard link creation.  Note: creating a hard link to dtb files was
an original fix in 12-CURRENT beforehand, introduced in r319603.

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

6 years agoMFC r333329, r333366, r333373
shurd [Fri, 11 May 2018 20:40:26 +0000 (20:40 +0000)]
MFC r333329, r333366, r333373

r333329: Fix off-by-one error requesting tx interrupt
r333366: Cleanup queues when iflib_device_register fails
r333373: Log iflib_tx_structures_setup failure in function

Approved by: re (gjb@)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15354

6 years agoRename stable/11 from PRERELEASE to BETA1 as part of the 11.2-RELEASE
gjb [Thu, 10 May 2018 23:58:33 +0000 (23:58 +0000)]
Rename stable/11 from PRERELEASE to BETA1 as part of the 11.2-RELEASE
cycle.

Update the default pkg(8) repository to the 'quarterly' branch to
prevent further 11.2 builds from downgrading packages when invoking
'pkg upgrade' for the duration of the cycle.

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

6 years agoMFC r333003
davidcs [Wed, 9 May 2018 19:52:33 +0000 (19:52 +0000)]
MFC r333003
Upgraded FW Related Files to version 5.4.67

Approved by:re(gjb)

6 years agoMFC r333019 r333046 r333085 r333086 r333132
sbruno [Wed, 9 May 2018 16:14:12 +0000 (16:14 +0000)]
MFC r333019 r333046 r333085 r333086 r333132

smartpqi(4):
- Microsemi SCSI driver for PQI controllers.
- Found on newer model HP servers.
- Restrict to AMD64 only as per developer request.

The driver provides support for the new generation of PQI controllers
from Microsemi. This driver is the first SCSI driver to implement the
PQI queuing model and it will replace the aacraid driver for Adaptec
Series 9 controllers.  HARDWARE Controllers supported by the driver include:

    HPE Gen10 Smart Array Controller Family
    OEM Controllers based on the Microsemi Chipset.

Approved by: re (gjb@)
Relnotes: yes

6 years agoMFC r333158:
mav [Wed, 9 May 2018 15:22:40 +0000 (15:22 +0000)]
MFC r333158:
Clean enclosure_table when resetting num_enc_table_entries to zero.

Garbage left there by r325363 in some scenarios found to lead to later
enclosure mapping failures.

Approved by: re@ (gjb)
Sponsored by: iXsystems, Inc.

6 years agoMFC r332966: Add deprecation notice for lmc(4)
emaste [Wed, 9 May 2018 14:50:32 +0000 (14:50 +0000)]
MFC r332966: Add deprecation notice for lmc(4)

We intend to remove support before FreeBSD 12 is branched.  These are
available only as 32-bit PCI devices.  The driver has an ambiguous
license and I have not been successful in contacting the driver's author
in order to address this.

The planned deprecation has been announced on -current and -stable; if
we receive feedback that the driver is still useful and we are able to
resolve the license issue this deprecation notice can be reverted.

Relnotes: Yes
Approved by: re
Sponsored by: The FreeBSD Foundation

6 years agoMFC r332446: switch i386 memstick installer images to MBR
emaste [Wed, 9 May 2018 14:38:07 +0000 (14:38 +0000)]
MFC r332446: switch i386 memstick installer images to MBR

Some BIOSes have trouble booting from GPT in non-UEFI mode.  This is
commonly reported with Lenovo laptops, including my x220.  As we do not
currently support booting FreeBSD/i386 via UEFI there's no reason to
prefer GPT.

The "vestigial swap partition" was added in r265017 to work around an
issue with loader's GPT support, so we should not need it when using
MBR.

We may want to make the same change to amd64, although the issue there is
mitigated by such systems booting via UEFI in the common case.

PR: 227422
Approved by: re
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

6 years agoMFC r333182:
kib [Wed, 9 May 2018 11:47:05 +0000 (11:47 +0000)]
MFC r333182:
mlx5en: Always allow VLAN id 0.

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

6 years agoBelatedly bump copyright year.
gjb [Tue, 8 May 2018 18:03:08 +0000 (18:03 +0000)]
Belatedly bump copyright year.

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

6 years agoDocument EN-18:05, EN-18:06, SA-18:06.
gjb [Tue, 8 May 2018 17:59:25 +0000 (17:59 +0000)]
Document EN-18:05, EN-18:06, SA-18:06.

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

6 years agoMFC r333368: Prepare DB# handler for deferred trigger of watchpoints.
emaste [Tue, 8 May 2018 17:03:33 +0000 (17:03 +0000)]
MFC r333368: Prepare DB# handler for deferred trigger of watchpoints.

Prepare DB# handler for deferred trigger of watchpoints.

Since pop %ss/mov %ss instructions defer all interrupts and exceptions
for the next instruction, it is possible that the userspace watchpoint
trap executes on the first instruction of the kernel entry for
syscall/bpt.

In this case, DB# should be treated similarly to NMI: on amd64 we must
always load GSBASE even if the trap comes from kernel mode, and load
the kernel page table root into %cr3.  Moreover, the trap must
use the dedicated stack, because we are still on the user stack when
trapped on syscall entry.

For i386, we must reload %cr3.  The syscall instruction is not configured,
so there is no issue with executing on user stack when trapping.

Due to some CPU erratas it is not always possible to detect that the
userspace watchpoint triggered by inspecting %dr6.  In trap(), compare the
trap %rip with the known unsafe entry points and if matched pretend that
the watchpoint did not fire at all.

Thank you to the MSRC Incident Response Team, and in particular Greg
Lenti and Nate Warfield, for coordinating the response to this issue
across multiple vendors.

Thanks to Computer Recycling at The Working Center of Kitchener for
making hardware available to allow us to test the patch on additional
CPU families.

Reviewed by: jhb
Discussed with: Matthew Dillon
Tested by: emaste
Approved by: re (so blanket)
Security: CVE-2018-8897
Security: FreeBSD-SA-18:06.debugreg
Sponsored by: The FreeBSD Foundation

6 years agoMFC r333210
sbruno [Tue, 8 May 2018 16:56:14 +0000 (16:56 +0000)]
MFC r333210

Deprecation notice for nxge(4).  This driver will not appear
in FreeBSD 12 or later.

Approved by: re (gjb@)
Relnotes: yes

6 years agoMFC: r308728, r314369, r315243, r316026, r316581, r316616, r318359,
shurd [Tue, 8 May 2018 15:51:40 +0000 (15:51 +0000)]
MFC: r308728, r314369, r315243, r316026, r316581, r316616, r318359,
r319922, r319990, r321481, r323232-323233, r323321, r323874, r323955,
r324323, r324964, r325169, r325488, r325620, r326985, r326999-327001,
r327003, r329335

Update bnxt to latest -CURRENT.

Approved by: re (gjb@)
Differential Revision: https://reviews.freebsd.org/D15143

6 years agoMFC r333125:
kib [Tue, 8 May 2018 10:56:06 +0000 (10:56 +0000)]
MFC r333125:
Turn off IBRS on suspend.

Approved by: re (marius)

6 years agoMFC r333091:
kib [Tue, 8 May 2018 10:18:24 +0000 (10:18 +0000)]
MFC r333091:
Eliminate some vm object relocks in vm fault.

Approved by: re (marius)

6 years agoMFC r333208:
kib [Tue, 8 May 2018 10:03:32 +0000 (10:03 +0000)]
MFC r333208:
Style.

Approved by: re (marius)

6 years agoMFC r332877: Correct size for allocation and bzero of fdsr.
delphij [Tue, 8 May 2018 05:10:06 +0000 (05:10 +0000)]
MFC r332877: Correct size for allocation and bzero of fdsr.

Approved by: re (gjb)

6 years agoMFC r333149: ixl(4): Update to 1.9.9-k
erj [Mon, 7 May 2018 23:23:11 +0000 (23:23 +0000)]
MFC r333149: ixl(4): Update to 1.9.9-k

Major changes:

- Support for descriptor writeback mode (required by ixlv(4) for AVF support)
- Ability to disable firmware LLDP agent by user
- Fix for TX queue hang when using TSO
- Separate descriptor ring sizes for TX and RX rings

Approved by: re (marius)
Relnotes: yes
Sponsored by: Intel Corporation

6 years agoMFC r333253-r333254
shurd [Mon, 7 May 2018 23:10:02 +0000 (23:10 +0000)]
MFC r333253-r333254

Fixes invalid free()s when iflib_queues_alloc() fails, and remove unused
brscp variable.

Approved by: re (gjb@)

6 years agoDirect commit to stable/11 to fix botched r333338
shurd [Mon, 7 May 2018 22:33:40 +0000 (22:33 +0000)]
Direct commit to stable/11 to fix botched r333338

netmap nm_intr is not part of stable/11

Approved by: re (marius@)
Sponsored by: Limelight Networks

6 years agoMerge iflib changes to 11-STABLE
shurd [Mon, 7 May 2018 21:42:22 +0000 (21:42 +0000)]
Merge iflib changes to 11-STABLE

MFC r300147, r300153, r300154, r300215, r301563, r301567,
r302372, r307560, r307562, r307563, r307568, r308792, r311039,
r311837, r312755, r312903, r312905, r312924, r313248, r315217,
r315245, r315288, r316278, r316281, r316502, r316596, r317756,
r319917, r319921, r319984, r319989, r320059, r320609, r320611,
r321253, r321629, r321630, r322337, r322338, r322823, r323077,
r323825, r323876, r323879, r323887, r323941, r323942, r323943,
r323944, r323954, r324038, r324318, r324937, r325166, r325167,
r325168, r325201, r325241, r325245, r325487, r325494, r325901,
r326033, r326369, r326370, r326432, r326577, r326578, r326702,
r326706, r326775, r327013, r327017, r327052, r327072, r327098,
r327242, r327244, r327247, r329651, r329742, r330289, r330715,
r330721, r332419, r332422, r332729

Reviewed by: sbruno
Approved by: re (delphij@)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15142

6 years agoMFC r326571: ifconfig(8): Display extended compliance code string for SFP transceivers
erj [Mon, 7 May 2018 21:26:05 +0000 (21:26 +0000)]
MFC r326571:  ifconfig(8): Display extended compliance code string for SFP transceivers

Approved by: re (marius, gjb)

6 years agoMFC r319797, r320972:
erj [Mon, 7 May 2018 20:41:24 +0000 (20:41 +0000)]
MFC r319797, r320972:

r319797:
ixl(4)/ixlv(4): Fix some busdma tags and improper map NULL.

r320972:
ixl(4)/ixlv(4): Stop leaking every busdma entry in receive path

Approved by: re (marius)

6 years agoMFC r333262, r333264:
gjb [Mon, 7 May 2018 16:21:53 +0000 (16:21 +0000)]
MFC r333262, r333264:

 r333262:
  Ensure the ports and src trees are available on GCE images,
  satisfying a requirement to allow FreeBSD to be considered
  a top-tier supported OS in Google Compute Engine.

 r333264:
  Fix a typo.

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

6 years agoMFC r333108:
hselasky [Mon, 7 May 2018 15:07:26 +0000 (15:07 +0000)]
MFC r333108:
Define USEC_PER_MSEC and USEC_PER_SEC in the LinuxKPI.

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

6 years agoMFC r333247: Import tzdata 2018e
philip [Mon, 7 May 2018 06:58:19 +0000 (06:58 +0000)]
MFC r333247: Import tzdata 2018e

North Korea switches back to +09 on 2018-05-05.

This version more correctly models time stamps in time zones with
negative DST such as Europe/Dublin (from 1971 on), Europe/Prague
(1946/7), and Africa/Windhoek (1994/2017).  This does not affect the
UT offsets, only time zone abbreviations and the tm_isdst flag.

Approved by: re (kib)