]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoadd REPRODUCIBLE_BUILD note to UPDATING
Ed Maste [Wed, 26 Sep 2018 15:07:06 +0000 (15:07 +0000)]
add REPRODUCIBLE_BUILD note to UPDATING

Reported by: bz
Approved by: re (gjb)

5 years agoFix witness warning in xform_init().
Andrey V. Elsukov [Wed, 26 Sep 2018 14:47:51 +0000 (14:47 +0000)]
Fix witness warning in xform_init().

Do not call crypto_newsession() while holding xforms_lock mutex.
Release mutex before invoking crypto_newsession(), and use
ipsec_kmod_enter()/ipsec_kmod_exit() functions to protect from doing
access to unloaded kernel module memory.

Move xform-releated functions into subr_ipsec.c to be able use
ipsec_kmod_* functions. Also unconditionally build ipsec_kmod_*
functions, since now they are always used by IPSec code.

Add xf_cntr field to struct xformsw, it is used by ipsec_kmod_*
functions. Also constify xf_name field, since it is not expected to be
modified.

Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17302

5 years agoClarify UPDATING entry about lld
Ed Maste [Wed, 26 Sep 2018 14:32:36 +0000 (14:32 +0000)]
Clarify UPDATING entry about lld

The workaround described in the 20180530 entry is no longer required.
Amend that entry and add a new 20180530 entry noting lld is the
default amd64 linker.

Reviewed by: imp
Approved by: re (kib)

5 years agoAdd PCIV_INVALID definition
Slava Shwartsman [Wed, 26 Sep 2018 13:16:55 +0000 (13:16 +0000)]
Add PCIV_INVALID definition

From PCI Spec rev 2.2, 6.2.1. Device Identification:
Vendor ID This field identifies the manufacturer of the device. Valid
vendor identifiers are allocated by the PCI SIG to ensure uniqueness.
0FFFFh is an invalid value for Vendor ID.

MFC after:      3 days
Approved by:    re (Glen), hselasky (mentor), kib (mentor)
Sponsored by:   Mellanox Technologies

5 years agoWhitespace changes and fixing a typo. No functional change.
Michael Tuexen [Wed, 26 Sep 2018 10:24:50 +0000 (10:24 +0000)]
Whitespace changes and fixing a typo. No functional change.

Approved by: re (kib@)
MFC after: 1 week

5 years agocxgbe(4): Treat base/end of firmware parameters as signed integers when
Navdeep Parhar [Wed, 26 Sep 2018 02:27:37 +0000 (02:27 +0000)]
cxgbe(4): Treat base/end of firmware parameters as signed integers when
figuring out whether the range is valid or not.

Approved by: re@ (rgrimes@)
MFC after: 1 week
Sponsored by: Chelsio Communications

5 years agoFix some uses of dmaplimit.
Konstantin Belousov [Tue, 25 Sep 2018 20:07:58 +0000 (20:07 +0000)]
Fix some uses of dmaplimit.

dmaplimit is the first byte after the end of DMAP.

Reported by: "Johnson, Archna" <Archna.Johnson@netapp.com>
Reviewed by: alc, markj
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17318

5 years agoBring the 32-bit powerpc (PowerMac) back to live. The commit 338486 reworked
Andreas Tobler [Tue, 25 Sep 2018 19:29:35 +0000 (19:29 +0000)]
Bring the 32-bit powerpc (PowerMac) back to live. The commit 338486 reworked
some TLS bits. This broke operation on the PowerMac. Namely one could not login.
At login the screen/shell was giving back lots of backslashes and the login
shell dumped core.

The fix to this issue is to revert the powerpc commit from 338486 and to
increase the TLS_TCB_SIZE to 16.
Reverting only did not help, login was possible but userland applications
aborted with strange messages.

I tested this patch with world/kernel builds and with port upgrades.
Additionally a full gcc8 bootstrap was successfully completed.

Reviewed by: jhibbits@
Approved by: re (Glen)

5 years agoDo not remove ld man page if lld is enabled and binutils is not
Ed Maste [Tue, 25 Sep 2018 18:54:18 +0000 (18:54 +0000)]
Do not remove ld man page if lld is enabled and binutils is not

Reported by: Mark Millard
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoFix an issue in r338862.
Konstantin Belousov [Tue, 25 Sep 2018 18:24:25 +0000 (18:24 +0000)]
Fix an issue in r338862.

For pmap_invalidate_all_pcid(), only reset pm_gen for non-kernel
pmaps, as it was done before the conversion to ifuncs.  The reset is
useless but innocent for kernel_pmap. Coverity reported that cpuid is
used uninitialized in this case.

Reported by: cem
Reviewed by: alc, cem, markj
CID:  1395807
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17314

5 years agozfs: depessimize zfs_root with rmlocks
Mateusz Guzik [Tue, 25 Sep 2018 17:58:06 +0000 (17:58 +0000)]
zfs: depessimize zfs_root with rmlocks

Currently vfs calls the root method on each absolute lookup and when
crossing mount points.

zfs_root ends up looking up the inode internally as if it was not
instantianted which results in significant lock contention on systems
like EPYC.

Store the vnode in the mount point and protect the access with rmlocks.
This is a temporary hack for 12.0.

Sample result:

before:
make -s -j 128 buildkernel 2778.09s user 3319.45s system 8370% cpu 1:12.85 total

after:
make -s -j 128 buildkernel 3199.57s user 1772.78s system 8232% cpu 1:00.40 total

Tested by: pho (zfs mount/unmount tests)
Reviewed by: kib, mav, sef (different parts)
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17233

