Commit Graph

240803 Commits

Author SHA1 Message Date
Tycho Nightingale
a8d9ee9c50 ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc and
crc-copy modes.

Reviewed by:	cem
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19780
2019-04-02 19:06:25 +00:00
Tycho Nightingale
9708c3a2b8 DMAR driver assumes all physical addresses are backed by a fully
initialized struct vm_page.

Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19753
2019-04-02 18:50:49 +00:00
Navdeep Parhar
1b3fc371b7 cxgbe(4): Add a flag to indicate that bits in interrupt cause but not in
interrupt enable are not fatal.

The firmware sets up all the interrupt enables based on run time
configuration, which means the information in the enables is more
accurate than what's compiled into the driver.  This change also allows
the fatal bits to be updated without any changes in the driver in some
cases.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2019-04-02 18:50:33 +00:00
Dimitry Andric
c26e2e37aa Fix regression in top(1) after r344381, causing informational messages
to no longer be displayed.  This was because the reimplementation of
setup_buffer() did not copy the previous contents into any reallocated
buffer.

Reported by:	James Wright <james.wright@jigsawdezign.com>
PR:		236947
MFC after:	3 days
2019-04-02 18:01:54 +00:00
Dimitry Andric
d705ee60a2 Pull in r357362 from upstream clang trunk (by David Chisnall):
[objc-gnustep] Use .init_array not .ctors when requested.

  This doesn't make a difference most of the time but FreeBSD/ARM
  doesn't run anything in the .ctors array.

This should help with updating the libobjc2 port for armv7.

Requested by:	theraven
Upstream PR:	https://github.com/gnustep/libobjc2/issues/83
MFC after:	3 days
2019-04-02 17:51:28 +00:00
Alexander Motin
99bad9ca9a Unify SCSI_STATUS_BUSY retry handling with other cases.
- Do not retry if periph was invalidated.
 - Do not decrement retry_count if already zero.
 - Report action_string when applicable.

MFC after:	2 weeks
2019-04-02 14:46:10 +00:00
Michael Reifenberger
4551884596 systat -zarc to display disk activities like -vm
PR:		213310
Submitted by:	ota
MFH:		4 weeks
Differential Revision:	https://reviews.freebsd.org/D18726
2019-04-02 14:01:03 +00:00
Konstantin Belousov
5c4ce6fac2 tmpfs: plug holes on rw->ro mount update.
In particular:
- suspend the mount around vflush() to avoid new writes come after the
  vnode is processed;
- flush pending metadata updates (mostly node times);
- remap all rw mappings of files from the mount into ro.

It is not clear to me how to handle writeable mappings on rw->ro for
tmpfs best.  Other filesystems, which use vnode vm object, call
vgone() on vnodes with writers, which sets the vm object type to
OBJT_DEAD, and keep the resident pages and installed ptes as is.  In
particular, the existing mappings continue to work as far as
application only accesses resident pages, but changes are not flushed
to file.

For tmpfs the vm object of VREG vnodes also serves as the data pages
container, giving single copy of the mapped pages, so it cannot be set
to OBJT_DEAD.  Alternatives for making rw mappings ro could be either
invalidating them at all, or marking as CoW.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19737
2019-04-02 13:59:04 +00:00
Konstantin Belousov
e1cdc30faa tmpfs: ignore tmpfs_set_status() if mount point is read-only.
In particular, this fixes atimes still changing for ro tmpfs.
tmpfs_set_status() gains tmpfs_mount * argument.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19737
2019-04-02 13:49:32 +00:00
Konstantin Belousov
ae26575394 Block creation of the new nodes for read-only tmpfs mounts.
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19737
2019-04-02 13:41:26 +00:00
Andrey V. Elsukov
8581fc9ad5 Create 64bit mibII counters for all interfaces.
PR:		157015
Obtained from:	Yandex LLC
MFC after:	1 month
2019-04-02 13:38:00 +00:00
Andrey V. Elsukov
04d1781439 Add IPv6 transport for bsnmp.
This patch adds a new table begemotSnmpdTransInetTable that uses the
InetAddressType textual convention and can be used to create listening
ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
future extension beyond UDP by adding a protocol identifier to the table
index. In order to support this gensnmptree had to be modified.

Submitted by:   harti
MFC after:      1 month
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D16654
2019-04-02 12:50:01 +00:00
Ruslan Bukin
a8cb655d2e o Grab the number of devices supported by PLIC from FDT.
o Fix bug in PLIC_ENABLE macro when irq >= 32.

