]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFhead@r344996
ngie [Mon, 11 Mar 2019 03:02:58 +0000 (03:02 +0000)]
MFhead@r344996

5 years agoExpect `WhenDynamicCastToTest.AmbiguousCast` to fail on FreeBSD
ngie [Mon, 11 Mar 2019 02:57:00 +0000 (02:57 +0000)]
Expect `WhenDynamicCastToTest.AmbiguousCast` to fail on FreeBSD

Casting `AmbiguousCastTypes::DerivedSub1` to `Base` currently succeeds, when
it's expected to fail.

See https://github.com/google/googletest/issues/2172 for more details.

5 years agourtw(4): add promiscuous mode callback
avos [Mon, 11 Mar 2019 02:02:04 +0000 (02:02 +0000)]
urtw(4): add promiscuous mode callback

Also, pass control frames to the host while in MONITOR mode and / or
when promiscuous mode is enabled.

Tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes.

MFC after: 2 weeks

5 years agoFix ieee80211_radiotap(9) usage in wireless drivers:
avos [Mon, 11 Mar 2019 01:27:01 +0000 (01:27 +0000)]
Fix ieee80211_radiotap(9) usage in wireless drivers:

- Alignment issues:
 * Add missing __packed attributes + padding across all drivers; in
most places there was an assumption that padding will be always
minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
padding was just missing.
 * Add __aligned(8) attribute for all Rx radiotap headers since they can
contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
just drop the attribute here. Refresh ieee80211_radiotap(9) man page
accordingly.

- Since net80211 automatically updates channel frequency / flags in
ieee80211_radiotap_chan_change() drop duplicate setup for these fields
in drivers.

Tested with Netgear WG111 v3 (urtw(4)), STA mode.

MFC after: 2 weeks

5 years agoFix crash in low memory conditions. Usual backtrace looked
trasz [Sun, 10 Mar 2019 23:05:38 +0000 (23:05 +0000)]
Fix crash in low memory conditions.  Usual backtrace looked
like this:

pqisrc_build_sgl() at pqisrc_build_sgl+0x8d/frame 0xfffffe009e8b7a00
pqisrc_build_raid_io() at pqisrc_build_raid_io+0x231/frame 0xfffffe009e8b7a40
pqisrc_build_send_io() at pqisrc_build_send_io+0x375/frame 0xfffffe009e8b7b00
pqi_request_map_helper() at pqi_request_map_helper+0x282/frame 0xfffffe009e8b7ba0
bus_dmamap_load_ccb() at bus_dmamap_load_ccb+0xd7/frame 0xfffffe009e8b7c00
pqi_map_request() at pqi_map_request+0x9b/frame 0xfffffe009e8b7c70
pqisrc_io_start() at pqisrc_io_start+0x55c/frame 0xfffffe009e8b7d50
smartpqi_cam_action() at smartpqi_cam_action+0xb8/frame 0xfffffe009e8b7de0
xpt_run_devq() at xpt_run_devq+0x30a/frame 0xfffffe009e8b7e40
xpt_action_default() at xpt_action_default+0x94b/frame 0xfffffe009e8b7e90
dastart() at dastart+0x33b/frame 0xfffffe009e8b7ee0
xpt_run_allocq() at xpt_run_allocq+0x1a2/frame 0xfffffe009e8b7f30
dastrategy() at dastrategy+0x71/frame 0xfffffe009e8b7f60
g_disk_start() at g_disk_start+0x351/frame 0xfffffe009e8b7fc0
g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b8010
g_part_start() at g_part_start+0x120/frame 0xfffffe009e8b8090
g_io_request() at g_io_request+0x3cf/frame 0xfffffe009e8b80e0
zio_vdev_io_start() at zio_vdev_io_start+0x4b2/frame 0xfffffe009e8b8140
zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8180
zio_nowait() at zio_nowait+0xc4/frame 0xfffffe009e8b81b0
vdev_queue_io_done() at vdev_queue_io_done+0x138/frame 0xfffffe009e8b81f0
zio_vdev_io_done() at zio_vdev_io_done+0x151/frame 0xfffffe009e8b8220
zio_execute() at zio_execute+0x17c/frame 0xfffffe009e8b8260
taskqueue_run_locked() at taskqueue_run_locked+0x10c/frame 0xfffffe009e8b82c0
taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 0xfffffe009e8b82f0
fork_exit() at fork_exit+0x84/frame 0xfffffe009e8b8330
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e8b8330

Reviewed by: deepak.ukey_microsemi.com, sbruno
MFC after: 2 weeks
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D19470

5 years agostyle.mdoc.5: Fix formatting issues
0mp [Sun, 10 Mar 2019 20:58:59 +0000 (20:58 +0000)]
style.mdoc.5: Fix formatting issues

Reviewed by: bcr
Approved by: bcr (doc)
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D19532

5 years agoatrtc(4): install ACPI RTC/CMOS operation region handler
wulf [Sun, 10 Mar 2019 20:19:43 +0000 (20:19 +0000)]
atrtc(4): install ACPI RTC/CMOS operation region handler

FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS
device with PnP ID PNP0B00; on some HP laptops, the absence of this handler
causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these
laptops EC _REG method queries the RTC date/time registers via ACPI
before suspending/powering off. The handler should be registered before
acpi_ec driver is loaded.

This change adds handler to access CMOS RTC operation region described in
section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI
version of atrtc(4) so it should not affect old ACPI-less i386 systems.

It is possible to disable the handler with loader tunable:
debug.acpi.disabled=atrtc

Informational debugging printf can be enabled by setting hw.acpi.verbose=1
in loader.conf

