]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoUpgrade to OpenSSH 7.5p1.
des [Fri, 4 Aug 2017 12:57:24 +0000 (12:57 +0000)]
Upgrade to OpenSSH 7.5p1.

6 years agoRead the numa-node-id property from each CPU node. This will initially be
andrew [Fri, 4 Aug 2017 10:33:22 +0000 (10:33 +0000)]
Read the numa-node-id property from each CPU node. This will initially be
used to support the dual package ThunderX where we need to send MSI/MSI-X
interrupts to the same package as the device the interrupt came from.

Sponsored by: DARPA, AFRL

6 years agoRelax visibility for some termios symbols.
kib [Fri, 4 Aug 2017 09:45:40 +0000 (09:45 +0000)]
Relax visibility for some termios symbols.

They are defined by XSI or newer SUS.
This is a follow-up to r318780.

Reported by: jbeich
Obtained from: DragonflyBSD commit e08b3836c962
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoDocument usb verbosity levels
brd [Fri, 4 Aug 2017 08:56:31 +0000 (08:56 +0000)]
Document usb verbosity levels

Submitted by: Tom Jones <jones@sdf.org>
Approved by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11850

6 years agoIn case readers are misled by expressions that combine multiplication and
alc [Fri, 4 Aug 2017 04:23:23 +0000 (04:23 +0000)]
In case readers are misled by expressions that combine multiplication and
division, add parentheses to make the precedence explicit.

Submitted by: Doug Moore <dougm@rice.edu>
Requested by: imp
Reviewed by: imp
MFC after: 1 week
X-MFC after: r321840
Differential Revision: https://reviews.freebsd.org/D11815

6 years agoAdd EFI utility functions to libefi
imp [Fri, 4 Aug 2017 04:20:11 +0000 (04:20 +0000)]
Add EFI utility functions to libefi

This patch adds additional EFI utility functions to convert errno
values to EFI_STATUS errors, as well as EFI times to UNIX times.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11858

6 years agoMove EFI ZFS functions to libefi
imp [Fri, 4 Aug 2017 04:20:06 +0000 (04:20 +0000)]
Move EFI ZFS functions to libefi

This patch moves some EFI ZFS functions from loader to libefi,
allowing them to be used by anything that links against libefi.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11855

6 years agoAdd definitions and utilities for EFI drivers
imp [Fri, 4 Aug 2017 04:16:41 +0000 (04:16 +0000)]
Add definitions and utilities for EFI drivers

This patch adds definitions and utility code for creating EFI drivers
using the EFI_DRIVER_BINDING_PROTOCOL.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11852

6 years agoAdd stpcpy and stpncpy to libstand
imp [Fri, 4 Aug 2017 03:48:17 +0000 (03:48 +0000)]
Add stpcpy and stpncpy to libstand

This adds the stpcpy and stpncpy functions to libstand.

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

6 years agoMake nvd vs nda choice boot-time rather than build-time
imp [Fri, 4 Aug 2017 03:40:01 +0000 (03:40 +0000)]
Make nvd vs nda choice boot-time rather than build-time

Introduce hw.nvme.use_nvd tunable. This tunable allows both nvd and
nda to be installed in the kernel, while allowing only one of them to
create devices. This is an all-or-nothing setting, and you can't
change it after boot-time. However, it will allow easier A/B testing.

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

6 years agoAdd myself.
alc [Fri, 4 Aug 2017 03:20:01 +0000 (03:20 +0000)]
Add myself.

6 years agocxgbe(4): Always use the first and not the last virtual interface
np [Fri, 4 Aug 2017 01:28:06 +0000 (01:28 +0000)]
cxgbe(4): Always use the first and not the last virtual interface
associated with a port in begin_synchronized_op.

MFC after: 3 days
Sponsored by: Chelsio Communications

6 years agoFix procstat --libxo -L.
markj [Thu, 3 Aug 2017 22:41:34 +0000 (22:41 +0000)]
Fix procstat --libxo -L.

- Use the title role for column headers.
- Fix a typo in a field name (lpwid -> lwpid).
- Place the fields of different threads in separate containers.

6 years agox86: Tag some intrinsics with __pure2
cem [Thu, 3 Aug 2017 22:28:30 +0000 (22:28 +0000)]
x86: Tag some intrinsics with __pure2

Some C wrappers for x86 instructions do not touch global memory and only act
on their arguments; they can be marked __pure2, aka __const__.  Without this
annotation, Clang 3.9.1 is not intelligent enough on its own to grok that
these functions are __const__.

Submitted by: Anton Rang <anton.rang AT isilon.com>
Sponsored by: Dell EMC Isilon

6 years agoRemove deprecation notice for ruptime/rwho/rwhod.
jlh [Thu, 3 Aug 2017 21:37:57 +0000 (21:37 +0000)]
Remove deprecation notice for ruptime/rwho/rwhod.

PR: 220953
Reported by: peter