5 years agoDon't override LDFLAGS set in bsd.cpu.mk.
Brooks Davis [Tue, 25 Sep 2018 15:25:42 +0000 (15:25 +0000)]
Don't override LDFLAGS set in bsd.cpu.mk.

This is a direct commit to a generated file.  Simon plans to fix this
upstream before the next import.

PR: 231557
Approved by: re (gjb)
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

5 years agocxgbe(4): Link related changes.
Navdeep Parhar [Tue, 25 Sep 2018 05:52:42 +0000 (05:52 +0000)]
cxgbe(4): Link related changes.

- Switch to using 32b port/link capabilities in the driver.  The 32b
  format is used internally by firmwares > 1.16.45.0 and the driver will
  now interact with the firmware in its native format, whether it's 16b
  or 32b.  Note that the 16b format doesn't have room for 50G, 200G, or
  400G speeds.

- Add a bit in the pause_settings knobs to allow negotiated PAUSE
  settings to override manual settings.

- Ensure that manual link settings persist across an administrative
  down/up as well as transceiver unplug/replug.

- Remove unused is_*G_port() functions.

Approved by: re@ (gjb@)
MFC after: 1 month
Sponsored by: Chelsio Communications

5 years agopowerpc: Blacklist the top 64kB range of the lower 4GB PA space
Justin Hibbits [Tue, 25 Sep 2018 02:34:28 +0000 (02:34 +0000)]
powerpc: Blacklist the top 64kB range of the lower 4GB PA space

The PHB4 host bridge used by the POWER9 uses a 64kB range in 32-bit
space at the address 0xffff0000-0xffffffff.  Reserve this range so that
DMA memory cannot be allocated within this range.  This fixes seemingly
random crashes on a POWER9 system.  Ideally this range will have been
reserved by the firmware, but as of now this is not the case.

Submitted by: git_bdragon.rtk0.net
Reviewed by: nwhitehorn
Approved by: re(kib)
Differential Revision: https://reviews.freebsd.org/D17183

5 years agoRecognize the Amazon PCI serial device found in i3.metal EC2 instances
Colin Percival [Mon, 24 Sep 2018 22:15:04 +0000 (22:15 +0000)]
Recognize the Amazon PCI serial device found in i3.metal EC2 instances
as an NS8250 UART.

Reviewed by: sbruno, imp
Approved by: re (delphij)
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D17250

5 years agosysctl(8): Add a standard exit status section.
Mateusz Piotrowski [Mon, 24 Sep 2018 20:46:45 +0000 (20:46 +0000)]
sysctl(8): Add a standard exit status section.

Reviewed by: bcr
Approved by: re (gjb), krion (mentor)
Differential Revision: https://reviews.freebsd.org/D17147

5 years agoAdd more NUMA-specific low memory predicates.
Mark Johnston [Mon, 24 Sep 2018 19:24:17 +0000 (19:24 +0000)]
Add more NUMA-specific low memory predicates.

Use these predicates instead of inline references to vm_min_domains.
Also add a global all_domains set, akin to all_cpus.

Reviewed by: alc, jeff, kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17278

5 years agorestore pmccontrol -L behavior on x86
Matt Macy [Mon, 24 Sep 2018 19:06:09 +0000 (19:06 +0000)]
restore pmccontrol -L behavior on x86

When I updated counter definition handling for x86 I broke
'pmccontrol -L' listing counter names. This just changes
pmccontrol to call the library function on x86.

PR: 230984
Approved by: re (kib@)

5 years agoRestore the API of the kf_sa_local and kf_sa_peer members.
John Baldwin [Mon, 24 Sep 2018 18:20:38 +0000 (18:20 +0000)]
Restore the API of the kf_sa_local and kf_sa_peer members.

In 11.x and earlier these were accessible as direct members of 'struct
kinfo_file'.  Existing code already knows about the new location of
these members as well, so wrapper macros did not work for these
fields.  Instead, define an anonymous struct containing the fields
from 'struct kinfo_file' in FreeBSD 11 that were not part of the
'kf_un' union.  This anonymous struct is then placed in an anonymous
union along with the new 'kf_un' union.  This preserves the API of
both structure layouts without requiring any wrapper macros.

PR: 231525
Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17262

5 years agoImplement pmap_sync_icache().
John Baldwin [Mon, 24 Sep 2018 17:41:29 +0000 (17:41 +0000)]
Implement pmap_sync_icache().

This invokes "fence" on the hart performing the write followed by an IPI
to execute "fence.i" on all harts.

This is required to support userland debuggers setting breakpoints in
user processes.

Reviewed by: br (earlier version), markj
Approved by: re (gjb)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17139

5 years agoFix use-after-free in RAID0 error reporting of GEOM_RAID.
Alexander Motin [Mon, 24 Sep 2018 16:58:55 +0000 (16:58 +0000)]
Fix use-after-free in RAID0 error reporting of GEOM_RAID.

PR: 231510
Submitted by: yangx92@hotmail.com
Approved by: re (gjb)
MFC after: 1 week

5 years agoPassing UMA_ZONE_NOFREE to uma_zcreate() for swpctrie_zone and swblk_zone is
Alan Cox [Mon, 24 Sep 2018 16:49:02 +0000 (16:49 +0000)]
Passing UMA_ZONE_NOFREE to uma_zcreate() for swpctrie_zone and swblk_zone is
redundant, because uma_zone_reserve_kva() is performed on both zones and it
sets this same flag on the zone.  (Moreover, the implementation of the swap
pager does not itself require these zones to be UMA_ZONE_NOFREE.)

