]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoAdd -l to camcontrol readcap.
imp [Tue, 12 Mar 2019 04:57:05 +0000 (04:57 +0000)]
Add -l to camcontrol readcap.

The -l flag sends only the READ CAPACITY (16) sevice action. Normally
we send the READ CAPACITY (10) command, and only send RC16 when the
capacity is larger than 2TB (since that's the max RC10 can
report). However, some badly programmed drives report different
numbers for RC10 and RC16. This can be hard to diagnose, but generally
there's a "Logical block address out of range" error when RC16 reports
a larger number than RC10 and the RC10 number is the correct one. By
comparing the output of readcap with and without the -l argmuent, one
can determine if there's a mismatch and if the DA_Q_NO_RC16 quirk is
needed.

Reviewed by: ken@
Differential Revision: https://reviews.freebsd.org/D19536

5 years agoRemove now useless -d and -t flags.
imp [Tue, 12 Mar 2019 04:49:59 +0000 (04:49 +0000)]
Remove now useless -d and -t flags.

These were used to set dst flag and minutes west of UTC
respectively. These are obsolete and have been removed form the
kernel. These existed primarily to faithfully emulate early
Unix ABIs that have been removed from FreeBSD.

Reviewed by: jbh@, brooks@
Differential Revision: https://reviews.freebsd.org/D19550

5 years agoKill tz_minuteswest and tz_dsttime.
imp [Tue, 12 Mar 2019 04:49:47 +0000 (04:49 +0000)]
Kill tz_minuteswest and tz_dsttime.

Research Unix, 7th Edition introduced TIMEZONE and DSTFLAG
compile-time constants in sys/param.h to communicate these values for
the machine. 4.2BSD moved from the compile-time to run-time and
introduced these variables and used for localtime() to return the
right offset from UTC (sometimes referred to as GMT, for this purpose
is the same). 4.4BSD migrated to using the tzdata code/database and
these variables were basically unused.

FreeBSD removed the real need for these with adjkerntz in
1995. However, some RTC clocks continued to use these variables,
though they were largely unused otherwise.  Later, phk centeralized
most of the uses in utc_offset, but left it using both tz_minuteswest
and adjkerntz.

POSIX (IEEE Std 1003.1-2017) states in the gettimeofday specification
"If tzp is not a null pointer, the behavior is unspecified" so there's
no standards reason to retain it anymore. In fact, gettimeofday has
been marked as obsolecent, meaning it could be removed from a future
release of the standard. It is the only interface defined in POSIX
that references these two values. All other references come from the
tzdata database via tzset().

These were used to more faithfully implement early unix ABIs which
have been removed from FreeBSD.  NetBSD has completely eliminated
these variables years ago. Linux has migrated to tzdata as well,
though these variables technically still exist for compatibility
with unspecified older programs.

So, there's no real reason to have them these days. They are a
historical vestige that's no longer used in any meaningful way.

Reviewed By: jhb@, brooks@
Differential Revision: https://reviews.freebsd.org/D19550

5 years agoAdd KASSERT to the softdep_disk_write_complete() function in the
mckusick [Tue, 12 Mar 2019 00:10:31 +0000 (00:10 +0000)]
Add KASSERT to the softdep_disk_write_complete() function in the
soft dependency code to ensure that it will be able to avoid a
dangling dependency.

Sponsored by: Netflix

5 years agoGive more complete information in INVARIANTS panic messages at end of
mckusick [Mon, 11 Mar 2019 23:53:56 +0000 (23:53 +0000)]
Give more complete information in INVARIANTS panic messages at end of
the ffs_truncate() function.

Sponsored by: Netflix

5 years agoUpdate ccr(4) to note recent support for SHA2-224 and plain SHA hashes.
jhb [Mon, 11 Mar 2019 23:18:09 +0000 (23:18 +0000)]
Update ccr(4) to note recent support for SHA2-224 and plain SHA hashes.

MFC after: 3 days
Sponsored by: Chelsio Communications

5 years agoUpdate the main loop in the flushbuflist() routine to properly select
mckusick [Mon, 11 Mar 2019 22:42:33 +0000 (22:42 +0000)]
Update the main loop in the flushbuflist() routine to properly select
buffers for flushing when requested to flush both normal and extended
attributes buffers.

Sponsored by: Netflix

5 years agoDrop "All rights reserved" from the files I own
asomers [Mon, 11 Mar 2019 22:23:56 +0000 (22:23 +0000)]
Drop "All rights reserved" from the files I own

Also, add SPDX tags where needed.

MFC after: 2 weeks