[1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100
[2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur
[3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf

PR: 207419, 213039
Submitted by: Anthony Jenkins <Scoobi_doo@yahoo.com>
Reviewed by: ian
Discussed on: acpi@, 2013-2015, several threads
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19314

5 years agoGive the mx25l device sole ownership of the name /dev/flash/spi* instead of
ian [Sun, 10 Mar 2019 18:48:08 +0000 (18:48 +0000)]
Give the mx25l device sole ownership of the name /dev/flash/spi* instead of
trying to use disk_add_alias() to make spi* an alias for mx25l*.  It turns
out disk_add_alias() works for partitions, but not slices, and that's hard
to fix.

This change is, in effect, a partial revert of r344526.

The mips world relies on the existence of flashmap names formatted as
/dev/flash/spi0s.name, whereas pretty much nothing relies on at45d devices
using the /dev/spi* names (because until recently the at45d driver didn't
even work reliably). So this change makes mx25l devices the sole owner of
the /dev/flash/spi* namespace, which actually makes some sense because it is
a SpiFlash(tm) device, so flash/spi isn't a horrible name.

Reported by: Mori Hiroki <yamori813@yahoo.co.jp>

5 years agoMost Ethernet drivers that potentially can run a pfil(9) hook with
glebius [Sun, 10 Mar 2019 17:20:09 +0000 (17:20 +0000)]
Most Ethernet drivers that potentially can run a pfil(9) hook with
PFIL_MEMPTR flag are intentionally providing a memory address that
isn't aligned to pointer alignment. This is done to align an IPv4
or IPv6 header that is expected to follow Ethernet header.

When we return PFIL_REALLOCED we store a pointer to allocated mbuf
at this address. With this change the KPI changes to store the pointer
at aligned address, which usually yields in +2 bytes.

Provide two inlines:

pfil_packet_align() to get aligned pfil_packet_t for a misaligned one
pfil_mem2mbuf() to read out mbuf pointer from misaligned pfil_packet_t

Provide function pfil_realloc(), not used yet, that would convert a
memory pfil_packet_t to an mbuf one.

Reported by: hps
Reviewed by: hps, gallatin

5 years agoProperly handle a case when a first filter returns PFIL_REALLOCED, then
glebius [Sun, 10 Mar 2019 17:08:05 +0000 (17:08 +0000)]
Properly handle a case when a first filter returns PFIL_REALLOCED, then
second one returns PFIL_PASS.

5 years agoAugment ino64 entry
imp [Sat, 9 Mar 2019 17:17:59 +0000 (17:17 +0000)]
Augment ino64 entry

When updating across this change (the introduction of ino64), the
"fast and loose" practice of rebooting to multiuser and then doing an
installworld fails with missing symbols. Recommend strongly that users
do this in single user mode. The multiuser case only ever works by
accident because its requirements are stronger than is supported
accross this change. It usually works because critical symbols don't
change their version number in libc, which wasn't the case here.

5 years agoFix a number of entries (almost all mine) that were > 80 columns.
imp [Sat, 9 Mar 2019 17:17:55 +0000 (17:17 +0000)]
Fix a number of entries (almost all mine) that were > 80 columns.

When reading UPDATING from single user in vi, I noticed a few wrapped,
so fix them to not wrap.
expand -8 UPDATING | awk 'length > 80'
made this easy to find all the offenders.

5 years agoMisc fixes based on upgrading a laptop from 11.1R to -current
imp [Sat, 9 Mar 2019 17:17:44 +0000 (17:17 +0000)]
Misc fixes based on upgrading a laptop from 11.1R to -current

Add note about needing to start zfs because mount -a doesn't do that.
Add the word 'supported' before 'older branches' for older binaries.
Add note about options in custom config files as well.

5 years agopowerpc: Print trap frame address in ddb backtraces
jhibbits [Sat, 9 Mar 2019 03:24:39 +0000 (03:24 +0000)]
powerpc: Print trap frame address in ddb backtraces

Registers visible from 'show reg' don't always match the registers from the
offending trap frame.  Knowing the frame address lets one examine the
registers manually.

MFC after: 1 week

5 years agopowerpc: Print trap frame address for fatal traps
jhibbits [Sat, 9 Mar 2019 03:18:37 +0000 (03:18 +0000)]
powerpc: Print trap frame address for fatal traps

MFC after: 1 week

5 years agoAdd two more products found inside a T480 to usbdevs.
bz [Sat, 9 Mar 2019 03:15:09 +0000 (03:15 +0000)]
Add two more products found inside a T480 to usbdevs.

Add an Intel Bluetooth module.
Add Synaptics as a vendor with a fingerprint reader product.

MFC after: 2 weeks

5 years agopowerpc: Print data address register on alignment exceptions
jhibbits [Sat, 9 Mar 2019 03:10:56 +0000 (03:10 +0000)]
powerpc: Print data address register on alignment exceptions

MFC after: 1 week

5 years agoDon't compress and uuencode the "hexdump -C" output files. Just
marcel [Sat, 9 Mar 2019 02:03:07 +0000 (02:03 +0000)]
Don't compress and uuencode the "hexdump -C" output files.  Just
save them with the $FreeBSD$ tag prepended.  Changes to these
files are now a lot easier to comprehend, which makes diffs also
reviewable.

5 years agoTry to improve comment for socket state bits.
bz [Sat, 9 Mar 2019 01:37:00 +0000 (01:37 +0000)]
Try to improve comment for socket state bits.

In r324227 the comment moved into socketvar.h originally from
sockstate.h r180948.  Try to improve English and as a consequence rewrap
the comment.

No functional changes.

Reviewed by: jhb (a wording suggestion)
Differential Revision: https://reviews.freebsd.org/D13865

5 years agoDon't print all the I/O we abort on a reset, unless we're out of
imp [Sat, 9 Mar 2019 01:18:16 +0000 (01:18 +0000)]
Don't print all the I/O we abort on a reset, unless we're out of
retries.

When resetting the controller, we abort I/O. Prior to this fix, we
printed a ton of abort messages for I/O that we're going to
retry. This imparts no useful information. Stop printing them unless
our retry count is exhausted. Clarify code for when we don't retry,
and remove useless arg to a routine that's always called with it
as 'true'. All the other debug is still printed (including multiple
reset messages if we have multiple timeouts before the taskqueue
runs the actual reset) so that we know when we reset.

Reviewed by: jimharris@, chuck@
Differential Revision: https://reviews.freebsd.org/D19431

5 years agoImprove ARP logging.
bz [Sat, 9 Mar 2019 01:12:59 +0000 (01:12 +0000)]
Improve ARP logging.

r344504 added an extra ARP_LOG() call in case of an if_output() failure.
It turns out IPv4 can be noisy. In order to not spam the console by default:
(a) add a counter for these events so people can keep better track of how
    often it happens, and
(b) add a sysctl to select the default ARP_LOG log level and set it to
    INFO avoiding the one (the new) DEBUG level by default.

Claim a spare (1st one after 10 years since the stats were added) in order
to not break netstat from FreeBSD 12->13 updates in the future.

Reviewed by: karels
Differential Revision: https://reviews.freebsd.org/D19490

5 years agoCorrect wording around '-' masks.
gordon [Sat, 9 Mar 2019 00:30:13 +0000 (00:30 +0000)]
Correct wording around '-' masks.

PR: 236407
Reported by: Brian Saia
MFC after: 1 week

5 years agoMerge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch
dim [Sat, 9 Mar 2019 00:27:50 +0000 (00:27 +0000)]
Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch
r355677 (effectively, 8.0.0 rc4), resolve conflicts, and bump version
numbers.

PR: 236062
MFC after: 1 month
X-MFC-With: r344779

5 years agoMFV/ZoL: Disable LBA weighting on files and SSDs
mav [Fri, 8 Mar 2019 21:13:45 +0000 (21:13 +0000)]
MFV/ZoL: Disable LBA weighting on files and SSDs

The LBA weighting makes sense on rotational media where the outer tracks
have twice the bandwidth of the inner tracks. However, it is detrimental
on nonrotational media such as solid state disks, where the only effect
is to ensure that metaslabs enter the best-fit allocation behavior
sooner, which is detrimental to performance. It also makes no sense on
files where the underlying filesystem can arrange things however it
wants.

Author: Richard Yao <ryao@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3712
zfsonlinux/zfs@fb40095f5f0853946f8150481ca22602d1334dfe

To reduce code divergence this merge replaces equivalent but different
FreeBSD code detecting non-rotating medium vdevs.

MFC after: 1 month

5 years agoHave pthread_cond_destroy() return EBUSY if the condvar has waiters.
markj [Fri, 8 Mar 2019 21:07:08 +0000 (21:07 +0000)]
Have pthread_cond_destroy() return EBUSY if the condvar has waiters.

This is not required of a compliant implementation, but it's easy to
check for and helps improve compatibility with other common
implementations.  Moreover, it's consistent with our
pthread_mutex_destroy().

PR: 234805
Reviewed by: jhb, kib, ngie
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19496

5 years agoAdd separate aggregation limit for non-rotating media.
mav [Fri, 8 Mar 2019 19:38:52 +0000 (19:38 +0000)]
Add separate aggregation limit for non-rotating media.

Before sequential scrub patches ZFS never aggregated I/Os above 128KB.
Sequential scrub bumped that to 1MB, which motivation I understand for
spinning disks, since it should reduce number of head seeks.  But for
SSDs it makes much less sense to me, especially on FreeBSD, where due
to MAXPHYS limitation device will likely still see bunch of 128KB I/Os
instead of one large.  Having more strict aggregation limit allows to
avoid allocation of large memory buffer and memcpy to/from it, that is
a serious problem when bandwidth reaches few GB/s.

MFC after: 1 month
Sponsored by: iXsystems, Inc.

5 years agoUpdate members of doceng in the chart.
bcr [Fri, 8 Mar 2019 18:58:41 +0000 (18:58 +0000)]
Update members of doceng in the chart.

Update the members of the doceng team to include ryusuke@ and me.
Sort and reduce number of line breaks so that our bubble in the
chart is a bit more compact (similar to portmgr next to it).

Reminded by:    gjb

5 years agoMFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking
mav [Fri, 8 Mar 2019 18:49:27 +0000 (18:49 +0000)]
MFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking

Update the bounds checking for zfs_vdev_aggregation_limit so that
it has a floor of zero and a maximum value of the supported block
size for the pool.

Additionally add an early return when zfs_vdev_aggregation_limit
equals zero to disable aggregation.  For very fast solid state or
memory devices it may be more expensive to perform the aggregation
than to issue the IO immediately.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
zfsonlinux/zfs@a58df6f53687ac6d1dee21f60de41b2552a43201

MFV/ZoL: Cap maximum aggregate IO size

Commit 8542ef8 allowed optional IOs to be aggregated beyond
the specified aggregation limit.  Since the aggregation limit
was also used to enforce the maximum block size, setting
`zfs_vdev_aggregation_limit=16777216` could result in an
attempt to allocate an ABD larger than 16M.

Author: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6259
Closes #6270
zfsonlinux/zfs@2d678f779aba26a93314c8ee1142c3985fa25cb6

5 years agoFix locking bug.
tuexen [Fri, 8 Mar 2019 18:17:57 +0000 (18:17 +0000)]
Fix locking bug.

MFC after: 3 days

5 years agoSome cleanup and consistency improvements.
tuexen [Fri, 8 Mar 2019 18:16:19 +0000 (18:16 +0000)]
Some cleanup and consistency improvements.

MFC after: 3 days

5 years agoexplain ``fsck -f'' more in detail
wosch [Fri, 8 Mar 2019 10:03:16 +0000 (10:03 +0000)]
explain ``fsck -f'' more in detail

PR: 223491
Approved by: mckusick, 0mp, imp
Differential Revision: https://reviews.freebsd.org/D19437

5 years agopf: Fix DIOCGETSRCNODES
kp [Fri, 8 Mar 2019 09:33:16 +0000 (09:33 +0000)]
pf: Fix DIOCGETSRCNODES

r343295 broke DIOCGETSRCNODES by failing to reset 'nr' after counting the
number of source tracking nodes.
This meant that we never copied the information to userspace, leading to '? ->
?' output from pfctl.

PR: 236368
MFC after: 1 week

5 years agoTeardown ifnet after stopping port in the mlx4en(4) driver.
hselasky [Fri, 8 Mar 2019 09:18:29 +0000 (09:18 +0000)]
Teardown ifnet after stopping port in the mlx4en(4) driver.

mlx4_en_stop_port() calls mlx4_en_put_qp() which can refer the link level
address of the network interface, which in turn will be freed by the
network interface detach function. Make sure the port is stopped
before detaching the network interface.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoDon't hold state lock while detaching network device instance in mlx4en(4).
hselasky [Fri, 8 Mar 2019 09:16:29 +0000 (09:16 +0000)]
Don't hold state lock while detaching network device instance in mlx4en(4).

It can happen during shutdown that the lock will recurse when the mlx4en(4)
instance is part of a lagg interface. Call ether_ifdetach() unlocked.

Backtrace:
panic(): _sx_xlock_hard: recursed on non-recursive sx &mdev->state_lock
_sx_xlock_hard()
_sx_xlock()
mlx4_en_ioctl()
if_setlladdr()
lagg_port_destroy()
lagg_port_ifdetach()
if_detach()
mlx4_en_destroy_netdev()
mlx4_en_remove()
mlx4_remove_device()
mlx4_unregister_device()
mlx4_unload_one()
mlx4_shutdown()
linux_pci_shutdown()
bus_generic_shutdown()

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agopowerpc64: Fix early exit with invalid kernel SLB entries
jhibbits [Fri, 8 Mar 2019 04:20:33 +0000 (04:20 +0000)]
powerpc64: Fix early exit with invalid kernel SLB entries

The check for early exit should be checking the SLB entry itself.  As
currently written it was checking the address of the SLB, which is always
non-zero, so would go through the kernel SR restore loop regardless.

Submitted by: mmacy
MFC after: 2 weeks

5 years agopowerpc: Fix cpufreq statement scoping
jhibbits [Fri, 8 Mar 2019 03:59:53 +0000 (03:59 +0000)]
powerpc: Fix cpufreq statement scoping

The second statements on the lines are not guarded by the `if' condition.
This triggers a warning with newer gcc.  It's relatively harmless given the
usage, but incorrect.  Instead, wrap the statements so they're properly
guarded.

Reported by: powerpc64-gcc xtoolchain
MFC after: 1 week

5 years agoFortuna: Add Chacha20 as an alternative stream cipher
cem [Fri, 8 Mar 2019 01:17:20 +0000 (01:17 +0000)]
Fortuna: Add Chacha20 as an alternative stream cipher

Chacha20 with a 256 bit key and 128 bit counter size is a good match for an
AES256-ICM replacement.

In userspace, Chacha20 is typically marginally slower than AES-ICM on
machines with AESNI intrinsics, but typically much faster than AES on
machines without special intrinsics.  ChaCha20 does well on typical modern
architectures with SIMD instructions, which includes most types of machines
FreeBSD runs on.

In the kernel, we can't (or don't) make use of AESNI intrinsics for
random(4) anyway.  So even on amd64, using Chacha provides a modest
performance improvement in random device throughput today.

This change makes the stream cipher used by random(4) configurable at boot
time with the 'kern.random.use_chacha20_cipher' tunable.

Very rough, non-scientific measurements at the /dev/random device, on a
GENERIC-NODEBUG amd64 VM with 'pv', show a factor of 2.2x higher throughput
for Chacha20 over the existing AES-ICM mode.

Reviewed by: delphij, markm
Approved by: secteam (delphij)
Differential Revision: https://reviews.freebsd.org/D19475

5 years agoUpdate for IETF draft-ietf-6man-ipv6only-flag.
bz [Thu, 7 Mar 2019 23:03:39 +0000 (23:03 +0000)]
Update for IETF draft-ietf-6man-ipv6only-flag.

When we roam between networks and our link-state goes down, automatically remove
the IPv6-Only flag from the interface.  Otherwise we might switch from an
IPv6-only to and IPv4-only network and the flag would stay and we would prevent
IPv4 from working.

While the actual function call to clear the flag is under EXPERIMENTAL,
the eventhandler is not as we might want to re-use it for other
functionality on link-down event (such was re-calculate default routers
for example if there is more than one).

Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D19487

5 years agoImprove entropy for ZFS taskqueue selection.
mav [Thu, 7 Mar 2019 22:56:39 +0000 (22:56 +0000)]
Improve entropy for ZFS taskqueue selection.

I just found that at least on Skylake CPUs cpu_ticks() never returns odd
values, only even, and possibly has even bigger step (176/2?), that makes
its lower bits very bad entropy source, leaving half of taskqueues unused.
Switch to sbinuptime(), closer to upstreams, mitigates the problem by the
rate conversion working as kind of hash function.  In case that is somehow
not enough (timer rate is too low or too divisible) mix in curcpu.

MFC after: 1 week

5 years agosh/tests: Improve failure messages of expansion/arith15.0
jilles [Thu, 7 Mar 2019 22:51:58 +0000 (22:51 +0000)]
sh/tests: Improve failure messages of expansion/arith15.0

5 years agoCorrect my previous correction to the license. It now matches the text
brooks [Thu, 7 Mar 2019 22:34:45 +0000 (22:34 +0000)]
Correct my previous correction to the license.  It now matches the text
in https://spdx.org/licenses/GPL-2.0.html

5 years agoCorrect license boilerplate, to match the SPDX tag.
brooks [Thu, 7 Mar 2019 22:20:20 +0000 (22:20 +0000)]
Correct license boilerplate, to match the SPDX tag.

The GPL-2.0 tag is a deprecated tag which means that same thing as
GPL-2.0-only.

5 years agoPull in r354937 from upstream clang trunk (by Jörg Sonnenberger):
dim [Thu, 7 Mar 2019 19:33:39 +0000 (19:33 +0000)]
Pull in r354937 from upstream clang trunk (by Jörg Sonnenberger):

  Fix inline assembler constraint validation

  The current constraint logic is both too lax and too strict. It fails
  for input outside the [INT_MIN..INT_MAX] range, but it also
  implicitly accepts 0 as value when it should not. Adjust logic to
  handle both correctly.

  Differential Revision: https://reviews.llvm.org/D58649

Pull in r355491 from upstream clang trunk (by Hans Wennborg):

  Inline asm constraints: allow ICE-like pointers for the "n"
  constraint (PR40890)

  Apparently GCC allows this, and there's code relying on it (see bug).

  The idea is to allow expression that would have been allowed if they
  were cast to int. So I based the code on how such a cast would be
  done (the CK_PointerToIntegral case in
  IntExprEvaluator::VisitCastExpr()).

  Differential Revision: https://reviews.llvm.org/D58821

These should fix assertions and errors when using the inline assembly
"n" constraint in certain ways.

In case of devel/valgrind, a pointer was used as the input for the
constraint, which lead to "Assertion failed: (isInt() && "Invalid
accessor"), function getInt".

In case of math/secp256k1, a very large integer value was used as input
for the constraint, which lead to "error: value '4624529908474429119'
out of range for constraint 'n'".

PR:             236216, 236194
MFC after:      1 month
X-MFC-With:     r344779

5 years agoarm64: allwinner: a64: Add TCON clock
manu [Thu, 7 Mar 2019 19:32:01 +0000 (19:32 +0000)]
arm64: allwinner: a64: Add TCON clock

The tcon clock need a mux table for it's parent, for now just
list the parents twice.

5 years agoarm64: allwinner: Add CCU DE2
manu [Thu, 7 Mar 2019 19:30:37 +0000 (19:30 +0000)]
arm64: allwinner: Add CCU DE2

The Display Engine 2 have it's own Clock and Control Unit, add support
for it.

5 years agoarm: allwinner: Fix NM clock recalc
manu [Thu, 7 Mar 2019 19:28:47 +0000 (19:28 +0000)]
arm: allwinner: Fix NM clock recalc

If the NM clock is using a fractional divider the formula isn't the same.

5 years agostand/common/module: Apply style(9)
manu [Thu, 7 Mar 2019 18:57:43 +0000 (18:57 +0000)]
stand/common/module: Apply style(9)

5 years agoseq(1): Require user-provided format strings to contain a conversion
cem [Thu, 7 Mar 2019 18:24:16 +0000 (18:24 +0000)]
seq(1): Require user-provided format strings to contain a conversion

This matches GNU seq, for example.

For users that are looking for similar functionality, 'jot -b foo N' will
print 'foo' N times.  See jot(1).

PR: 236347
Reported by: <y AT maya.st>
Sponsored by: Dell EMC Isilon

5 years agoMFV r344878:
cy [Thu, 7 Mar 2019 13:36:00 +0000 (13:36 +0000)]
MFV r344878:

4.2.8p12 --> 4.2.8p13

MFC after: immediately
Security: CVE-2019-8936
VuXML: c2576e14-36e2-11e9-9eda-206a8a720317
Obtained from: nwtime.org

5 years agoImport 4.2.8p13.
cy [Thu, 7 Mar 2019 13:01:16 +0000 (13:01 +0000)]
Import 4.2.8p13.

5 years agopf tests: Accelerate tests
kp [Thu, 7 Mar 2019 11:09:29 +0000 (11:09 +0000)]
pf tests: Accelerate tests

Make the tests run slightly faster by having pft_ping.py end the capture
of packets as soon as it sees the expected packet, rather than
continuing to sniff.

MFC after: 2 weeks

5 years agoDo not reference deskutils/cal from cal.1.
0mp [Thu, 7 Mar 2019 11:09:25 +0000 (11:09 +0000)]
Do not reference deskutils/cal from cal.1.

The ports version of cal is an abandonware so in order to minimize the
potential bit rot of our documentation let's not mention it at all.
Interested users are going to find suitable alternatives anyway on their
own.

Reported by: bapt
Approved by: bapt (src)
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D19492

5 years agoDocument that cal(1) cannot start a week with Monday.
0mp [Thu, 7 Mar 2019 10:19:40 +0000 (10:19 +0000)]
Document that cal(1) cannot start a week with Monday.

Reviewed by: bcr
Approved by: bcr (doc)
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D19491

5 years agoFix typo.
ae [Thu, 7 Mar 2019 10:01:32 +0000 (10:01 +0000)]
Fix typo.

MFC after: 1 week

5 years agoAfter removing an entry from the stream scheduler list, set the pointers
tuexen [Thu, 7 Mar 2019 08:43:20 +0000 (08:43 +0000)]
After removing an entry from the stream scheduler list, set the pointers
to NULL, since we are checking for it in case the element gets inserted
again.

This issue was found by running syzkaller.

MFC after: 3 days

5 years agopowerpc: Save stack pointer in savectx
jhibbits [Thu, 7 Mar 2019 04:43:08 +0000 (04:43 +0000)]
powerpc: Save stack pointer in savectx

This allows 'show acttrace' to show backtrace on processes currently running
on CPUs.

Reported by: Brandon Bergren
MFC after: 1 week

5 years agoFix the problem with O_LIMIT states introduced in r344018.
ae [Thu, 7 Mar 2019 04:40:44 +0000 (04:40 +0000)]
Fix the problem with O_LIMIT states introduced in r344018.

dyn_install_state() uses `rule` pointer when it creates state.
For O_LIMIT states this pointer actually is not struct ip_fw,
it is pointer to O_LIMIT_PARENT state, that keeps actual pointer
to ip_fw parent rule. Thus we need to cache rule id and number
before calling dyn_get_parent_state(), so we can use them later
when the `rule` pointer is overrided.

PR: 236292
MFC after: 3 days

5 years agoadd GPL text in addition to SPDX tags as requested by core
mmacy [Thu, 7 Mar 2019 03:53:48 +0000 (03:53 +0000)]
add GPL text in addition to SPDX tags as requested by core

MFC after: 1 week

5 years agoadd gcov to LINT build
mmacy [Thu, 7 Mar 2019 03:50:34 +0000 (03:50 +0000)]
add gcov to LINT build

MFC after: 1 week

5 years agoAdd build time GPL warning when GCOV is enabled
mmacy [Thu, 7 Mar 2019 03:47:41 +0000 (03:47 +0000)]
Add build time GPL warning when GCOV is enabled

MFC after: 1 week

5 years agoAdd respective tunables to few ZFS sysctls.
mav [Thu, 7 Mar 2019 01:24:08 +0000 (01:24 +0000)]
Add respective tunables to few ZFS sysctls.

MFC after: 1 week

5 years agofuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf
cem [Thu, 7 Mar 2019 00:55:49 +0000 (00:55 +0000)]
fuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf

On GENERIC kernels with empty loader.conf, there is no functional change.
DFLTPHYS and MAXBSIZE are both 64kB at the moment.  This change allows
larger bufcache block sizes to be used when either MAXBSIZE (custom kernel)
or the loader.conf tunable vfs.maxbcachebuf (GENERIC) is adjusted higher
than the default.

Suggested by: ken@

5 years agoDocument the efivar --load-option option
bcran [Thu, 7 Mar 2019 00:01:28 +0000 (00:01 +0000)]
Document the efivar --load-option option

Reviewed by: imp, kevans
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D19263

5 years agoUpdate for IETF draft-ietf-6man-ipv6only-flag.
bz [Wed, 6 Mar 2019 23:31:42 +0000 (23:31 +0000)]
Update for IETF draft-ietf-6man-ipv6only-flag.

All changes are hidden behind the EXPERIMENTAL option and are not compiled
in by default.

Add ND6_IFF_IPV6_ONLY_MANUAL to be able to set the interface into no-IPv4-mode
manually without router advertisement options.  This will allow developers to
test software for the appropriate behaviour even on dual-stack networks or
IPv6-Only networks without the option being set in RA messages.
Update ifconfig to allow setting and displaying the flag.

Update the checks for the filters to check for either the automatic or the manual
flag to be set.  Add REVARP to the list of filtered IPv4-related protocols and add
an input filter similar to the output filter.

Add a check, when receiving the IPv6-Only RA flag to see if the receiving
interface has any IPv4 configured.  If it does, ignore the IPv6-Only flag.

Add a per-VNET global sysctl, which is on by default, to not process the automatic
RA IPv6-Only flag.  This way an administrator (if this is compiled in) has control
over the behaviour in case the node still relies on IPv4.

5 years agoFUSE: Prevent trivial panic
cem [Wed, 6 Mar 2019 22:56:49 +0000 (22:56 +0000)]
FUSE: Prevent trivial panic

When open(2) was invoked against a FUSE filesystem with an unexpected flags
value (no O_RDONLY / O_RDWR / O_WRONLY), an assertion fired, causing panic.

For now, prevent the panic by rejecting such VOP_OPENs with EINVAL.

This is not considered the correct long term fix, but does prevent an
unprivileged denial-of-service.

PR: 236329
Reported by: asomers
Reviewed by: asomers
Sponsored by: Dell EMC Isilon

5 years agoDrop "All rights reserved" from my copyright statements.
jhb [Wed, 6 Mar 2019 22:11:45 +0000 (22:11 +0000)]
Drop "All rights reserved" from my copyright statements.

Reviewed by: rgrimes
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D19485

5 years agoDivorce MK_GDB from MK_BINUTILS.
jhb [Wed, 6 Mar 2019 20:13:02 +0000 (20:13 +0000)]
Divorce MK_GDB from MK_BINUTILS.

This permits legacy GDB to still be built and installed if
WITHOUT_BINUTILS is set (e.g. if base/binutils is installed).

Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19480

5 years agoRegenerate src.conf.5 for recent changes.
jhb [Wed, 6 Mar 2019 20:10:23 +0000 (20:10 +0000)]
Regenerate src.conf.5 for recent changes.

Updates include removal of DRM2 and addition of several options
related to secure booting.

5 years agoPut in a temporary workaround for what is likely a gcc 6 bug (it does
dim [Wed, 6 Mar 2019 18:19:27 +0000 (18:19 +0000)]
Put in a temporary workaround for what is likely a gcc 6 bug (it does
not occur with gcc 7 or later).  This should prevent the following error
from breaking the head-amd64-gcc CI builds:

In file included from /workspace/src/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp:14:0:
/workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: 'template<class _InputIterator> lldb_private::MemoryRegionInfos::MemoryRegionInfos(_InputIterator, _InputIterator, const allocator_type&)' inherited from 'std::__1::vector<lldb_private::MemoryRegionInfo>'
   using std::vector<lldb_private::MemoryRegionInfo>::vector;
                                                      ^~~~~~
/workspace/src/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h:128:54: error: conflicts with version inherited from 'std::__1::vector<lldb_private::MemoryRegionInfo>'

Reported by: CI

5 years agoUpdate the core-secretary role.
bcr [Wed, 6 Mar 2019 17:37:56 +0000 (17:37 +0000)]
Update the core-secretary role.

With the last core election, matthew@ stepped down and handed over to jrm@ to
serve as new core secretary. Update this file to match.

Approved by: core (implicit)

5 years agoReorder copyright lines to preserve the source of "All rights reserved."
markj [Wed, 6 Mar 2019 16:50:14 +0000 (16:50 +0000)]
Reorder copyright lines to preserve the source of "All rights reserved."

Reported by: rgrimes
MFC with: r344829, r344830

5 years agoFlush stdout after each iteration.
mav [Wed, 6 Mar 2019 15:19:04 +0000 (15:19 +0000)]
Flush stdout after each iteration.

Without this, if output is redirected from the console, it is buffered for
too long, making tool quite unusable.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

5 years ago[ath_hal_ar9300] Add the missing bits from the previous HAL commit.
adrian [Wed, 6 Mar 2019 08:52:02 +0000 (08:52 +0000)]
[ath_hal_ar9300] Add the missing bits from the previous HAL commit.

Noticed by: 75+ emails telling me I messed up.

5 years ago[athani] Add a simple tool to list and control ANI parameters.
adrian [Wed, 6 Mar 2019 07:58:19 +0000 (07:58 +0000)]
[athani] Add a simple tool to list and control ANI parameters.

This is a WIP tool I'm using to figure out why ANI is weirdly busted in my
home FreeBSD AP/STA setup.  Although athstats (mostly) gets the ANI statistics
correct, ANI is making the radio deaf it doesn't recover without being disabled.

It's very WIP.

Tested:

* Carambola 2,  (AR9331), AP/STA mode.

5 years ago[ath_hal] [ath_hal_ar9300] ANI fixes and preparation for userland control.
adrian [Wed, 6 Mar 2019 07:54:29 +0000 (07:54 +0000)]
[ath_hal] [ath_hal_ar9300] ANI fixes and preparation for userland control.

* The ani function bitmap was being badly used when determining if a command
  could be used.  In hostap modes only a couple of the ANI control parameters
  are enabled.

* The ani function bitmap was not being reset to HAL_ANI_ALL if transitioning
  from AP -> STA.

* Change mrcCckOff to mrcCck - 1 == on, rather than 1 == off.  This matches
  the API used to set the value from userland via the diagnostic API.

* Handle OFDM/CCK noise immunity level commands in ar9300_ani_control().
  These will only come from userland and it will go and program the rest of
  the ANI control parameters with the values in the ANI table.

* Ensure all of the ANI parameters can be tweaked at runtime, even if they're
  disabled.

Tested:

* carambola2 (AR9331), STA/AP modes

5 years agoExtend libsecureboot(old libve) to obtain trusted certificates from UEFI and implemen...
mw [Wed, 6 Mar 2019 06:39:42 +0000 (06:39 +0000)]
Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation

UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19093

5 years agoAdd retry loop around GetMemoryMap call to fix fragmentation bug
bcran [Wed, 6 Mar 2019 05:39:40 +0000 (05:39 +0000)]
Add retry loop around GetMemoryMap call to fix fragmentation bug

The call to BS->AllocatePages can cause the memory map to become framented,
causing BS->GetMemoryMap to return EFI_BUFFER_TOO_SMALL more than once. For
example this can happen on the MinnowBoard Turbot, causing the boot to stop
with an error. Avoid this by calling GetMemoryMap in a loop.

Reviewed by: imp, tsoome, kevans
Differential Revision: https://reviews.freebsd.org/D19341

5 years agoRemove an empty directory emptied by r343702.
cy [Wed, 6 Mar 2019 02:52:58 +0000 (02:52 +0000)]
Remove an empty directory emptied by r343702.

MFC after: 3 days

5 years agoImplement minidump support for RISC-V.
markj [Wed, 6 Mar 2019 00:01:06 +0000 (00:01 +0000)]
Implement minidump support for RISC-V.

Submitted by: Mitchell Horne <mhorne063@gmail.com>
Differential Revision: https://reviews.freebsd.org/D18320

5 years agoAdd riscv minidump support to libkvm.
markj [Tue, 5 Mar 2019 23:59:55 +0000 (23:59 +0000)]
Add riscv minidump support to libkvm.

Submitted by: Mitchell Horne <mhorne063@gmail.com>
Differential Revision: https://reviews.freebsd.org/D19171

5 years agoInitialize dump_avail[] on riscv.
markj [Tue, 5 Mar 2019 23:58:16 +0000 (23:58 +0000)]
Initialize dump_avail[] on riscv.

Submitted by: Mitchell Horne <mhorne063@gmail.com>
Differential Revision: https://reviews.freebsd.org/D19170

5 years agoAdd pmap_get_tables() for riscv.
markj [Tue, 5 Mar 2019 23:56:40 +0000 (23:56 +0000)]
Add pmap_get_tables() for riscv.

This mirrors the arm64 implementation and is for use in the minidump
code.

Submitted by: Mitchell Horne <mhorne063@gmail.com>
Differential Revision: https://reviews.freebsd.org/D18321

5 years agoRound # partitions up to fill the last GPT table sector
marcel [Tue, 5 Mar 2019 22:55:33 +0000 (22:55 +0000)]
Round # partitions up to fill the last GPT table sector

Set the number of partitions entries in the GPT header to a
multiple of the number of entries that fit in a sector.

PR: 236238
Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19465

5 years agoAdd a few missed files to the MK_LLVM_TARGET_BPF=yes case, otherwise
dim [Tue, 5 Mar 2019 22:04:23 +0000 (22:04 +0000)]
Add a few missed files to the MK_LLVM_TARGET_BPF=yes case, otherwise
clang and various other executables will fail to link with undefined
symbols.

Reported by: O. Hartmann <ohartmann@walstatt.org>
MFC after: 1 month
X-MFC-With: r344779

5 years agoShow wiring state of map entries in procstat -v.
markj [Tue, 5 Mar 2019 19:45:37 +0000 (19:45 +0000)]
Show wiring state of map entries in procstat -v.

Note that only entries wired by userspace are shown as such.  In
particular, entries transiently wired by sysctl_wire_old_buffer() are
not flagged as wired in procstat -v output.

Reviewed by: kib (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19461

5 years agofreebsd-update.8: update example to contemporary versions
emaste [Tue, 5 Mar 2019 19:17:24 +0000 (19:17 +0000)]
freebsd-update.8: update example to contemporary versions

PR: 235761
Reported by: linimon
MFC after: 1 week

5 years agoRemove references to CONTIGMALLOC_WORKS in iflib and em
erj [Tue, 5 Mar 2019 19:12:51 +0000 (19:12 +0000)]
Remove references to CONTIGMALLOC_WORKS in iflib and em

From Jake:
"The iflib_fl_setup() function tries to pick various buffer sizes based
on the max_frame_size value defined by the parent driver. However, this
code was wrapped under CONTIGMALLOC_WORKS, which was never actually
defined anywhere.

This same code pattern was used in if_em.c, likely trying to match
what iflib uses.

Since CONTIGMALLOC_WORKS is not defined, remove this dead code from
iflib_fl_setup and if_em.c

Given that various iflib drivers appear to be using a similar
calculation, it might be worth making this buffer size a value that the
driver can peek at in the future."

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: shurd@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19199

5 years agolibllvm: promote WithColor and xxhash to SRCS_MIN
emaste [Tue, 5 Mar 2019 16:18:06 +0000 (16:18 +0000)]
libllvm: promote WithColor and xxhash to SRCS_MIN

The armv6 build failed in CI due to missing symbols (from these two
source files) in the bootstrap Clang.

This affected only armv6 because other Clang-using archs are using LLD
as the bootstrap linker, and thus include SRCS_MIW via LLD_BOOTSTRAP.

Reported by: CI, via lwhsu
Sponsored by: The FreeBSD Foundation

5 years agotun tests: Test renaming and destroying a tun interface in a vnet jail
kp [Tue, 5 Mar 2019 15:49:30 +0000 (15:49 +0000)]
tun tests: Test renaming and destroying a tun interface in a vnet jail

There was a problem destroying renamed tun interfaces in vnet jails. This was
fixed in r344794. Test the previously failing scenario.

PR: 235704
MFC after: 2 weeks

5 years agoremove the removed-from-source drm/drm2 parts
netchild [Tue, 5 Mar 2019 15:23:28 +0000 (15:23 +0000)]
remove the removed-from-source drm/drm2 parts

5 years agoFix typos in libusb.
hselasky [Tue, 5 Mar 2019 14:47:15 +0000 (14:47 +0000)]
Fix typos in libusb.

Found by: Denis Ahrens <denis@h3q.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agotun: VIMAGE fix for if_tun cloner
kp [Tue, 5 Mar 2019 13:21:07 +0000 (13:21 +0000)]
tun: VIMAGE fix for if_tun cloner

The if_tun cloner is not virtualised, but if_clone_attach() does use a
virtualised list of cloners.
The result is that we can't find the if_tun cloner when we try to remove
a renamed tun interface. Virtualise the cloner, and move the final
cleanup into a sysuninit so that we're sure this happens after all of
the vnet_sysuninits

Note that we need unit numbers to be system-unique (rather than unique
per vnet, as is done by if_clone_simple()). The unit number is used to
create the corresponding /dev/tunX device node, and this node must match
with the interface.
Switch to if_clone_advanced() so that we have control over the unit
numbers.

Reproduction scenario:
jail -c -n foo persist vnet
jexec test ifconfig tun create
jexec test ifconfig tun0 name wg0
jexec test ifconfig wg0 destroy

PR: 235704
Reviewed by: bz, hrs, hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19248

5 years agoFix binutils compilation error with Clang 8
jhibbits [Tue, 5 Mar 2019 04:16:50 +0000 (04:16 +0000)]
Fix binutils compilation error with Clang 8

Summary:
This change fixes the following compilation error when using clang 8 to cross
compile base to powerpc64:

```
/usr/src/gnu/usr.bin/binutils/libopcodes/../../../../contrib/binutils/opcodes/ppc-dis.c:100:35:
error: arithmetic on a null pointer treated as a cast from integer to pointer is
a GNU extension [-Werror,-Wnull-pointer-arithmetic]
  info->private_data = (char *) 0 + dialect;
       ~~~~~~~~~~ ^
1 error generated.
*** [ppc-dis.o] Error code 1

make[6]: stopped in /usr/src/gnu/usr.bin/binutils/libopcodes
1 error
```

Test Plan:
- buildworld for x86_64 (native)
- buildworld for powerpc64 (cross)
- buildworld for powerpc64 (native)

Submitted by: alfredo.junior_eldorado.org.br
Reviewed By: emaste, pfg, brooks
Differential Revision: https://reviews.freebsd.org/D19235

5 years agoRevert revision 254095
marcel [Tue, 5 Mar 2019 04:15:34 +0000 (04:15 +0000)]
Revert revision 254095

In revision 254095, gpt_entries is not set to match the on-disk
hdr_entries, but rather is computed based on available space.
There are 2 problems with this:

1.  The GPT backend respects hdr_entries and only reads and writes
    that number of partition entries.  On top of that, CRC32 is
    computed over the table that has hdr_entries elements.  When
    the common code works on what is possibly a larger number, the
    behaviour becomes inconsistent and problematic.  In particular,
    it would be possible to add a new partition that on a reboot
    isn't there anymore.
2.  The calculation of gpt_entries is based on flawed assumptions.
    The GPT specification does not dictate that sectors are layed
    out in a particular way that the available space can be
    determined by looking at LBAs.  In practice, implementations
    do the same thing, because there's no reason to do it any
    other way.  Still, GPT allows certain freedoms that can be
    exploited in some form or shape if the need arises.

PR: 229977
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19438

5 years agoFix grammar.
hrs [Tue, 5 Mar 2019 02:53:41 +0000 (02:53 +0000)]
Fix grammar.

Submitted by: Massimiliano Stucchi

5 years agoMFhead@r344786
ngie [Tue, 5 Mar 2019 01:00:38 +0000 (01:00 +0000)]
MFhead@r344786

5 years agoAllow for reproducible build
sjg [Mon, 4 Mar 2019 22:04:21 +0000 (22:04 +0000)]
Allow for reproducible build

Use SOURCE_DATE_EPOCH for BUILD_UTC if MK_REPRODUCIBLE_BUILD is yes.
Default SOURCE_DATE_EPOCH to 2019-01-01

Reviewed by: emaste
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D19464

5 years agobridge: Fix spurious warnings about capabilities
mav [Mon, 4 Mar 2019 22:01:09 +0000 (22:01 +0000)]
bridge: Fix spurious warnings about capabilities

Mask off the bits we don't care about when checking that capabilities
of the member interfaces have been disabled as intended.

Submitted by: Ryan Moeller <ryan@ixsystems.com>
Reviewed by: kristof, mav
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D18924

5 years agoAdd -d flag to load command
sjg [Mon, 4 Mar 2019 19:50:59 +0000 (19:50 +0000)]
Add -d flag to load command

When doing load -t manifest -d increments debug level

Reviewed by: stevek

5 years agoUpgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
dim [Mon, 4 Mar 2019 19:39:59 +0000 (19:39 +0000)]
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
the upstream release_80 branch r355313 (effectively, 8.0.0 rc3).  The
release will follow very soon, but no more functional changes are
expected.

Release notes for llvm, clang and lld 8.0.0 will soon be available here:
<https://releases.llvm.org/8.0.0/docs/ReleaseNotes.html>
<https://releases.llvm.org/8.0.0/tools/clang/docs/ReleaseNotes.html>
<https://releases.llvm.org/8.0.0/tools/lld/docs/ReleaseNotes.html>

PR: 236062
Relnotes: yes
MFC after: 1 month