Reviewed by: kib, markj
Approved by: re (gjb)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17296

5 years agoEnsure that "domain" is initialized when vm_ndomains == 1.
Mark Johnston [Mon, 24 Sep 2018 15:32:46 +0000 (15:32 +0000)]
Ensure that "domain" is initialized when vm_ndomains == 1.

Reported by: alc
Approved by: re (gjb)

5 years agoMove libc linker ifunc test to build target only
Ed Maste [Mon, 24 Sep 2018 13:42:46 +0000 (13:42 +0000)]
Move libc linker ifunc test to build target only

Targets like 'cleandir' must not depend on toolchain capabilities.

Reported by: delphij, Shawn Webb
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years agoEliminate false sharing in malloc due to statistic collection
Mateusz Guzik [Sun, 23 Sep 2018 19:00:06 +0000 (19:00 +0000)]
Eliminate false sharing in malloc due to statistic collection

Currently stats are collected in a MAXCPU-sized array which is not
aligned and suffers enormous false-sharing. Fix the problem by
utilizing per-cpu allocation.

The counter(9) API is not used here as it is too incomplete and does
not provide a win over per-cpu zone sized for malloc stats struct. In
particular stats are being reported for each cpu separately by just
copying what is supposed to be an array element for given cpu.

This eliminates significant false-sharing during malloc-heavy tests
e.g. on Skylake. See the review for details.

Reviewed by: markj
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17289

5 years agoRemove the unused parameter 'locked' from the function
Michael Tuexen [Sun, 23 Sep 2018 16:37:32 +0000 (16:37 +0000)]
Remove the unused parameter 'locked' from the function
syncache_respond(). There is no functional change. The
parameter became unused in r313330, but wasn't removed.

Approved by: re (kib@)
MFC after: 1 month
Sponsored by: Netflix, Inc.

5 years agoSet the default loader for powerpc(32- and 64-bit) back to to forth.
Andreas Tobler [Sat, 22 Sep 2018 20:58:43 +0000 (20:58 +0000)]
Set the default loader for powerpc(32- and 64-bit) back to to forth.
There are some issues with the lua-loader. To be on the safe side, use a well
known and working loader.

Approved by: re (glen)

5 years agoCorrect panic messages.
Konstantin Belousov [Sat, 22 Sep 2018 17:05:49 +0000 (17:05 +0000)]
Correct panic messages.

Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
Approved by: re (rgrimes)
MFC after: 1 week

5 years agoFurther reorganize pmap_invalidate TLB code.
Konstantin Belousov [Sat, 22 Sep 2018 17:04:39 +0000 (17:04 +0000)]
Further reorganize pmap_invalidate TLB code.

Split calculation of mask for shootdown IPI and local
invalidation. Reorder IPI before local.

Suggested by: alc
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (rgrimes)
Differential revision: https://reviews.freebsd.org/D17277

5 years agoUpdate ifr_name before invoking IPSECSREQID ioctl, this fixes the case,
Andrey V. Elsukov [Sat, 22 Sep 2018 16:30:48 +0000 (16:30 +0000)]
Update ifr_name before invoking IPSECSREQID ioctl, this fixes the case,
when `ifconfig ipsec create reqid N` command invoked without interface
unit number. The "name" global variable is updated after interface
cloning in the ifclonecreate() and contains actual interface name.

Reported by: lev
Approved by: re (kib)
MFC after: 1 week

5 years agoWe don't need shell protection for when we're expanding matches.
Warner Losh [Sat, 22 Sep 2018 15:32:53 +0000 (15:32 +0000)]
We don't need shell protection for when we're expanding matches.
Don't add it. This should fix when we do regepx matches against
variables we've set and fix wifi bring up.

PR: 231441
Approved by: re@ (kib)
Differential Revision: https://reviews.freebsd.org/D17267

5 years agoMove hosts.allow to lib/libwrap/
Brad Davis [Sat, 22 Sep 2018 13:17:30 +0000 (13:17 +0000)]
Move hosts.allow to lib/libwrap/

This leverages CONFS to handle the install.

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17240

5 years agoImprove loader passwords:
Edward Tomasz Napierala [Sat, 22 Sep 2018 13:14:44 +0000 (13:14 +0000)]
Improve loader passwords:

1. Be clear about which password is being requested
2. Remove extraneous whitespace between the prompt and the cursor
3. Move the twiddle to where the prompt is, instead of two characters to the right
4. Fix erasing the 'incorrect password' message when retrying; previously it was erased partially
5. Remove the unneeded exclamation mark

Reviewed by: kevans
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17236

5 years agovfs: __predict common case in VFS_EPILOGUE/PROLOGUE
Mateusz Guzik [Sat, 22 Sep 2018 11:39:30 +0000 (11:39 +0000)]
vfs: __predict common case in VFS_EPILOGUE/PROLOGUE

NFS is the only in-tree filesystem using the feature, but all ops test
for it.

Currently the resulting sigdefer calls have to be jumped over in the
common case.

This is a bandaid, longer term fix will move this feature away.

Approved by: re (kib)

5 years agocxgbe(4): Reuse existing "switching" L2T entries when possible.
Navdeep Parhar [Sat, 22 Sep 2018 01:24:30 +0000 (01:24 +0000)]
cxgbe(4): Reuse existing "switching" L2T entries when possible.

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

5 years agocxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed
Navdeep Parhar [Fri, 21 Sep 2018 23:48:40 +0000 (23:48 +0000)]
cxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed
with either '=' or '+'.  Fix the description of the parameter in the man page
while here.

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