Tested on the real hardware, which is HiFive Unleashed board.

Thanks to SiFive, Inc. for the board provided.

Reviewed by:	markj
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D19775
2019-04-02 12:02:35 +00:00
Justin Hibbits
95a1f0e81c ipmi: Fixes for ipmi_opal(powernv)
* Crank the OPAL state machine during the receive loop, to make sure the
  pollers are executed
* Add a proper detach function, so the module can be unloaded and reloaded
  at runtime.

It still doesn't reliably work 100% of the time on POWER9, and it appears
timing and/or cache related.  It may work on POWER8 now.

MFC after:	2 weeks
2019-04-02 04:12:06 +00:00
Justin Hibbits
fbf7737949 powernv: Port OPAL asynchronous framework to use the new message framework
Since OPAL_GET_MSG does not discriminate between message types, asynchronous
completion events may be received in the OPAL_GET_MSG call, which dequeues
them from the list, thus preventing OPAL_CHECK_ASYNC_COMPLETION from
succeeding.  Handle this case by integrating with the messaging framework.
2019-04-02 04:02:57 +00:00
Justin Hibbits
911a92603e powerpc/powernv: Add OPAL heartbeat thread
Summary:
OPAL needs to be kicked periodically in order for the firmware to make
progress on its tasks.  To do so, create a heartbeat thread to perform this task
every N milliseconds, defined by the device tree.  This task is also a central
location to handle all messages received from OPAL.

Reviewed By: luporl
Differential Revision: https://reviews.freebsd.org/D19743
2019-04-02 04:00:01 +00:00
Enji Cooper
8ac5aef8f3 Integrate capsicum-test into the FreeBSD test suite
This change takes capsicum-test from upstream and applies some local changes to make the
tests work on FreeBSD when executed via Kyua.

The local modifications are as follows:
1. Make `OpenatTest.WithFlag` pass with the new dot-dot lookup behavior in FreeBSD 12.x+.
2. capsicum-test references a set of helper binaries: `mini-me`, `mini-me.noexec`, and
   `mini-me.setuid`, as part of the execve/fexecve tests, via execve, fexecve, and open.
   It achieves this upstream by assuming `mini-me*` is in the current directory, however,
   in order for Kyua to execute `capsicum-test`, it needs to provide a full path to
   `mini-me*`. In order to achieve this, I made `capsicum-test` cache the executable's
   path from argv[0] in main(..) and use the cached value to compute the path to
   `mini-me*` as part of the execve/fexecve testcases.
3. The capsicum-test test suite assumes that it's always being run on CAPABILITIES enabled
   kernels. However, there's a chance that the test will be run on a host without a
   CAPABILITIES enabled kernel, so we must check for the support before running the tests.
   The way to achieve this is to add the relevant `feature_present("security_capabilities")`
   check to SetupEnvironment::SetUp() and skip the tests when the support is not available.
   While here, add a check for `kern.trap_enotcap` being enabled. As noted by markj@ in
   https://github.com/google/capsicum-test/issues/23, this sysctl being enabled can trigger
   non-deterministic failures. Therefore, the tests should be skipped if this sysctl is
   enabled.