6 years agoBump the maximum file name length in pseudofs filesystems to 48.
markj [Thu, 3 Aug 2017 21:35:53 +0000 (21:35 +0000)]
Bump the maximum file name length in pseudofs filesystems to 48.

The previous limit of 24 was somewhat restrictive, and with this change
ceil(log2(sizeof(struct pfs_node))) is the same as before in both the ILP32
and LP64 models, so the malloc zone used for allocations of struct pfs_node
is the same as before.

Approved by: des

6 years agorwho/ruptime/rwhod shouldn't be gated by RCMDS.
jlh [Thu, 3 Aug 2017 21:30:12 +0000 (21:30 +0000)]
rwho/ruptime/rwhod shouldn't be gated by RCMDS.

PR: 220953
Reported by: peter@
Differential Revision: https://reviews.freebsd.org/D11743

6 years agoAdd subsystem vendor and device ID fields to struct pci_dev.
markj [Thu, 3 Aug 2017 21:14:46 +0000 (21:14 +0000)]
Add subsystem vendor and device ID fields to struct pci_dev.

MFC after: 1 week

6 years agoarm: Add a GENERIC-NODEBUG kernel config
manu [Thu, 3 Aug 2017 19:01:46 +0000 (19:01 +0000)]
arm: Add a GENERIC-NODEBUG kernel config

Like amd64 or arm64 provide a GENERIC-NODEBUG configuration file that
remove WITNESS and INVARIANTS etc ...

6 years agoAdd missing header file to SRCS.
ian [Thu, 3 Aug 2017 18:49:15 +0000 (18:49 +0000)]
Add missing header file to SRCS.

Reported by: manu@

6 years agoSwitch to iicdev_readfrom/writeto() to do xfers with proper bus ownership.
ian [Thu, 3 Aug 2017 18:43:54 +0000 (18:43 +0000)]
Switch to iicdev_readfrom/writeto() to do xfers with proper bus ownership.

Tested by: manu@

6 years agoRemove special-case logic for running tests on host machines
ngie [Thu, 3 Aug 2017 17:53:14 +0000 (17:53 +0000)]
Remove special-case logic for running tests on host machines

I'm not sure what process sjg@ was using, but using CHECKDIR=${.OBJDIR} with
"make check" on ^/head is the correct thing to do. This unbreaks "make check"
for me (unsandboxed, not using CHECKDIR=${.OBJDIR}).

While here, fix a whitespace nit with LIBADD.

MFC after: 1 week