5 years agoMFV r338866: 9700 ZFS resilvered mirror does not balance reads
Alexander Motin [Fri, 21 Sep 2018 21:56:00 +0000 (21:56 +0000)]
MFV r338866: 9700 ZFS resilvered mirror does not balance reads

illumos/illumos-gate@82f63c3c2bf5e4378706e8dcfccf717d67371be9

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author:     Jerry Jelinek <jerry.jelinek@joyent.com>

Approved by: re (delphij)

5 years ago9700 ZFS resilvered mirror does not balance reads
Alexander Motin [Fri, 21 Sep 2018 20:38:23 +0000 (20:38 +0000)]
9700 ZFS resilvered mirror does not balance reads

illumos/illumos-gate@82f63c3c2bf5e4378706e8dcfccf717d67371be9

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author:     Jerry Jelinek <jerry.jelinek@joyent.com>

5 years ago9626 move 'static xuio_stats_t xuio_stats' to file where it use
Alexander Motin [Fri, 21 Sep 2018 20:36:26 +0000 (20:36 +0000)]
9626 move 'static xuio_stats_t xuio_stats' to file where it use

illumos/illumos-gate@857c96d257470e097e846ab8886580991b329c32

Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Igor Kozhukhov <igor@dilos.org>

5 years ago9672 Reserve a ZFS replication stream feature flag for ZSTD compression
Alexander Motin [Fri, 21 Sep 2018 20:34:26 +0000 (20:34 +0000)]
9672 Reserve a ZFS replication stream feature flag for ZSTD compression

illumos/illumos-gate@acd7f809f0376580771fe4df8aaeecebe4c40b2f

Author:     Allan Jude <allanjude@freebsd.org>
Reviewed by: Matt Ahrens <matt@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>

5 years agoUse the GNU as-compatible .endm instead of .endmacro.
Mark Johnston [Fri, 21 Sep 2018 20:20:03 +0000 (20:20 +0000)]
Use the GNU as-compatible .endm instead of .endmacro.

Approved by: re (gjb)

5 years agoConvert x86 TLB top-level invalidation functions to ifuncs.
Konstantin Belousov [Fri, 21 Sep 2018 17:53:06 +0000 (17:53 +0000)]
Convert x86 TLB top-level invalidation functions to ifuncs.

Note that shootdown IPI handlers are already per-mode.

Suggested by: alc
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17184

5 years agolibc: require ifunc-capable linker for amd64/i386
Ed Maste [Fri, 21 Sep 2018 17:49:37 +0000 (17:49 +0000)]
libc: require ifunc-capable linker for amd64/i386

We expect to introduce optimized libc routines in the near future,
which requires use of a linker that supports ifuncs.

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

5 years agoDisable sbrk() use in GNU tools.
Brooks Davis [Fri, 21 Sep 2018 17:44:05 +0000 (17:44 +0000)]
Disable sbrk() use in GNU tools.

We're studing the possibility of deprecating sbrk().  To make it easier
we're removing unnecessicary uses in the base system.  None of these
tools require sbrk(), but they agressively prefer it for no good reason.

Reviewed by:    andrew
Approved by: re (kib)
Sponsored by: DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D16141

5 years agoamd64: even up copyin/copyout with memcpy + other cleanup
Mateusz Guzik [Fri, 21 Sep 2018 15:00:46 +0000 (15:00 +0000)]
amd64: even up copyin/copyout with memcpy + other cleanup

- _fault handlers for both primitives are identical, provide just one
- change the copying scheme to match memcpy (in particular jump
avoidance for the most common case of multiply of 8)
- stop re-reading pcb address on exit, just store it locally (in r9)

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

5 years agoFix possible NULL pointer dereference in ffec_alloc_mbufcl().
Andrey V. Elsukov [Fri, 21 Sep 2018 13:44:05 +0000 (13:44 +0000)]
Fix possible NULL pointer dereference in ffec_alloc_mbufcl().

PR: 231514
Approved by: re (kib)
MFC after: 1 week

5 years agoInclude kernel ident in uname
Ed Maste [Fri, 21 Sep 2018 13:43:06 +0000 (13:43 +0000)]
Include kernel ident in uname

In non-reproducible mode we have the kernel ident as a side effect of
including the build directory.  Explicitly add it to the ident string in
reproducible mode.

Reported by: mjg
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

5 years agoselect: stop doing zero-sized memsets
Mateusz Guzik [Fri, 21 Sep 2018 13:20:41 +0000 (13:20 +0000)]
select: stop doing zero-sized memsets

Approved by: re (kib)

5 years agoremove double space between branch and version in kernel ident
Ed Maste [Fri, 21 Sep 2018 13:02:25 +0000 (13:02 +0000)]
remove double space between branch and version in kernel ident

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

5 years agoamd64: check for small size in memmove, memcpy and memset
Mateusz Guzik [Fri, 21 Sep 2018 12:27:36 +0000 (12:27 +0000)]
amd64: check for small size in memmove, memcpy and memset

If the size is 15 bytes or less avoid spinning up rep just to copy the 8
bytes. In my tests on EPYC and old Intel microarchs without ERMS (like
Westmere) it provided a nice win over the current version (e.g. for EPYC
memset with 15 bytes of size goes from 59712651 ops/s to 70600095) all
while almost not pessimizing the other cases.

Data collected during package building shows that < 16 sizes are pretty
common.

Verified with the glibc test suite.

Approved by: re (kib)

5 years agoAdd an installer option to disable destructive dtrace.
Dag-Erling Smørgrav [Fri, 21 Sep 2018 09:27:32 +0000 (09:27 +0000)]
Add an installer option to disable destructive dtrace.