All local changes have been submitted to the capsicum-test project
(https://github.com/google/capsicum-test) and are in various stages of review.
Please see the following pull requests for more details:
1. https://github.com/google/capsicum-test/pull/35
2. https://github.com/google/capsicum-test/pull/41
3. https://github.com/google/capsicum-test/pull/42

Reviewed by:	asomers
Discussed with:	emaste, markj
Approved by:	emaste (mentor)
MFC after:	2 months
Differential Revision: https://reviews.freebsd.org/D19758
2019-04-01 21:24:50 +00:00
Ed Maste
14bffecf74 Fix gdb/kgdb build under WITH_PIE
Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Reported by:	David E. Cross, on twitter
Sponsored by:	The FreeBSD Foundation
2019-04-01 19:19:51 +00:00
Tycho Nightingale
b2bbb74489 Devices behind downstream bridges should still get DMAR protection.
Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19717
2019-04-01 19:08:05 +00:00
Ilya Bakulin
1a22fb3f5e Refactor error handling
There is some code duplication in error handling paths in a few functions.
Create a function for printing such errors in human-readable way and get rid
of duplicates.

Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D15912
2019-04-01 18:54:15 +00:00
Ilya Bakulin
5d20e65174 Use information about max data size that the controller is able to operate
Using DFLTPHYS/MAXPHYS is not always OK, instead make it possible for the
controller driver to provide maximum data size to MMCCAM, and use it there.

The old stack already does this.

Reviewed by:	manu
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D15892
2019-04-01 18:49:39 +00:00
Enji Cooper
e9e2022e74 Import proof-of-concept for handling GTEST_SKIP() in Environment::SetUp
Per the upstream pull-request [1]:

```
  gtest prior to this change would completely ignore `GTEST_SKIP()` if
  called in `Environment::SetUp()`, instead of bailing out early, unlike
  `Test::SetUp()`, which would cause the tests themselves to be skipped.
  The only way (prior to this change) to skip the tests would be to
  trigger a fatal error via `GTEST_FAIL()`.

  Desirable behavior, in this case, when dealing with
  `Environment::SetUp()` is to check for prerequisites on a system
  (example, kernel supports a particular featureset, e.g., capsicum), and
  skip the tests. The alternatives prior to this change would be
  undesirable:

  - Failing sends the wrong message to the test user, as the result of the
    tests is indeterminate, not failed.
  - Having to add per-test class abstractions that override `SetUp()` to
    test for the capsicum feature set, then skip all of the tests in their
    respective SetUp fixtures, would be a lot of human and computational
    work; checking for the feature would need to be done for all of the
    tests, instead of once for all of the tests.

  For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`,
  by not executing the testcases, is the most desirable solution.

  In order to properly diagnose what happened when running the tests if
  they are skipped, print out the diagnostics in an ad hoc manner.

  Update the documentation to note this change and integrate a new test,
  gtest_skip_in_environment_setup_test, into the test suite.

  This change addresses #2189.

  Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
```

The goal with my merging in this change is to avoid requiring extensive
refactoring/retesting of test suites when ensuring prerequisites are met,
e.g., checking for a CAPABILITIES-enabled kernel before running capsicum-test
(see D19758 for more details).

The proof-of-concept is being imported before accepted by the upstream
project due to the fact that the upstream project is undergoing a potential
development freeze and the maintainers aren't responding to my PR.

1. https://github.com/google/googletest/pull/2203

Reported by:	asomers (https://github.com/google/googletest/issues/2189)
Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D19765
2019-04-01 18:07:48 +00:00
Kyle Evans
e1ee62302a libbe: Fix zfs_is_mounted check w/ snapshots
'be_destroy' can destroy a boot environment (by name) or a given snapshot.
If the target to be destroyed is a dataset, check if it's mounted. We don't
want to check if the origin dataset is mounted when destroying a snapshot.

PR:		236043
Submitted by:	Rob Fairbanks <rob.fx907 gmail com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D19650
2019-04-01 17:44:20 +00:00
Olivier Cochard
8f462da4f3 Fix and simplify code by using ATF_REQUIRE_FEATURE macro
PR:		236857
Reviewed by:	asomers, ngie
Approved by:	emaste
MFC after:	 1 month
Sponsored by:	Netflix
2019-04-01 14:21:32 +00:00
Andrey V. Elsukov
e95923a228 Correct a port number assignment.
PR:		236930
MFC after:	1 week
2019-04-01 12:14:45 +00:00
Kirk McKusick
7e1a6d4777 When using the force option to shut down a memory-disk device,
I/O operations already in its queue were not being properly drained.
The GEOM framework does the queue draining, but the device driver
needs to wait for the draining to happen. The waiting is done by
adding a g_md_providergone() function to wait for the I/O operations
to finish up.

It is likely that every GEOM provider that implements orphaning
attached GEOM consumers needs to use the "providergone" mechanism
for this same reason, but some of them do not do so. Apparently
Kenneth Merry (ken@) added the drain for just such races, but he
missed adding it to some of the device drivers that needed it.

Submitted by: Chuck Silvers
Reviewed by:  imp
Tested by:    Chuck Silvers
MFC after:    1 week
Sponsored by: Netflix
2019-03-31 21:34:58 +00:00
Bjoern A. Zeeb
fe2825be6f Improve debugging options in bcm2835_sdhci.c
Similar to bcm2835_sdhost.c add a TUNABLE and SYSCTL to selectively
turn on debugging printfs if debugging is turned on at compile time.

MFC after:		2 weeks
Sponsored by:		The FreeBSD Foundation
Reviewed by:		gonzo, andrew
Differential Revision:	https://reviews.freebsd.org/D19745
2019-03-31 19:27:44 +00:00
Andriy Voskoboinyk
1ea35ead5a run(4): properly set F_DATAPAD radiotap flag if frame has padding between
frame header and data.

This will fix 'Mysterious OLPC stuff' for received frames and wrong
CCMP / TKIP / data decoding for transmitted frames in net/wireshark
dissector.

While here, drop unneeded comment - net80211 handles padding requirements
for Tx & Rx without driver adjustment.

Tested with D-Link DWA-140 rev B3, STA mode.

MFC after:	1 week
2019-03-31 14:18:02 +00:00
Andriy Voskoboinyk
e4c17012d0 run(4): do not clear PROTECTED bit if frame was not decrypted by NIC.
Tested with D-Link DWA-140 rev B3, STA / MONITOR modes.

MFC after:	1 week
2019-03-31 13:41:20 +00:00
Andriy Voskoboinyk
39abb4482d uath(4), urtw(4): restart driver if device does not respond after Tx request
MFC after:	1 week
2019-03-31 09:52:36 +00:00
Conrad Meyer
c849485d90 random(4): Attempt to persist entropy promptly
The goal of saving entropy in Fortuna is two-fold: (1) to provide early
availability of the random device (unblocking) on next boot; and (2), to
have known, high-quality entropy available for that initial seed.  We know
it is high quality because it's output taken from Fortuna.

The FS&K paper makes it clear that Fortuna unblocks when enough bits have
been input that the output //may// be safely seeded.  But they emphasize
that the quality of various entropy sources is unknown, and a saved entropy
file is essential for both availability and ensuring initial
unpredictability.

In FreeBSD we persist entropy using two mechanisms:

1. The /etc/rc.d/random shutdown() function, which is used for ordinary
   shutdowns and reboots; and,

2. A cron job that runs every dozen minutes or so to persist new entropy, in
   case the system suffers from power loss or a crash (bypassing the
   ordinary shutdown path).

Filesystems are free to cache dirty data indefinitely, with arbitrary flush
policy.  Fsync must be used to ensure the data is persisted, especially for
the cron job save-entropy, whose entire goal is power loss and crash safe
entropy persistence.

Ordinary shutdown may not need the fsync because unmount should flush out
the dirty entropy file shortly afterwards.  But it is always possible power
loss or crash occurs during the short window after rc.d/random shutdown runs
and before the filesystem is unmounted, so the additional fsync there seems
harmless.

PR:		230876
Reviewed by:	delphij, markj, markm
Approved by:	secteam (delphij)
Differential Revision:	https://reviews.freebsd.org/D19742
2019-03-31 04:57:50 +00:00
Jason A. Harmening
f0645b3a06 freebsd32: fix padding of computed control message length for recvmsg()
Each control message region must be aligned on a 4-byte boundary on 32-bit
architectures. The 32-bit compat shim for recvmsg() gets the actual layout
right, but doesn't pad the payload length when computing msg_controllen for
the output message header. If a control message contains an unaligned
payload, such as the 1-byte TTL field in the example attached to PR 236737,
this can produce control message payload boundaries that extend beyond
the boundary reported by msg_controllen.

PR:	236737
Reported by:	Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D19768
2019-03-30 23:43:58 +00:00
Mark Johnston
ca1163bd5f Do not perform DAD on stf(4) interfaces.
stf(4) interfaces are not multicast-capable so they can't perform DAD.
They also did not set IFF_DRV_RUNNING when an address was assigned, so
the logic in nd6_timer() would periodically flag such an address as
tentative, resulting in interface flapping.

Fix the problem by setting IFF_DRV_RUNNING when an address is assigned,
and do some related cleanup:
- In in6if_do_dad(), remove a redundant check for !UP || !RUNNING.
  There is only one caller in the tree, and it only looks at whether
  the return value is non-zero.
- Have in6if_do_dad() return false if the interface is not
  multicast-capable.
- Set ND6_IFF_NO_DAD when an address is assigned to an stf(4) interface
  and the interface goes UP as a result. Note that this is not
  sufficient to fix the problem because the new address is marked as
  tentative and DAD is started before in6_ifattach() is called.
  However, setting no_dad is formally correct.
- Change nd6_timer() to not flag addresses as tentative if no_dad is
  set.

This is based on a patch from Viktor Dukhovni.

Reported by:	Viktor Dukhovni <ietf-dane@dukhovni.org>
Reviewed by:	ae
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19751
2019-03-30 18:00:44 +00:00
Enji Cooper
1c50bec8ef Allow programs to set NO_SHARED on a per-PROG basis
This is particularly useful when installing programs for tests that need to be
linked statically, e.g., mini-me from capsicum-test, which is linked statically
to avoid the dynamic library lookup in the upstream project.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19756
2019-03-30 17:23:15 +00:00
Konstantin Belousov
be7808dca3 Fix branding after r345661.
In particular, elf32 FreeBSD binaries were not executed on LP64 hosts.
The interp_name_len value should account for the nul terminator.  This
is needed for strncmp()s in brand checking code to work.

Reported by:	andreast
Sponsored by:	The FreeBSD Foundation
MFC after:	12 days (together with r345661)
2019-03-30 16:58:51 +00:00
Andriy Voskoboinyk
cb5d2742ff urtw(4): export TSF timestamp for received frames via radiotap
Tested with Netgear WG111 v3 (RTL8187B), STA mode.

MFC after:	1 week
2019-03-30 09:24:06 +00:00
Pawel Jakub Dawidek
af4f9e5f00 If the autoexpand pool property is turned on and vdev is healthy try to
expand the pool automatically when we detect underlying GEOM provider
size change.

Obtained from:	Fudo Security
Tested in:	AWS
2019-03-30 07:29:20 +00:00
Pawel Jakub Dawidek
e6b0d5eb9f Introduce new event SIZECHANGE within GEOM system to inform about GEOM
providers mediasize changes.

While here, use GEOM nomenclature to describe providers instead of calling
them device nodes.

Obtained from:	Fudo Security
Tested in:	AWS
2019-03-30 07:24:34 +00:00
Pawel Jakub Dawidek
e55624c605 Implement support for online disk capacity changes.
Obtained from:	Fudo Security
Tested in:	AWS
2019-03-30 07:20:28 +00:00
Enji Cooper
b89cf12cc6 PROG_OVERRIDE_VARS should override default values if specified
The behavior prior to this change would not override default values if set in
`bsd.own.mk`, or (in the more general case) globally before `bsd.progs.mk` was
included. This affected `bsd.test.mk` as well, since it consumes
`bsd.progs.mk`.

Some examples of this failing behavior are as follows:

* `BINMODE` defaults to 0555 per `bsd.own.mk`. If someone wanted to set the
  `BINMODE` to `NOBINMODE` (0444) for `prog`, for example, like
  `BINMODE.prog= ${NOBINMODE}`, `bsd.progs.mk` would not honor the per-PROG
  setting.
* An application, `prog`, does not build at `WARNS?= 6`. Before this change,
  setting to a lower `WARNS` value, e.g., `WARNS.prog= 3`, would have been
  impossible, requiring that `prog` be built from another directory,
  the global `WARNS` be lowered, or a per-PROG value needing to be set
  across the board. None of the above workarounds is desirable.

This change unbreaks variables defined in `PROG_OVERRIDE_VARS` which have
defaults set before `bsd.progs.mk` is included, by setting them to their
defined values if set on a per-PROG basis.

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D19755
2019-03-30 00:57:33 +00:00
Enji Cooper
33d7e3ee78 Merge the following changes from the capsicum-test project [1]
Log:
```
commit feb47278d7cffa8cf4bc8c8ff78047126fa41e82 (HEAD -> dev, origin/dev, origin/HEAD)
Author: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
Date:   Fri Mar 22 10:51:04 2019 -0700

    Remove `FAIL` macro use for non-x86 architectures when testing `sysarch(2)` (#38)

    `FAIL()` does not support being called in the form noted in the test,
    which causes a test failure on non-x86 architectures.

    The alternatives (use `ADD_TEST_FAILURE()` or `GTEST_SKIP()`) would be
    misleading (in both cases), and in the case of `GTEST_SKIP()` is unavailable
    on the version of googletest packaged with capsicum-test.

    Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>

commit 32ad0f3e4c11be7f7463d40eef8d4a78ac9f61a5
Author: Enji Cooper <yaneurabeya@gmail.com>
Date:   Fri Mar 15 20:01:56 2019 -0700

    Fix `-Wunused-parameter` issues

    Remove variable declarations from functions/methods where the variable
    is not required.

    Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>

commit 9437b4c550110200ef190ac39fb26c1d8fc55d9a
Author: Enji Cooper <yaneurabeya@gmail.com>
Date:   Fri Mar 15 19:59:00 2019 -0700

    Fix `-Wshadow` issues with `EXPECT_OPEN_OK(..)` macro

    * Wrap in do-while(0) block to avoid variable shadowing issue with
      multiple calls in the same function.
    * Prefix block local variables with `_` to try and avoid variable
      name clashes with values local to test methods.

    Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>

commit adf4a21a233b5da5cac440f4006e258ffba09510
Author: Enji Cooper <yaneurabeya@gmail.com>
Date:   Fri Mar 15 19:55:00 2019 -0700

    Fix `-Wmissing-variable-declarations` issue with `known_rights` global

    Staticize it since it is only used in the file.

    Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
```

This merges a number of the outstanding changes made locally to
^/projects/capsicum-test that were accepted into the upstream project.

The sync was done like so:
```
curl -L https://github.com/google/capsicum-test/tarball/dd7eac98c0cf | tar --strip-components=1 -xvzf - -C dist/
rm -Rf dist/*/
```

1. https://github.com/google/capsicum-test
2019-03-29 21:41:14 +00:00
Navdeep Parhar
7893235ff0 tcp_autorcvbuf_inc was removed in r344433.
Discussed with:	tuexen@
Sponsored by:	Chelsio Communications
2019-03-29 21:39:47 +00:00
Jung-uk Kim
278f0de60d Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
John Baldwin
43b65e3c98 Don't check the inp socket pointer in in_pcboutput_eagain.
Reviewed by:	hps (by saying it was ok to be removed)
MFC after:	1 month
Sponsored by:	Netflix
2019-03-29 19:47:42 +00:00
Emmanuel Vadot
34f71e304e arm: allwinner: clk: Fix nm_recalc
When comparing best frequencies use the absolute value.
If we do not do that we end up choosing an always lower value than
the best one if the exact freq cannot be met.

MFC after:	2 weeks
2019-03-29 19:40:04 +00:00
Enji Cooper
0eb97cca9f Allow users to override CSTD/CXXSTD on a per-prog basis
The current logic for CSTD/CXXSTD requires homogenity as far as the
supported C/C++ standards, which is a sensible default. However, when
dealing with differing versions of C++, some code may compile with C++11, but
not C++17 (for instance). So in order to avoid having people convert over their
code to the new standard, give the users the ability to specify the standard on
a per-program basis.

This will allow a user to override the supporting standard for a set of
programs, mixing C++11 with C++14 (for instance).

Reviewed by:	asomers
Apprved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345708
Differential Revision: https://reviews.freebsd.org/D19738
2019-03-29 18:49:08 +00:00
Enji Cooper
e8067928ff Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:45:27 +00:00
Enji Cooper
bdbf3440ce Revert r345706: the third time will be the charm
When a review is closed via Phabricator it updates the patch attached to the
review. I downloaded the raw patch from Phabricator, applied it, and repeated
my mistake from r345704 by accident mixing content from D19732 and D19738.

For my own personal sanity, I will try not to mix reviews like this in the
future.

MFC after:	1 month
MFC with:	r345706
Approved by:	emaste (mentor, implicit)
2019-03-29 18:43:46 +00:00
Enji Cooper
760b1a815b Standardize -std=c++* as CXXSTD`
CXXSTD was added as the C++ analogue to CSTD.

CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
otherwise for older versions of g++.

This change standardizes the CXXSTD variable, originally added to
googletest.test.inc.mk as part of r345203.

As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.

Notes:

This value is not sanity checked in bsd.sys.mk, however, given the two
most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
likely to work with both toolchains. This method will be refined in the future
to support more variants of C++, as not all versions of clang++ and g++ (for
instance) support C++14, C++17, etc.

Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
Example:

Before this commit:
```
CXXFLAGS+=	-std=c++14
```

After this commit:
```
CXXSTD=	c++14
```

Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 month
MFC with:	r345203, r345704, r345705
Relnotes:	yes
Tested with:	make tinderbox
Differential Revision:	https://reviews.freebsd.org/D19732
2019-03-29 18:31:48 +00:00
Enji Cooper
752cabaa1c Revert r345704
I accidentally committed code from two reviews. I will reintroduce the code to
bsd.progs.mk as part of a separate commit from r345704.

Approved by:	emaste (mentor, implicit)
MFC after:	2 months
MFC with:	r345704
2019-03-29 18:16:33 +00:00