5 years agoAugment the UFS filesystem specific print function (called by the
mckusick [Mon, 11 Mar 2019 22:05:34 +0000 (22:05 +0000)]
Augment the UFS filesystem specific print function (called by the
kernel vn_printf() routine when printing out vnodes associated with
a UFS filesystem) to also include the inode's link count, effective
link count, generation number, owner, group, flags, size, and for
UFS2 filesystems, the extent size.

Sponsored by: Netflix

5 years agoAugment DDB "show buffer" command to print the buffer's referenced
mckusick [Mon, 11 Mar 2019 21:49:44 +0000 (21:49 +0000)]
Augment DDB "show buffer" command to print the buffer's referenced
vnode pointer (b_vp). The value of b_vp can be used by "show vnode"
to print the vnode and "show vnodebufs" to print all the clean and
dirty buffers associated with the vnode (which should include this
buffer).

Sponsored by: Netflix

5 years agoUpgrade Chipfancier SLC quirk to all versions
imp [Mon, 11 Mar 2019 20:57:54 +0000 (20:57 +0000)]
Upgrade Chipfancier SLC quirk to all versions

The 16GB, 32GB and 128GB versions of this product all have the same
problem. For some reason, the RC10 size is correct, while the RC16
size is larger (oddly by the capacity size / 1024 bytes). Using the
RC16 size results in illegal LBA range errors when geom tastes the
device. So, expand the quirk to cover all versions of this chip.

Ideally, we'd get both READ CAPACITY 10 and READ CAPACITY 16 sizes and
print a warnnig if they differ and use the smaller of the two numbers,
though that may be problematical as well. Furthermore, SBC-4
encourages users transition to RC16 only, which suggests that in the
future RC10 may disappear from some drives. It's unclear how to cope
with these drives generically.

PR: 234503
MFC After: 1 week

5 years agoAdd _PC_ACL_* to vop_stdpathconf
sjg [Mon, 11 Mar 2019 20:40:56 +0000 (20:40 +0000)]
Add _PC_ACL_* to vop_stdpathconf

This avoid EINVAL from tmpfs etc.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D19512

5 years agoFix amd64/i386 LINT build after r344982
wulf [Mon, 11 Mar 2019 19:46:15 +0000 (19:46 +0000)]
Fix amd64/i386 LINT build after r344982

Submitted by: jkim
Reported by: rpokala
MFC with: r344982

5 years agoPull in r355854 from upstream llvm trunk (by Jonas Paulsson):
dim [Mon, 11 Mar 2019 19:15:57 +0000 (19:15 +0000)]
Pull in r355854 from upstream llvm trunk (by Jonas Paulsson):

  [RegAlloc]  Avoid compile time regression with multiple copy hints.

  As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive
  compile time building opencollada"), this patch makes sure that no
  phys reg is hinted more than once from getRegAllocationHints().

  This handles the case were many virtual registers are assigned to the
  same physreg. The previous compile time fix (r343686) in
  weightCalcHelper() only made sure that physical/virtual registers are
  passed no more than once to addRegAllocationHint().

  Review: Dimitry Andric, Quentin Colombet
  https://reviews.llvm.org/D59201

This should fix a hang when compiling certain generated .cpp files in
the graphics/opencollada port.

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

5 years agoMerge LLVM libunwind release_80 branch r355677 (effectively, 8.0.0 rc4).
dim [Mon, 11 Mar 2019 18:56:04 +0000 (18:56 +0000)]
Merge LLVM libunwind release_80 branch r355677 (effectively, 8.0.0 rc4).

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

5 years agoMerge LLVM libunwind trunk r351319, from just before upstream's
dim [Mon, 11 Mar 2019 18:45:36 +0000 (18:45 +0000)]
Merge LLVM libunwind trunk r351319, from just before upstream's
release_80 branch point.  Afterwards, we will merge the rest of the
changes in the actual release_80 branch.

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

5 years agoRevert minor part of r344934.
mav [Mon, 11 Mar 2019 17:39:09 +0000 (17:39 +0000)]
Revert minor part of r344934.

I tried to save some CPU time on hopeless aggregation attempts, but it seems
the condition I added is overly strict, blocking also aggregation of optional
I/Os in cases which previously were possible.  Revert just to be safe.

MFC after: 1 month

5 years agoUpdate entries for accounts@, backups@, dnsadm@, mirror-admin@, and
gjb [Mon, 11 Mar 2019 15:47:26 +0000 (15:47 +0000)]
Update entries for accounts@, backups@, dnsadm@, mirror-admin@, and
remove refadm@.

Sponsored by: The FreeBSD Foundation

5 years agoUpdate the re@ member list.
gjb [Mon, 11 Mar 2019 15:36:24 +0000 (15:36 +0000)]
Update the re@ member list.

Sponsored by: The FreeBSD Foundation

5 years agoEliminate useless warning message when reading sysctl node in mlx4core.
hselasky [Mon, 11 Mar 2019 14:34:25 +0000 (14:34 +0000)]
Eliminate useless warning message when reading sysctl node in mlx4core.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoImprove support for switching to and from command polling mode in mlx4core.
hselasky [Mon, 11 Mar 2019 14:29:50 +0000 (14:29 +0000)]
Improve support for switching to and from command polling mode in mlx4core.

Make sure the enter and leave polling routines can be called multiple times
with same setting. Ignore setting polling or event mode twice. This fixes a
deadlock during shutdown if polling mode was already selected.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoFix a scribbler in the PMS driver.
dab [Mon, 11 Mar 2019 14:26:45 +0000 (14:26 +0000)]
Fix a scribbler in the PMS driver.

The ESGL bit was left uninitialized when executing the REPORT LUNS
ioctl. This could allow a zeroed data buffer to be treated as a
scatter/gather list. The firmware would eventually walk past the end
of the data buffer, potentially find what looked like a valid
address/length pair, and write the result to semi-random memory.

Obtained from: Dell EMC Isilon
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D19398

5 years agoFix CRN resets in the isp(4) driver in certain situations.
ken [Mon, 11 Mar 2019 14:21:14 +0000 (14:21 +0000)]
Fix CRN resets in the isp(4) driver in certain situations.

The Command Reference Number (CRN) is part of the FC-Tape features
that we enable when talking to tape drives.  It starts at 1, and
goes to 255 and wraps around to 1.  There are a number of reset
type conditions that result in the CRN getting reset to 1.  These
are detailed in section 4.10 (table 8) of the FCP-4r02b specification.

One of the conditions is when a PRLI (Process Login) is sent by
the initiator, and the Establish Image Pair bit is set in Word 0
of the PRLI.

Previously, the isp(4) driver core sent a notification via
isp_async() that the target had changed or stayed in place, but
there was no indication of whether a PRLI was sent and whether the
Establish Image Pair bit was set.

The result of this was that in some situations, notably
switching back and forth between a direct connection and a switch
connection to a tape drive, the isp(4) driver would fail to reset
the CRN in situations that require it according to the spec.  When
the CRN isn't reset in a situation that requires it, the tape drive
then rejects every subsequent command that is sent to the drive.
It is assuming that the commands are being sent out of order.

So, modify the isp(4) driver to include Word 0 of the PRLI command
when it sends isp_async() notifications of target changes.  Look at
the Establish Image Pair bit, and reset the CRN if that bit is set.

With this change, I am able to switch a tape drive back and forth
between a direct connection and a switch connection, and the isp(4)
driver resets the CRN when it should.

sys/dev/isp_stds.h:
Add bit definitions for PRLI Word 0.

sys/dev/ispmbox.h:
Add PRLI Word 0 to the port database type, isp_pdb_t.

sys/dev/ispvar.h
Add PRLI Word 0 to fcportdb_t.

sys/dev/isp.c:
Populate the new prli_word0 parameter in the port database.

In isp_pdb_add_update(), add a check to see if the
Establish Image Pair bit is set in PRLI Word 0.  If it is,
then that is an additional reason to create a change
notification.

sys/dev/isp_freebsd.c:
In isp_async(), if the device changed or stayed, look at
PRLI Word 0 to see if the Establish Image Pair bit is set.
If it is, reset the CRN if we haven't already.

MFC after: 1 week
Sponsored by: Spectra Logic
Differential Revision: https://reviews.freebsd.org/D19472

5 years agoRemove an unneeded 'tail -n 1' from a pipeline
lidl [Mon, 11 Mar 2019 13:33:03 +0000 (13:33 +0000)]
Remove an unneeded 'tail -n 1' from a pipeline

When piping to awk, it's almost always an anti-pattern to use 'grep'
first.

When not in a pipeline, sometimes it is faster to use tail, as awk
must process all the lines in the input stream, and won't 'seek'.
In a pipeline, both grep and awk must process all lines, so we might
as well skip the extra process creation for tail and just use awk
for all the processing.

Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19441

5 years agoAdd IP_FW_NAT64 to codes that ipfw_chk() can return.
ae [Mon, 11 Mar 2019 10:42:09 +0000 (10:42 +0000)]
Add IP_FW_NAT64 to codes that ipfw_chk() can return.

It will be used by upcoming NAT64 changes. We use separate code
to avoid propogating EACCES error code to user level applications
when NAT64 consumes a packet.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

5 years agoAdd NULL pointer check to nat64_output().
ae [Mon, 11 Mar 2019 10:33:32 +0000 (10:33 +0000)]
Add NULL pointer check to nat64_output().

It is possible, that a processed packet was originated by local host,
in this case m->m_pkthdr.rcvif is NULL. Check and set it to V_loif to
avoid NULL pointer dereference in IP input code, since it is expected
that packet has valid receiving interface when netisr processes it.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

5 years agoiwm(4): use correct channel list source for Intel 3168
avos [Mon, 11 Mar 2019 08:30:29 +0000 (08:30 +0000)]
iwm(4): use correct channel list source for Intel 3168

Intel 3168 uses another EEPROM section to store channel flags;
port missing bits from iwlwifi to make it work.

PR: 230750, 236235
Tested by: Bert JW Regeer <xistence@0x58.com>
MFC after: 3 days

5 years agoMark the imx_spi device busy while transfers are in progress, so that the
ian [Mon, 11 Mar 2019 03:07:05 +0000 (03:07 +0000)]
Mark the imx_spi device busy while transfers are in progress, so that the
module can't be unloaded while interrupts are pending.

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 agoVendor import of LLVM libunwind trunk r351319 (just before the
dim [Fri, 8 Mar 2019 22:14:20 +0000 (22:14 +0000)]
Vendor import of LLVM libunwind trunk r351319 (just before the
release_80 branch point):
https://llvm.org/svn/llvm-project/libunwind/trunk@351319

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.