Submitted by: Jörg Pernfuß <code.jpe@gmail.com>
Approved by: re (kib)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12474

5 years agoMention setting $lines to 0 in ddb can disable paging
Li-Wen Hsu [Fri, 21 Sep 2018 07:36:02 +0000 (07:36 +0000)]
Mention setting $lines to 0 in ddb can disable paging

Reviewed by: bcr (earlier version), markj
Approved by: re (kib), markj (mentor)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17068

5 years agofix vlan locking to permit sx acquisition in ioctl calls
Matt Macy [Fri, 21 Sep 2018 01:37:08 +0000 (01:37 +0000)]
fix vlan locking to permit sx acquisition in ioctl calls

- update vlan(9) to handle changes earlier this year in multicast locking

Tested by: np@, darkfiberu at gmail.com

PR: 230510
Reviewed by: mjoras@, shurd@, sbruno@
Approved by: re (gjb@)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16808

5 years agoUpdate head from ALPHA6 to ALPHA7 as part of the 12.0-RELEASE
Glen Barber [Thu, 20 Sep 2018 23:59:42 +0000 (23:59 +0000)]
Update head from ALPHA6 to ALPHA7 as part of the 12.0-RELEASE
cycle.

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

5 years agoamd64: macroify copyin/copyout and provide erms variants, follow up
Mateusz Guzik [Thu, 20 Sep 2018 20:32:08 +0000 (20:32 +0000)]
amd64: macroify copyin/copyout and provide erms variants, follow up

Fix a fat-fingered typo with a "funny" side-effect: when doing copyin on a
cpu without ERMS and with size being a multiply of 8 a page fault would be
triggered resulting in EFAULT.

Pointy hat: mjg
Approved by: re (implicit)

5 years agoAdd IFCAP_TSO6 for igb
Stephen Hurd [Thu, 20 Sep 2018 20:06:44 +0000 (20:06 +0000)]
Add IFCAP_TSO6 for igb

It seems igb supports TSO6, but the capability got lost in
the iflib update. Restore this capability.

PR: 231476
Reported by: lev
Reviewed by: erj
Approved by: re (gjb)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17242

5 years agoAdd new field max_hdrsize to struct encap_config.
Andrey V. Elsukov [Thu, 20 Sep 2018 19:45:27 +0000 (19:45 +0000)]
Add new field max_hdrsize to struct encap_config.

It is currently unused and reserved for future use to keep KBI/KPI.
Also add several spare pointers to be able extend structure if it
will be needed.

Approved by: re (gjb)

5 years agoFix capabilities handling for iflib drivers
Stephen Hurd [Thu, 20 Sep 2018 19:35:35 +0000 (19:35 +0000)]
Fix capabilities handling for iflib drivers

Various capabilities were not being handled correctly in the
SIOCSIFCAP handler. Specifically:

IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6 could be set even if not supported

It was impossible to disable IFCAP_RXCSUM and/or IFCAP_RXCSUM_IPV6 via
ifconfig since it does ioctl() per command-line flag rather than combine
them into a single call.

IFCAP_VLAN_HWCSUM could not be modified via the ioctl()

Setting any combination of the three IFCAP_WOL flags would set only
IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC. For example, setting only
IFCAP_WOL_UCAST would result in both IFCAP_WOL_MCAST and IFCAP_WOL_MAGIC
being enabled, but IFCAP_WOL_UCAST would not be enabled.

Because if_vlancap() was called before if_togglecapenable(), vlan flags
were sometimes not applied correctly.

Interfaces were being unnecessarily stopped and restarted for WoL

PR: 231151
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Reported by: Shirkdog <mshirk@daemon-security.com>
Reviewed by: galladin
Approved by: re (gjb)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17158

5 years agoamd64: macroify copyin/copyout and provide erms variants
Mateusz Guzik [Thu, 20 Sep 2018 18:30:17 +0000 (18:30 +0000)]
amd64: macroify copyin/copyout and provide erms variants

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

5 years agoEnsure that imports into per-domain kmem arenas are KVA_QUANTUM-aligned.
Mark Johnston [Thu, 20 Sep 2018 18:29:55 +0000 (18:29 +0000)]
Ensure that imports into per-domain kmem arenas are KVA_QUANTUM-aligned.

The old code appears to assume that vmem_alloc() would import
size-aligned KVA chunks from the parent kernel_arena, but vmem doesn't
provide this guarantee.

Also remove the unused global RWX arena and add comments explaining why
we have per-domain arenas.

Reported by: alc
Reviewed by: alc, kib (previous version)
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17249

5 years agovfs: remove lookup_shared tunable
Mateusz Guzik [Thu, 20 Sep 2018 18:25:26 +0000 (18:25 +0000)]
vfs: remove lookup_shared tunable

Reviewed by: kib, jhb
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17253

5 years agoAdd iflib.4 manpage
Stephen Hurd [Thu, 20 Sep 2018 18:24:32 +0000 (18:24 +0000)]
Add iflib.4 manpage

The new manpage documents the tunables and statistic sysctls exposed by
iflib.

Reviewed by: bcr
Approved by: re (gjb)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16920

5 years agoFix variable name typo in the bsdinstall ttys hardening code.
Mark Johnston [Thu, 20 Sep 2018 16:37:50 +0000 (16:37 +0000)]
Fix variable name typo in the bsdinstall ttys hardening code.

Submitted by: Jörg Pernfuß <code.jpe@gmail.com>
Reviewed by: allanjude, dab, emaste
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D12476