6 years agoUpdate from libxo-0.8.1 to 0.8.4:
phil [Thu, 3 Aug 2017 15:47:42 +0000 (15:47 +0000)]
Update from libxo-0.8.1 to 0.8.4:
  0.8.4:
    - void anchor width optimization when we have a custom formatter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221130)
    - make "{[:/18}" do the right thing (also allows "{[:/%s}", wide ? 40 : 10)
    - Can't skip anchor formatting in non-display styles
    - add test case for {[:/18}
    - add upload-xohtml-files to 'make upload'
  0.8.3:
    - xohtml: Add "-w" option to pull support files from gh_pages
    - Add "upload-xohtml-files" target to publish support files in gh_pages/
    - add HISTORY/AUTHORS section to man pages
  0.8.2:
    - xohtml: Add div.units as standard CSS text
    - Don't treat values as format strings; they are not
    - add "-p" to "mkdir -p build" in setup.sh
    - add test case for {U:%%} (from df.c)
    - detect end-of-string in '%' and '' escaping
    - make xo_simple_field, for common simple cases
    - xohtml: nuke "n" in "echo" commands
    - rename "format" to "fmt" for consistency; same for "str" to "value"

Submitted by: phil

6 years agoOracle T10000 tape drives use PRML encoding.
ken [Thu, 3 Aug 2017 15:04:54 +0000 (15:04 +0000)]
Oracle T10000 tape drives use PRML encoding.

Source:   Oracle T10000 SCSI reference guide.
MFC after: 3 days
Sponsored by: Spectra Logic

6 years agoAdd an ahci driver for imx6.
ian [Thu, 3 Aug 2017 14:43:41 +0000 (14:43 +0000)]
Add an ahci driver for imx6.

This was submitted by Rogiel Sulzbach (thank you!) but has a few last-minute
changes by me, mostly where the code interfaces to my still-utterly-deficient
imx6_ccm clocks implementation.  So blame me for any mistakes.

Submitted by: Rogiel Sulzbach <rogiel@rogiel.com>
Differential Revision: https://reviews.freebsd.org/D11177

6 years agocxgbe(4): Initial import of the "collect" component of Chelsio unified
np [Thu, 3 Aug 2017 14:43:30 +0000 (14:43 +0000)]
cxgbe(4): Initial import of the "collect" component of Chelsio unified
debug (cudbg) code, hooked up to the main driver via an ioctl.

The ioctl can be used to collect the chip's internal state in a
compressed dump file.  These dumps can be decoded with the "view"
component of cudbg.

Obtained from: Chelsio Communications
MFC after: 2 months
Sponsored by: Chelsio Communications

6 years agoDocument -w flag is an extension to POSIX.
sevan [Thu, 3 Aug 2017 14:35:02 +0000 (14:35 +0000)]
Document -w flag is an extension to POSIX.

PR: 201937
Submitted by: <fullermd AT over-yonder DOT net>
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D11842

6 years agoRevert r321969
ngie [Thu, 3 Aug 2017 13:50:46 +0000 (13:50 +0000)]
Revert r321969

My change had good intentions, but the implementation was incorrect:
- printf was returning the number of characters in the format string
  plus the NUL, but failed in two regards implementation wise:
-- the pathological case, printf(""), wasn't being handled properly since
   the pointer is always incremented, so the value returned would be
   off-by-one.
-- printf(3) reports the number of characters printed post-conversion via
   vfprintf, etc.
- putchar(3) should return the character printed or EOF, not the number
  of characters output to the screen.

My goal in making the change (again) was to increase parity, but as bde
pointed out these are freestanding functions, so they don't have to
conform to libc/POSIX. I argued that the functions should be named
differently since the implementation is different enough to warrant it
and to allow boot2 code to be usable when linked against sys/boot and
libstand and other libraries in base. I have no interest in pushing
this change forward more though, as the original concern I had behind
the change with zfsboottest was resolved in r321849 and r321852. The
next person that updates the toolchain gets to deal with the
inconsistency if it's flagged by a newer compiler.

MFC after: 1 month
Reported by: ed, markj

6 years agoAdd myself to the calendar.freebsd.
loos [Thu, 3 Aug 2017 13:26:51 +0000 (13:26 +0000)]
Add myself to the calendar.freebsd.

Reported by: mckusick

6 years agoVendor import of OpenSSH 7.5p1.
des [Thu, 3 Aug 2017 10:10:20 +0000 (10:10 +0000)]
Vendor import of OpenSSH 7.5p1.

6 years agoChange reject message type when destroying cm_id in ibore.
hselasky [Thu, 3 Aug 2017 09:31:10 +0000 (09:31 +0000)]
Change reject message type when destroying cm_id in ibore.

This patch fixes an interopability issue between FreeBSD and non-FreeBSD
systems when the connection establishment is aborted. Refer to the
initial commit in Linux, drivers/infiniband/core/cm.c,
for a more detailed description.

Obtained from: Linux
MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoTicks are 32-bit in FreeBSD.
hselasky [Thu, 3 Aug 2017 09:18:25 +0000 (09:18 +0000)]
Ticks are 32-bit in FreeBSD.

MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoResolve locking issue for non-sleepable context in the mlx5core.
hselasky [Thu, 3 Aug 2017 09:14:43 +0000 (09:14 +0000)]
Resolve locking issue for non-sleepable context in the mlx5core.

Code inspection reveals the busdma unload and free functions
do not write to the belonging dma tag and does not need to be
serialized. This allows mlx5_fwp_free() to be called from
software interrupt context.

MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoUsing GFP_ATOMIC with firmware commands is not supported after busdma was
hselasky [Thu, 3 Aug 2017 09:11:51 +0000 (09:11 +0000)]
Using GFP_ATOMIC with firmware commands is not supported after busdma was
introduced in the mlx5core, because busdma might sleep when loading memory
into DMA.

MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agoAdd myself to the calendar.
hselasky [Thu, 3 Aug 2017 08:03:22 +0000 (08:03 +0000)]
Add myself to the calendar.

Requested by: mckusick

6 years agoUpdate the entry for postmaster@
remko [Thu, 3 Aug 2017 07:42:08 +0000 (07:42 +0000)]
Update the entry for postmaster@

Reviewed by: dhw

6 years agoAdd entry to the calendar
ak [Thu, 3 Aug 2017 07:00:55 +0000 (07:00 +0000)]
Add entry to the calendar

Requested by: mckusick

6 years agoRemove D_TRACKCLOSE now that ksyms no longer has a close method.
markj [Thu, 3 Aug 2017 05:55:01 +0000 (05:55 +0000)]
Remove D_TRACKCLOSE now that ksyms no longer has a close method.

Reported by: jhb
X-MFC with: r321963

6 years agoFix the return types for printf and putchar to match their libc and
ngie [Thu, 3 Aug 2017 05:27:05 +0000 (05:27 +0000)]
Fix the return types for printf and putchar to match their libc and
POSIX equivalents

Both printf and putchar return int, not void.

This will allow code that leverages the libcalls and checks/rely on the
return type to interchangeably between loader code and non-loader
code.

MFC after: 1 month

6 years agoChase r321920 and r321930 (dev_t being widened)
ngie [Thu, 3 Aug 2017 03:43:41 +0000 (03:43 +0000)]
Chase r321920 and r321930 (dev_t being widened)

The layout of st_rdev has changed after this commit, and assumptions made
in the NetBSD tests are no longer valid. Change the hardcoded assumed
values to account for the fact that major/minor are now represented by
64 bits as opposed to the less precise legacy precision of 16 bits.

PR: 221048
Relnotes: st_rdev layout changed; warning about impact of r321920 to
  downstream consumers

6 years agoAdded entry as requested by Kirk.
rmacklem [Thu, 3 Aug 2017 02:08:01 +0000 (02:08 +0000)]
Added entry as requested by Kirk.

6 years agohyperv/kvp: Use proper size macro for adapter id.
sephe [Thu, 3 Aug 2017 01:44:40 +0000 (01:44 +0000)]
hyperv/kvp: Use proper size macro for adapter id.

Submitted by: Christopher Ertl <Christopher.Ertl microsoft com>
MFC after: 3 days
Sponsored by: Microsoft

6 years agoRework and simplify the ksyms(4) implementation.
markj [Thu, 3 Aug 2017 00:38:13 +0000 (00:38 +0000)]
Rework and simplify the ksyms(4) implementation.

- Store the symbol table contents in an anonymous swap-backed object. Have
  mmap(/dev/ksyms) map that object, and stop mapping the symbol table into
  the calling process in ksyms_open(). Previously we would cache a pointer
  to the pmap of the opening process, and mmap(/dev/ksyms) would create a
  mapping using the physical address found by a pmap lookup at the initial
  mapping address. However, this assumes that the cached pmap is valid,
  which may not be the case. [1]
- Remove the ksyms ioctl interface. It appears to have been added to work
  around a limitation in libelf that no longer exists; see r321842.
  Moreover, the interface is difficult to support and isn't present in
  illumos. Since ksyms was added specifically to support lockstat(1), it
  is expected that this removal won't have any real impact.
- Simplify ksyms_read() to avoid unnecessary copying.
- Don't call the device handle destructor if we fail to capture a snapshot
  of the kernel's symbol table. devfs will do that for us.

Reported by: Ilja van Sprundel <ivansprundel@ioactive.com> [1]
Reviewed by: kib (previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11789

6 years agoAnnotate tests that require root privileges appropriately
ngie [Wed, 2 Aug 2017 22:19:45 +0000 (22:19 +0000)]
Annotate tests that require root privileges appropriately

This unbreaks running the tests with unprivileged users.

MFC after: 1 week

6 years agoDelete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"
ngie [Wed, 2 Aug 2017 21:49:37 +0000 (21:49 +0000)]
Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"

src.conf(5) should document which knobs are which and the dependency between each;
remove the comment so the variable can apply to non-"meta mode options".

MFC after: 2 weeks

6 years agoRegenerate src.conf(5) per change made in r321952
ngie [Wed, 2 Aug 2017 21:40:51 +0000 (21:40 +0000)]
Regenerate src.conf(5) per change made in r321952

6 years agoAllowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
ngie [Wed, 2 Aug 2017 21:38:15 +0000 (21:38 +0000)]
Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

MFC after: 1 month

6 years agoSome minor doc fixups
ngie [Wed, 2 Aug 2017 21:31:46 +0000 (21:31 +0000)]
Some minor doc fixups

- Tweak a sentence by placing the modifier before an adjective to make it flow
  better.
- Fix a typo.

MFC after: 3 days

6 years agoAlways use first parameter passed to get_filesystem(..) instead of discarding it
ngie [Wed, 2 Aug 2017 21:20:49 +0000 (21:20 +0000)]
Always use first parameter passed to get_filesystem(..) instead of discarding it
and using `.` instead.

MFC after: 1 week
MFC with: r321949
PR: 221189 [1], 221188 [2]

6 years agoAdd expected failures for ZFS
ngie [Wed, 2 Aug 2017 21:18:54 +0000 (21:18 +0000)]
Add expected failures for ZFS

- :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
- :v_flag fails on ZFS because the mode for foo is [always] updated
  unnecessarily.

get_filesystem(..) (supporting function that was added to the test script)
is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

MFC after: 1 week
PR: 221189 [1], 221188 [2]

6 years ago- Correct the remainder of confusing and error prone mix-ups between
marius [Wed, 2 Aug 2017 21:11:51 +0000 (21:11 +0000)]
- Correct the remainder of confusing and error prone mix-ups between
  "br" or "bridge" where - according to the terminology outlined in
  comments of bridge.h and mmcbr_if.m  around since their addition in
  r163516 - the bus is meant and used instead. Some of these instances
  are also rather old, while those in e. g. mmc_subr.c are as new as
  r315430 and were caused by choosing mmc_wait_for_request(), i. e. the
  one pre-r315430 outliner existing in mmc.c, as template for function
  parameters in mmc_subr.c inadvertently. This correction translates to
  renaming "brdev" to "busdev" and "mmcbr" to "mmcbus" respectively as
  appropriate.
  While at it, also rename "reqdev" to just "dev" in mmc_subr.[c,h]
  for consistency with was already used in mmm.c pre-r315430, again
  modulo mmc_wait_for_request() that is.
- Remove comment lines from bridge.h incorrectly suggesting that there
  would be a MMC bridge base class driver.
- Update comments in bridge.h regarding the star topology of SD and SDIO;
  since version 3.00 of the SDHCI specification, for eSD and eSDIO bus
  topologies are actually possible in form of so called "shared buses"
  (in some subcontext later on renamed to "embedded" buses).

6 years agoRequire strings(1) with :o_flag_preparer and :o_flag_publisher
ngie [Wed, 2 Aug 2017 20:42:39 +0000 (20:42 +0000)]
Require strings(1) with :o_flag_preparer and :o_flag_publisher

strings(1) might not be installed on the system, e.g., if MK_TOOLCHAIN == no

MFC after: 1 week

6 years agoarm64: Add Allwinner H5 SoC
manu [Wed, 2 Aug 2017 20:19:19 +0000 (20:19 +0000)]
arm64: Add Allwinner H5 SoC

Allwinner H5 is an H3 (arm32) with Cortex A53 cores.
Add support for it and enable it in GENERIC kernel config

Tested on: OrangePi PC2

6 years agoallwiner: modclk: Do not try to enable parent clock if it doesn't exist
manu [Wed, 2 Aug 2017 20:17:04 +0000 (20:17 +0000)]
allwiner: modclk: Do not try to enable parent clock if it doesn't exist

6 years agoAdd my birthdate to the calendar
rstone [Wed, 2 Aug 2017 19:45:09 +0000 (19:45 +0000)]
Add my birthdate to the calendar

Requested by: mckusick

6 years agoFix the interface to imx_iomux_gpr_get/set(). The functions were defined
ian [Wed, 2 Aug 2017 18:28:06 +0000 (18:28 +0000)]
Fix the interface to imx_iomux_gpr_get/set().  The functions were defined
as taking a register number, and that would get multiplied by 4 to make
a register address.  But the header file that consumers have to reference
this stuff publishes register addresses, not numbers.  So now everything
works in terms of register addresses.

Note that the HDMI init code was writing into the wrong register before
this change.  Apparently whatever it wrote to was harmless, and apparently
HDMI was working because uboot had set up the right bits.

6 years agoAdd missing ofw_bus_if.h src file.
ian [Wed, 2 Aug 2017 15:16:40 +0000 (15:16 +0000)]
Add missing ofw_bus_if.h src file.

6 years agoThe imx6_snvs driver is not strictly required for the system to run, so
ian [Wed, 2 Aug 2017 15:15:18 +0000 (15:15 +0000)]
The imx6_snvs driver is not strictly required for the system to run, so
change it from standard to optional and add a device statement for it so
that it's included unless someone uses nodevice to eliminate it.

6 years agoFor makedev(), cast the minor argument to unsigned type explicitely,
kib [Wed, 2 Aug 2017 14:54:54 +0000 (14:54 +0000)]
For makedev(), cast the minor argument to unsigned type explicitely,
avoiding possible sign propagation.

Submitted by: hselasky

6 years agoFix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
hselasky [Wed, 2 Aug 2017 14:27:27 +0000 (14:27 +0000)]
Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in
the "linux_cdev" structure to store and lookup this value.

While at it remove superfluous use of parenthesis inside the
MAJOR(), MINOR() and MKDEV() macros in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoFix the return type for get_cntxc(). The register is 64-bit on both arm
andrew [Wed, 2 Aug 2017 14:12:47 +0000 (14:12 +0000)]
Fix the return type for get_cntxc(). The register is 64-bit on both arm
and arm64 so move any truncation to the caller.

Submitted by: Mihai Carabas <mihai.carabas@gmail.com>
X-Differential Revision: https://reviews.freebsd.org/D10213

6 years agoKeep top page on CloudABI to work around AMD Ryzen stability issues.
ed [Wed, 2 Aug 2017 13:08:10 +0000 (13:08 +0000)]
Keep top page on CloudABI to work around AMD Ryzen stability issues.

Similar to r321899, reduce sv_maxuser by one page inside of CloudABI.
This ensures that the stack, the vDSO and any allocations cannot touch
the top page of user virtual memory.

Considering that CloudABI userspace is completely oblivious to virtual
memory layout, don't bother making this conditional based on the CPU of
the running system.

Reviewed by: kib, truckman
Differential Revision: https://reviews.freebsd.org/D11808

6 years agoUpdate my entry in marketing.
dru [Wed, 2 Aug 2017 12:31:03 +0000 (12:31 +0000)]
Update my entry in marketing.

6 years agoamd64: annotate the syscall return address check with __predict_false
mjg [Wed, 2 Aug 2017 11:25:38 +0000 (11:25 +0000)]
amd64: annotate the syscall return address check with __predict_false

before:
   0xffffffff80b03ebb <+2059>: mov    0x460(%r14),%rax
   0xffffffff80b03ec2 <+2066>: mov    0x98(%rax),%rax
   0xffffffff80b03ec9 <+2073>: shr    $0x2f,%rax
   0xffffffff80b03ecd <+2077>: je     0xffffffff80b03edd <amd64_syscall+2093>
   0xffffffff80b03ecf <+2079>: mov    0x3f8(%r14),%rax
   0xffffffff80b03ed6 <+2086>: orl    $0x1,0xc8(%rax)
   0xffffffff80b03edd <+2093>: add    $0xf8,%rsp

after:
   0xffffffff80b03ebb <+2059>: mov    0x460(%r14),%rax
   0xffffffff80b03ec2 <+2066>: mov    0x98(%rax),%rax
   0xffffffff80b03ec9 <+2073>: shr    $0x2f,%rax
   0xffffffff80b03ecd <+2077>: jne    0xffffffff80b03eef <amd64_syscall+2111>
   0xffffffff80b03ecf <+2079>: add    $0xf8,%rsp

Reviewed by: kib
MFC after: 1 week

6 years agoAdd compat shim part missed at r305197.
mav [Wed, 2 Aug 2017 10:33:47 +0000 (10:33 +0000)]
Add compat shim part missed at r305197.

This fixes compatibility between old kernel and new ZFS tools.
It seems to be tradition to forget it. :(

PR: 221112
MFC after: 3 days

6 years agoChange major()/minor() to work with 64bit dev_t.
kib [Wed, 2 Aug 2017 10:14:17 +0000 (10:14 +0000)]
Change major()/minor() to work with 64bit dev_t.

Since traditional types for the macros values are int, remove the
cookie trick and just split the dev_t at the word boundary.

Reported by: Victor Stinner <victor.stinner@gmail.com>
PR: 221048
Sponsored by: The FreeBSD Foundation

6 years agoDo not call trapsignal() after handling usermode fault or interrupt,
kib [Wed, 2 Aug 2017 10:12:10 +0000 (10:12 +0000)]
Do not call trapsignal() after handling usermode fault or interrupt,
when a signal is not intended to be sent.

The variable holding the signal number to send is left uninitialized,
which sometimes triggers invalid signal checks.

For NMI, a return to usermode without ast processing is done.  On the
other hand, for spurious dtrace probe interrupt it is usermode which
triggered the interrupt, so handle it through userret() as any other
fault.

Reported by: Nils Beyer <nbe@renzel.net>
PR: 221151
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoFix cosmetic issue with error message
ngie [Wed, 2 Aug 2017 09:49:41 +0000 (09:49 +0000)]
Fix cosmetic issue with error message

Add missing space in error message related to PR noted.

MFC after: 2 weeks
PR: 220398

6 years agoFix accidental misconversion done in r321912
ngie [Wed, 2 Aug 2017 09:00:18 +0000 (09:00 +0000)]
Fix accidental misconversion done in r321912

SUBDIR.${MK_TESTS} should append osmtest, not tests

MFC after: 1 week
MFC with: r321912

6 years agoRemove bogus bsd.subdir.mk .include
ngie [Wed, 2 Aug 2017 08:54:18 +0000 (08:54 +0000)]
Remove bogus bsd.subdir.mk .include

bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

MFC after: 3 days

6 years agoConvert traditional ${MK_TESTS} conditional idiom for including test
ngie [Wed, 2 Aug 2017 08:35:51 +0000 (08:35 +0000)]
Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after: 1 weeks

6 years agoLower the amd64 shared page, which contains the signal trampoline,
truckman [Wed, 2 Aug 2017 01:43:35 +0000 (01:43 +0000)]
Lower the amd64 shared page, which contains the signal trampoline,
from the top of user memory to one page lower on machines with the
Ryzen (AMD Family 17h) CPU.  This pushes ps_strings and the stack
down by one page as well.  On Ryzen there is some sort of interaction
between code running at the top of user memory address space and
interrupts that can cause FreeBSD to either hang or silently reset.
This sounds similar to the problem found with DragonFly BSD that
was fixed with this commit:
  https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b48dd28447fc8ef62fbc963accd301557fd9ac20
but our signal trampoline location was already lower than the address
that DragonFly moved their signal trampoline to.  It also does not
appear to be related to SMT as described here:
  https://www.phoronix.com/forums/forum/hardware/processors-memory/955368-some-ryzen-linux-users-are-facing-issues-with-heavy-compilation-loads?p=955498#post955498

  "Hi, Matt Dillon here. Yes, I did find what I believe to be a
   hardware issue with Ryzen related to concurrent operations. In a
   nutshell, for any given hyperthread pair, if one hyperthread is
   in a cpu-bound loop of any kind (can be in user mode), and the
   other hyperthread is returning from an interrupt via IRETQ, the
   hyperthread issuing the IRETQ can stall indefinitely until the
   other hyperthread with the cpu-bound loop pauses (aka HLT until
   next interrupt). After this situation occurs, the system appears
   to destabilize. The situation does not occur if the cpu-bound
   loop is on a different core than the core doing the IRETQ. The
   %rip the IRETQ returns to (e.g. userland %rip address) matters a
   *LOT*. The problem occurs more often with high %rip addresses
   such as near the top of the user stack, which is where DragonFly's
   signal trampoline traditionally resides. So a user program taking
   a signal on one thread while another thread is cpu-bound can cause
   this behavior. Changing the location of the signal trampoline
   makes it more difficult to reproduce the problem. I have not
   been because the able to completely mitigate it. When a cpu-thread
   stalls in this manner it appears to stall INSIDE the microcode
   for IRETQ. It doesn't make it to the return pc, and the cpu thread
   cannot take any IPIs or other hardware interrupts while in this
   state."
since the system instability has been observed on FreeBSD with SMT
disabled.  Interrupts to appear to play a factor since running a
signal-intensive process on the first CPU core, which handles most
of the interrupts on my machine, is far more likely to trigger the
problem than running such a process on any other core.

Also lower sv_maxuser to prevent a malicious user from using mmap()
to load and execute code in the top page of user memory that was made
available when the shared page was moved down.

Make the same changes to the 64-bit Linux emulator.

PR: 219399
Reported by: nbe@renzel.net
Reviewed by: kib
Reviewed by: dchagin (previous version)
Tested by: nbe@renzel.net (earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11780

6 years agoRevert accidental character conversion for pfg's entry, done in r321886
ngie [Wed, 2 Aug 2017 00:51:56 +0000 (00:51 +0000)]
Revert accidental character conversion for pfg's entry, done in r321886

6 years agoAmend r321884 to check the refcount and update the class with w_mtx held.
markj [Tue, 1 Aug 2017 23:14:38 +0000 (23:14 +0000)]
Amend r321884 to check the refcount and update the class with w_mtx held.

Reviewed by: jhb
X-MFC with: r321884

6 years agoAllwinner dtb: Add NanoPi M1 to the build
manu [Tue, 1 Aug 2017 20:28:11 +0000 (20:28 +0000)]
Allwinner dtb: Add NanoPi M1 to the build

It was tested on NanoPi M1 Plus.

6 years ago+ Add myself to calendar.freebsd.
taras [Tue, 1 Aug 2017 20:16:00 +0000 (20:16 +0000)]
+ Add myself to calendar.freebsd.

6 years agoAdd joneum to the calendar.freebsd
tcberner [Tue, 1 Aug 2017 19:29:16 +0000 (19:29 +0000)]
Add joneum to the calendar.freebsd

Reported by: mckusick
Submitted by: joneum

6 years agoAlwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board
manu [Tue, 1 Aug 2017 19:22:00 +0000 (19:22 +0000)]
Alwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board

6 years agofix sort order
emax [Tue, 1 Aug 2017 18:48:09 +0000 (18:48 +0000)]
fix sort order

6 years agoadd myself
emax [Tue, 1 Aug 2017 18:46:24 +0000 (18:46 +0000)]
add myself

Requested by: mckusick

6 years agoAllwinner dtb: add link for NanoPi Neo
manu [Tue, 1 Aug 2017 18:33:27 +0000 (18:33 +0000)]
Allwinner dtb: add link for NanoPi Neo

Reported by: Richard Puga <richard@puga.net>
Tested by: Richard Puga <richard@puga.net>, myself

6 years agoCCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.
bdrewery [Tue, 1 Aug 2017 18:26:20 +0000 (18:26 +0000)]
CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.

- bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first
  in PATH.
- Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it
  overrides the PATH set in bsd.compiler.mk in sub-makes.  The PATH
  set in bsd.compiler.mk is not exported and doing so would cause it to
  then override the BPATH set from environment.  The only sane solution
  is to prepend into BPATH as needed.
CCACHE_PATH could possibly be used for some of this as well.

Sponsored by: Dell EMC Isilon

6 years agoAdd Anne Dickison.
mckusick [Tue, 1 Aug 2017 18:25:04 +0000 (18:25 +0000)]
Add Anne Dickison.

Requested by: Anne Dickison

6 years agoAdd myself to the calendar.freebsd
lev [Tue, 1 Aug 2017 18:05:19 +0000 (18:05 +0000)]
Add myself to the calendar.freebsd

Reported by: mckusick

6 years agoFix a witness assertion that fires when a lock type's class changes.
markj [Tue, 1 Aug 2017 17:50:28 +0000 (17:50 +0000)]
Fix a witness assertion that fires when a lock type's class changes.

When all instances of a lock type are destroyed (for example, after a
module unload), the corresponding witness entry remains associated with
that lock type. In this case, we shouldn't panic if a new instance of the
lock type is created and its lock class does not match that recorded in the
witness entry.

Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11788

6 years agoNO_CLEAN: No need to run delete-old if the directories don't exist.
bdrewery [Tue, 1 Aug 2017 16:41:17 +0000 (16:41 +0000)]
NO_CLEAN: No need to run delete-old if the directories don't exist.

X-MFC-With: r321443
MFC after: 1 month
Sponsored by: Dell EMC Isilon

6 years agoFor the udp-client example, instruct user to add an entry for a udp based
sevan [Tue, 1 Aug 2017 16:20:33 +0000 (16:20 +0000)]
For the udp-client example, instruct user to add an entry for a udp based
service.
For tcp-client & udp-client, use the same port in configuration snippet as used
in the comment prior to remove any ambiguity on the port number which needs to
be specified.

Reviewed by: bcr (mentor) wblock (mentor)
Approved by: gavin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9830

6 years agoCCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.
bdrewery [Tue, 1 Aug 2017 16:15:08 +0000 (16:15 +0000)]
CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.

This uses the /usr/local/libexec/ccache/<cc,c++> wrappers rather than
modifying CC to be '/usr/local/bin/ccache cc'.  Some forms of compilation
do not support the 'command' type.

Sponsored by: Dell EMC Isilon

6 years agoUpdate doceng, re, security-officer, clusteradm, webmaster and
gjb [Tue, 1 Aug 2017 16:05:23 +0000 (16:05 +0000)]
Update doceng, re, security-officer, clusteradm, webmaster and
donations entries.

Requested by: sevan
Sponsored by: The FreeBSD Foundation

6 years agoIn xdev-links, when installing symlinks to the cross-compiler pieces that
ian [Tue, 1 Aug 2017 14:54:25 +0000 (14:54 +0000)]
In xdev-links, when installing symlinks to the cross-compiler pieces that
includes the OS version (armv6-freebsd12.0-cc, etc), use the OS version of
the compiler/world source code, not the version of the build host machine.

6 years ago[calendar.freebsd] Add myselft into freebsd.calendar
mizhka [Tue, 1 Aug 2017 11:51:35 +0000 (11:51 +0000)]
[calendar.freebsd] Add myselft into freebsd.calendar

6 years agozfsboottest: catch up with r316585 and provide ldi_get_size method
avg [Tue, 1 Aug 2017 11:09:18 +0000 (11:09 +0000)]
zfsboottest: catch up with r316585 and provide ldi_get_size method

This method is required for querying file / disk sizes which is needed
at least for finding all copies of ZFS VDEV labels.

Reported by: ngie
MFC after: 1 week

6 years agoMerge ena-com 1.1.4.2
mw [Tue, 1 Aug 2017 11:00:04 +0000 (11:00 +0000)]
Merge ena-com 1.1.4.2

Update ENA HAL after fixing gcc build in r321861.

Submitted by: rlibby
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D11480

6 years agopci: fix write order when sizing BARs
royger [Tue, 1 Aug 2017 10:47:44 +0000 (10:47 +0000)]
pci: fix write order when sizing BARs

According to the PCI Local Specification rev. 3.0 in case of a 64-bit
BAR both the low and the high parts of the register should be set to
~0 before attempting to read back the size.

So far I have found no single device that has problems with the
previous approach, but I think it's better to stay on the safe size.

This commit should not introduce any functional change.

MFC after: 3 weeks
Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D11750

6 years agoAdd myself to calendar
mw [Tue, 1 Aug 2017 10:11:20 +0000 (10:11 +0000)]
Add myself to calendar

Approved by: cognet (mentor)

6 years agoAdjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
se [Tue, 1 Aug 2017 09:34:15 +0000 (09:34 +0000)]
Adjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
long ago) in comment. No functional change.

6 years agoAdd alternate Turkish keyboard layout F. The layout and menu texts have
se [Tue, 1 Aug 2017 09:30:21 +0000 (09:30 +0000)]
Add alternate Turkish keyboard layout F. The layout and menu texts have
been provided by Ufuk Güler, with minor changes for consistency by me.

Submitted by: Ufuk Güler <ufukguler@yahoo.com>
MFC after: 1 week

6 years agoAdd myself to calendar.
tuexen [Tue, 1 Aug 2017 09:26:22 +0000 (09:26 +0000)]
Add myself to calendar.

Reminded by: mckusick

6 years agoAdd explicit check for PCI bus to r321720.
mav [Tue, 1 Aug 2017 09:22:10 +0000 (09:22 +0000)]
Add explicit check for PCI bus to r321720.

Reported by: jhb
MFC after: 6 days

6 years agoAdd myself to the calendar
wulf [Tue, 1 Aug 2017 07:05:29 +0000 (07:05 +0000)]
Add myself to the calendar

Reminded by: mckusick
Approved by: gonzo (mentor)