5 years agoIn icmp6_rip6_input(), once we have a lock, make sure the inp is
Bjoern A. Zeeb [Thu, 20 Sep 2018 15:45:53 +0000 (15:45 +0000)]
In icmp6_rip6_input(), once we have a lock, make sure the inp is
not freed.  This can happen since the list traversal and locking
was converted to epoch(9).  If the inp is marked "freed", skip it.

This prevents a NULL pointer deref panic in ip6_savecontrol_v4()
trying to access the socket hanging off the inp, which was gone
by the time we got there.

Reported by: andrew
Tested by: andrew
Approved by: re (gjb)

5 years agoChange the domain selection policy in kmem_back().
Mark Johnston [Thu, 20 Sep 2018 15:45:12 +0000 (15:45 +0000)]
Change the domain selection policy in kmem_back().

Ensure that pages backing the same virtual large page come from the
same physical domain, as kmem_malloc_domain() does.

PR: 231038
Reviewed by: alc, kib
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17248

5 years agofd: prevent inlining of _fdrop thorough kern_descrip.c
Mateusz Guzik [Thu, 20 Sep 2018 13:32:40 +0000 (13:32 +0000)]
fd: prevent inlining of _fdrop thorough kern_descrip.c

fdrop is used in several places in the file and almost never has to call
_fdrop. Thus inlining it is a pure waste of space.

Approved by: re (kib)

5 years agoamd64: move fusufault after all users
Mateusz Guzik [Thu, 20 Sep 2018 13:29:43 +0000 (13:29 +0000)]
amd64: move fusufault after all users

A lot of function have the following check:
        cmpq    %rax,%rdi                       /* verify address is valid */
        ja      fusufault

The label is present earlier in kernel .text, which means this is a jump
backwards. Absent any information in branch predictor, the cpu predicts it
as taken. Since it is almost never taken in practice, this results in a
completely avoidable misprediction.

Move it past all consumers, so that it is predicted as not taken.

Approved by: re (kib)

5 years agoMFV r338797:
Martin Matuska [Thu, 20 Sep 2018 11:44:36 +0000 (11:44 +0000)]
MFV r338797:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1019: Add allocation check for the zip_entry struct
  Oss-Fuzz #10192: Handle whitespace-only ACL fields correctly

Approved by: re (kib)
MFC after: 1 week

5 years agoImport mandoc 1.14.4
Baptiste Daroussin [Thu, 20 Sep 2018 10:58:52 +0000 (10:58 +0000)]
Import mandoc 1.14.4

Approved by: re (kib)
MFC after: 1 week

5 years agoMove the openssl.cnf install to secure/usr.bin/openssl/
Brad Davis [Thu, 20 Sep 2018 09:34:55 +0000 (09:34 +0000)]
Move the openssl.cnf install to secure/usr.bin/openssl/

This leverages CONFS to do the install

Approved by: re (pkgbase, blanket), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17245

5 years agoMove nsmb.conf to lib/libsmb/
Brad Davis [Thu, 20 Sep 2018 09:31:27 +0000 (09:31 +0000)]
Move nsmb.conf to lib/libsmb/

This leverages CONFS to do the install

Approved by: re (pkgbase, blanket), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17243

5 years agoMove opieaccess to lib/libopie/
Brad Davis [Thu, 20 Sep 2018 09:26:10 +0000 (09:26 +0000)]
Move opieaccess to lib/libopie/

This leverages CONFS to do the install

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17241

5 years agoMove hosts.lpd and printcap to usr.sbin/lpr/lpd/
Brad Davis [Thu, 20 Sep 2018 09:21:05 +0000 (09:21 +0000)]
Move hosts.lpd and printcap to usr.sbin/lpr/lpd/

This leverages CONFS to handle the install

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17238

5 years agoimport mandoc 1.14.1
Baptiste Daroussin [Thu, 20 Sep 2018 07:33:14 +0000 (07:33 +0000)]
import mandoc 1.14.1

5 years agoVarious fixes for floating point on RISC-V.
John Baldwin [Wed, 19 Sep 2018 23:45:18 +0000 (23:45 +0000)]
Various fixes for floating point on RISC-V.

- Explicitly load an empty initial state into FP registers when taking
  the fault on the first FP instruction in a thread.  Setting
  SSTATE.FS to INITIAL is just a marker to let context switch restore
  code know that it can load FP registers with zeroes instead of
  memory loads.  It does not imply that the hardware will reset all
  registers to zero on first access.  In addition, set the state to
  CLEAN instead of INITIAL after the first FP instruction.
  cpu_switch() doesn't do anything for INITIAL and only restores from
  the pcb if the state is CLEAN.  We could perhaps change cpu_switch
  to call fpe_state_clear if the state was INITIAL and leave SSTATE.FS
  set to INITIAL instead of CLEAN after the first FP instruction.
  However, adding this complexity to cpu_switch() doesn't seem worth
  the supposed gain.
- Only save the current FPU registers in fill_fpregs() if the request
  is made to save the current thread's registers.  Previously if a
  debugger requested FP registers via ptrace() it was getting a copy
  of the debugger's FP registers rather than the debugee's.
- Zero the entire FP register set structure returned for ptrace() if a
  thread hasn't used FP registers rather than leaking garbage in the
  fp_fcsr field.
- If a debugger writes FP registers via ptrace(), always mark the pcb
  as having valid FP registers and set SSTATUS.FS_MASK to CLEAN so
  that the registers will be restored when the debugged thread
  resumes.
- Be more explicit about clearing the SSTATUS.FS field before setting
  it to CLEAN on the first FP instruction trap.

Submitted by: br, markj
Approved by: re (rgrimes)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17141

5 years agoClear all of the VFP state in fill_fpregs().
John Baldwin [Wed, 19 Sep 2018 22:53:52 +0000 (22:53 +0000)]
Clear all of the VFP state in fill_fpregs().

Zero the entire FP register set structure returned for ptrace() if a
thread hasn't used FP registers rather than leaking garbage in the
fp_sr and fp_cr fields.

Reviewed by: emaste, andrew
Approved by: re (rgrimes)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17140

5 years agoopenssh: rename local macro to avoid OpenSSL 1.1.1 conflict
Ed Maste [Wed, 19 Sep 2018 20:52:47 +0000 (20:52 +0000)]
openssh: rename local macro to avoid OpenSSL 1.1.1 conflict

Local changes introduced an OPENSSH_VERSION macro, but this conflicts
with a macro of the same name introduced with OepnsSL 1.1.1

Reviewed by: des
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

5 years agoConvert x86 cache invalidation functions to ifuncs.
Konstantin Belousov [Wed, 19 Sep 2018 19:35:02 +0000 (19:35 +0000)]
Convert x86 cache invalidation functions to ifuncs.

This simplifies the runtime logic and reduces the number of
runtime-constant branches.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D16736

5 years agoMove kernel vmem arena initialization to vm_kern.c.
Mark Johnston [Wed, 19 Sep 2018 19:13:43 +0000 (19:13 +0000)]
Move kernel vmem arena initialization to vm_kern.c.

This keeps the initialization coupled together with the kmem_* KPI
implementation, which is the main user of these arenas.

No functional change intended.

Reviewed by: alc
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17247

5 years agoUpdate udp6_output() inp locking to avoid concurrency issues with
Bjoern A. Zeeb [Wed, 19 Sep 2018 18:49:37 +0000 (18:49 +0000)]
Update udp6_output() inp locking to avoid concurrency issues with
route cache updates.

Bring over locking changes applied to udp_output() for the route cache
in r297225 and fixed in r306559 which achieve multiple things:
(1) acquire an exclusive inp lock earlier depending on the expected
    conditions; we add a comment explaining this in udp6,
(2) having acquired the exclusive lock earlier eliminates a slight
    possible chance for a race condition which was present in v4 for
    multiple years as well and is now gone, and
(3) only pass the inp_route6 to ip6_output() if we are holding an
    exclusive inp lock, so that possible route cache updates in case
    of routing table generation number changes can happen safely.
In addition this change (as the legacy IP counterpart) decomposes the
tracking of inp and pcbinfo lock and adds extra assertions, that the
two together are acquired correctly.

PR: 230950
Reviewed by: karels, markj
Approved by: re (gjb)
Pointyhat to: bz (for completely missing this bit)
Differential Revision: https://reviews.freebsd.org/D17230

5 years agoConvert i386 NPX hardware context save methods to ifuncs.
Konstantin Belousov [Wed, 19 Sep 2018 16:37:43 +0000 (16:37 +0000)]
Convert i386 NPX hardware context save methods to ifuncs.

Since ifunc-capable linker is now required on i386, bring this code in
line with the amd64 counterpart.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D16736

5 years agovm: check for empty kstack cache before locking
Mateusz Guzik [Wed, 19 Sep 2018 16:02:33 +0000 (16:02 +0000)]
vm: check for empty kstack cache before locking

The current cache logic checks the total number of stacks in the kernel,
which even on small boxes significantly exceeds the 128 limit (e.g. an
8-way box with zfs has almost 800 stacks allocated).

Stacks are cached earlier for each main thread.

As a result the code is rarely executed, but when it is then (on boxes like
the above) it always fails. Since there are no provisions made for NUMA and
release time is approaching, just do a quick check to avoid acquiring the
lock.

Approved by: re (kib)

5 years agoamd64 pmap: remove tautological assert.
Konstantin Belousov [Wed, 19 Sep 2018 15:39:16 +0000 (15:39 +0000)]
amd64 pmap: remove tautological assert.

pm_pcid is unsigned.

Reviewed by: cem, markj
CID: 1395727
Noted by: cem
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D17235

5 years agoMove remote & phones to usr.bin/tip/tip/
Brad Davis [Wed, 19 Sep 2018 14:56:53 +0000 (14:56 +0000)]
Move remote & phones to usr.bin/tip/tip/

Approved by: re (blanket, pkgbase), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17219

5 years agoFix ZFS VFS op quotactl to follow busy protocol.
Konstantin Belousov [Wed, 19 Sep 2018 14:38:01 +0000 (14:38 +0000)]
Fix ZFS VFS op quotactl to follow busy protocol.

Reviewed by: avg, mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17208

5 years agoFix state of dquot-less vnodes after failed quotaoff.
Konstantin Belousov [Wed, 19 Sep 2018 14:36:57 +0000 (14:36 +0000)]
Fix state of dquot-less vnodes after failed quotaoff.

UFS quotaoff iterates over all mp vnodes, and derefences and clears
the pointers to corresponding dquots. If SU work items transiently
reference some of dquots,quotaoff() would eventually fail, but all
processed vnodes are already stripped from dquots.  The state is
problematic, since quotas are left enabled, but there is no dquots
where blocks and inodes can be accounted.  The result is assertion
failures and NULL pointer dereferences.

Fix it by suspending writes around quotaoff() call.  Since the
filesystem is synced, no dandling references to dquots from SU
workitems can left behind, which means that quotaoff succeeds.

The complication there is that quotaoff VFS op is performed with the
mount point busied, while to suspend, we need to start write on the
mp.  If vn_start_write() is called on busied mp, system might deadlock
against parallel unmount request.  Handle this by unbusy-ing mp before
starting write, which in turn requires changing the quotaoff()
interface to return with the mount point not busied, same as was done
for quotaon().

Reviewed by: mckusick
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17208

5 years agoUpdate vendor/libarchive/dist to git 0cda60af13e709e670af90553b2271bf194e7ccd
Martin Matuska [Wed, 19 Sep 2018 10:26:45 +0000 (10:26 +0000)]
Update vendor/libarchive/dist to git 0cda60af13e709e670af90553b2271bf194e7ccd

Relevant vendor changes:
  PR #1019: Add allocation check for the zip_entry struct
  Oss-Fuzz #10192: Handle whitespace-only ACL fields correctly

5 years agoMove regdomain.xml to lib/lib80211/
Brad Davis [Wed, 19 Sep 2018 09:29:06 +0000 (09:29 +0000)]
Move regdomain.xml to lib/lib80211/

This leverages CONFS to handle the install.  lib80211 was picked because it is
where this file is actually used from.

Approved by: re (blanket, pkgbase), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17229

5 years agocxgbetool(8): Clarify the meaning of the "queue" parameter used to steer
Navdeep Parhar [Tue, 18 Sep 2018 22:41:30 +0000 (22:41 +0000)]
cxgbetool(8): Clarify the meaning of the "queue" parameter used to steer
traffic to a particular queue.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Approved by: re@ (kib@)

5 years agocxgbe(4): Enable TXRTLMT by default when the feature is available in the
Navdeep Parhar [Tue, 18 Sep 2018 21:34:37 +0000 (21:34 +0000)]
cxgbe(4): Enable TXRTLMT by default when the feature is available in the
kernel (options RATELIMIT) and provisioned in the driver's configuration
file (nethofld > 0).

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

5 years agoMove libalias.conf to lib/libalias/libalias/
Brad Davis [Tue, 18 Sep 2018 20:54:37 +0000 (20:54 +0000)]
Move libalias.conf to lib/libalias/libalias/

This leveages CONFS to handle the install.

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17218

5 years agoMove disktab to sbin/bsdlabel/
Brad Davis [Tue, 18 Sep 2018 20:52:24 +0000 (20:52 +0000)]
Move disktab to sbin/bsdlabel/

This leverages CONFS to handle the install.

Approved by: re (blanket, pkgbase), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17217

5 years agoMove install of locate.rc to usr.bin/locate/locate/
Brad Davis [Tue, 18 Sep 2018 20:50:07 +0000 (20:50 +0000)]
Move install of locate.rc to usr.bin/locate/locate/

This leverages CONFS to handle the install and purges an old comment.

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17215

5 years agoMove mail.rc install to usr.bin/mail.
Brad Davis [Tue, 18 Sep 2018 20:47:06 +0000 (20:47 +0000)]
Move mail.rc install to usr.bin/mail.

This leverages CONFS to do the install

Approved by: re (blanket, pkgbase), bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D17216

5 years agoOnly update the domain cursor once in keg_fetch_slab().
Mark Johnston [Tue, 18 Sep 2018 17:51:45 +0000 (17:51 +0000)]
Only update the domain cursor once in keg_fetch_slab().

We drop the keg lock when we go to actually allocate the slab, allowing
other threads to advance the cursor.  This can cause us to exit the
round-robin loop before having attempted allocations from all domains,
resulting in a hang during a subsequent blocking allocation attempt from
a depleted domain.

Reported and tested by: Jan Bramkamp <crest@bultmann.eu>
Reviewed by: alc, cem
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17209

5 years agoUpdate the pkg-stage.sh script used to populate packages on the
Glen Barber [Tue, 18 Sep 2018 16:57:04 +0000 (16:57 +0000)]
Update the pkg-stage.sh script used to populate packages on the
dvd1.iso installation medium from including KDE4 to KDE5, as the
KDE4-based ports have been marked as deprecated in the Ports
Collection.

MFC after: 3 days
Approved by: re (rgrimes)
Sponsored by: The FreeBSD Foundation

5 years agoRegen after r338752.
Brooks Davis [Tue, 18 Sep 2018 16:16:58 +0000 (16:16 +0000)]
Regen after r338752.

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

5 years agoOnly enable HyperV support by default on x86.
Brooks Davis [Tue, 18 Sep 2018 16:06:24 +0000 (16:06 +0000)]
Only enable HyperV support by default on x86.

Without this we get spurious output during boot as we try to run
nonexistant HyperV scripts on non-x86 models.

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

5 years agoFix C11 and POSIX 1003.1b-1993 compliance in time.h
Brooks Davis [Tue, 18 Sep 2018 15:31:24 +0000 (15:31 +0000)]
Fix C11 and POSIX 1003.1b-1993 compliance in time.h

Only expose timespec_get in C11, C++17, or BSD code.  Always define
struct timespect if defining timespec_get.

PR: 231425
Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17174

5 years agoRequire ifunc-capable linker for i386
Ed Maste [Tue, 18 Sep 2018 15:01:21 +0000 (15:01 +0000)]
Require ifunc-capable linker for i386

The amd64 kernel started using ifunc for a variety of functions with
arch-specific implementations, and we would like to make use of the
same functionality on i386 and as much as possible avoid divergence
between i386 and amd64.  In particular, future changes for security
improvements and mitigations may rely on ifunc support.

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