Commit Graph

242026 Commits

Author SHA1 Message Date
Koichiro Iwao
83b187575b Add self to calendar, per mckusick's request 2019-06-05 03:40:34 +00:00
Warner Losh
de357a736d Eliminate unused uuid parameters from gptread and gptread_table. We
only need it for the gptfind() function, where it's used.
2019-06-05 02:34:58 +00:00
Ed Maste
7120683d7f move llvm-ar and llvm-nm to appropriate location in OptionalObsoleteFiles.inc
After r348610 `make delete-old` was still removing llvm-ar and llvm-nm
(and associated man pages).

Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2019-06-05 00:55:22 +00:00
Warner Losh
92fb04661f ufs_module.c can't currently be compiled with -Wcast-align, but the
code is safe enough. Turn off the warning for now until I can find the
right construct to silence it in the code.
2019-06-05 00:08:30 +00:00
Warner Losh
cf461fdb1d Don't shadow a global zfsmount variable. 2019-06-05 00:04:21 +00:00
Adriaan de Groot
f88c56bce1 Add self to calendar, per Kirk's request 2019-06-04 21:54:34 +00:00
Bjoern A. Zeeb
96b3894360 Rather than using the legacy IP struct fields in the union for the
port number, properly access them by their IPv6 names.
This will make it easier to slice up and compile out address families
in the future.

No functional change intended.

MFC after:	6 weeks
2019-06-04 20:53:35 +00:00
Vincenzo Maffione
e5f89a8c84 Add myself to committers-src.dot and calendar.freebsd
Reviewed by:	mckusick
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20518
2019-06-04 19:59:43 +00:00
Ed Maste
7e65018aa6 vtfontcvt: zero memory allocated by xmalloc
PR:		205707
Submitted by:	Dmitry Wagin
2019-06-04 19:39:06 +00:00
Cy Schubert
37dbd136c3 While working on a PR, more are discovered.
Remove more #ifdefs missed in r343701.

MFC after:	1 week
2019-06-04 19:37:51 +00:00
Cy Schubert
e5492b8bc4 Clean up #ifdefs from old unsupported releases of FreeBSD.
MFC after:	1 week
2019-06-04 19:25:32 +00:00
Doug Moore
b4fa9d0366 Add birthday entry. 2019-06-04 19:16:05 +00:00
Sean Eric Fagan
f1ce120379 Add my birthday entry, per Kirk's request 2019-06-04 19:06:33 +00:00
Ed Maste
4c42647e13 vtfontcvt: include width and height in verbose info
PR:		205707
Submitted by:	Dmitry Wagin
2019-06-04 18:55:02 +00:00
Ed Maste
2810d2385c vtfontcvt: rework height/width setting
Introduce VFNT_MAXDIMENSION to replace bare 128, add set_height, and
consistently use set_height and set_width.

PR:		205707
Submitted by:	Dmitry Wagin
2019-06-04 18:49:49 +00:00
Mark Johnston
2d2748710a Remove an outdated header comment for vm_page.c.
The listed rules were incomplete and outdated.  There is a much more
comprehensive comment in vm_page.h.

Reviewed by:	alc, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20503
2019-06-04 18:38:27 +00:00
Warner Losh
b5f3ad3ad1 Use newly minted efi_devpath_same_disk() instead of
efi_devpath_match(). This fixes a regression in r347193.

Reported by: Tomoaki AOKI
Differential Revision: https://reviews.freebsd.org/D20513
2019-06-04 18:36:12 +00:00
Warner Losh
83ffeb8b52 Introduce efi_devpath_same_disk
This is like efi_devpath_match, but allows differing device media
paths. Those just specify the partition information.

Differential Revision: https://reviews.freebsd.org/D20513
2019-06-04 18:36:07 +00:00
Mark Johnston
bc589b723e elfcopy: Use libelftc's string table routines to build .shstrtab.
This replaces some hand-rolled routines and is substantially faster
since libelftc uses a hash table for lookups and insertions, whereas
elfcopy would perform a linear scan of the table.

PR:		234949
Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20473
2019-06-04 18:34:05 +00:00
Ed Maste
d7bcf73630 vtfontcvt: unwrap a line per style(9)
PR:		205707
Submitted by:	Dmitry Wagin
2019-06-04 18:31:52 +00:00
Mark Johnston
0d951ba85c libelftc: Fix some minor style bugs.
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20472
2019-06-04 18:31:08 +00:00
Mark Johnston
dc2282fc8b elfcopy: Use elf_getscn() instead of iterating over all sections.
When removing a section, we would loop over all sections looking for
a corresponding relocation section.  With r348652 it is much faster
to just use elf_getscn().

PR:		234949
Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20471
2019-06-04 18:29:08 +00:00
Ed Maste
3c7951c78b vtfontcvt: use VFNT_MAP_{NORMAL|BOL}_RH symbolic constants
PR:		205707
Reported by:	Dmitry Wagin
MFC after:	1 month
2019-06-04 18:26:42 +00:00
Mark Johnston
8c953901bf libelf: Use a red-black tree to manage the section list.
The tree is indexed by section number.  This speeds up elf_getscn()
and its callers, which previously had to traverse a linked list. In
particular, since .shstrtab is often the last section in a file,
elf_strptr() would have to traverse the entire list.

PR:		234949
Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20443
2019-06-04 18:26:29 +00:00
Hans Petter Selasky
9ccaf2215a In usb(4) fix a lost completion event issue towards libusb(3). It may happen
if a USB transfer is cancelled that we need to fake a completion event.
Implement missing support in ugen_fs_copy_out() to handle this.

This fixes issues with webcamd(8) and firefox.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-06-04 16:40:18 +00:00
Alan Cox
6f1412f800 The changes to pmap_demote_pde_locked()'s control flow in r348476 resulted
in the loss of a KASSERT that guarded against the invalidation a wired
mapping.  Restore this KASSERT.

Remove an unnecessary KASSERT from pmap_demote_pde_locked().  It guards
against a state that was already handled at the start of the function.

Reviewed by:	kib
X-MFC with:	r348476
2019-06-04 16:21:14 +00:00
Conrad Meyer
09a3675d96 daemon(8): Don't block SIGTERM during restart delay
I believe this was introduced in the original '-r' commit, r231911 (2012).
At the time, the scope was limited to a 1 second sleep.  r332518 (2018)
added '-R', which increased the potential duration of the affected interval
(from 1 to N seconds) by permitting arbitrary restart intervals.

Instead, handle SIGTERM normally during restart-sleep, when the monitored
process is not running, and shut down promptly.

(I noticed this behavior when debugging a child process that exited quickly
under the 'daemon -r -R 30' environment.  'kill <daemonpid>' had no
immediate effect and the monitor process slept until the next restart
attempt.  This was annoying.)

Reviewed by:	allanjude, imp, markj
Differential Revision:	https://reviews.freebsd.org/D20509
2019-06-04 16:07:01 +00:00
Ed Maste
b734222edd elf_common: add GNU note types and NT_GNU_PROPERTY_TYPE_0 bits
To support Intel CET IBT/Shadow Stack.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-06-04 15:44:31 +00:00
Ed Maste
004caac2d8 style(9) / tidying for r348611
MFC with:	r348611
Event:		Waterloo Hackathon 2019
2019-06-04 13:45:30 +00:00
Ed Maste
74cd06b42e Expose the kernel's build-ID through sysctl
After our migration (of certain architectures) to lld the kernel is built
with a unique build-ID.  Make it available via a sysctl and uname(1) to
allow the user to identify their running kernel.

Submitted by:	Ali Mashtizadeh <ali_mashtizadeh.com>
MFC after:	2 weeks
Relnotes:	Yes
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20326
2019-06-04 13:07:10 +00:00
Ed Maste
9c954a4843 build llvm-ar and llvm-nm with Clang (promote out of CLANG_EXTRAS)
To facilitate experimentation with LTO we require an ar that supports
LLVM IR, and to a lesser degree also an nm.  As a first step always
install llvm-ar and llvm-nm.

Sponsored by:	The FreeBSD Foundation
2019-06-04 13:00:49 +00:00
Ed Maste
cbc493c662 Makefile.inc1: clean up stale dependency hacks
Carrying on from r339607, remove ad-hoc dependency cleanup for changes
prior to June 2018.

Sponsored by:	The FreeBSD Foundation
2019-06-04 12:56:20 +00:00
Hans Petter Selasky
253c93f26b In xhci(4) there is no stream ID in the completion TRB.
Instead iterate all the stream IDs in stream mode to find
the matching USB transfer.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-06-04 09:01:02 +00:00
Hans Petter Selasky
76a3555808 Make sure the DMA tags get freed in mlx5en(4).
MFC after:	3 days
Sponsored by:	Mellanox Technologies
2019-06-04 08:06:51 +00:00
Xin LI
51a1c26a18 Don't increment cl after increment.
MFC after:	3 days
2019-06-04 07:02:20 +00:00
Slava Shwartsman
bb43866c38 Fix prio vs. nonprio tagged traffic in RDMACM
In current RDMACM implementation RDMACM server will not find a GID
index when the request was prio-tagged and the sever is non
prio-tagged and vise-versa.
According to 802.1Q-2014, VLAN tagged packets with VLAN id 0 should
be considered as untagged. Treat RDMACM request the same.

Reviewed by:    hselasky, kib
MFC after:      3 Days
Sponsored by:   Mellanox Technologies
2019-06-04 06:21:31 +00:00
Conrad Meyer
0f6040f03e virtio(4): Add PNP match metadata for virtio devices
Register MODULE_PNP_INFO for virtio devices using the newbus PNP information
provided by the previous commit.  Matching can be quite simple; existing
probe routines only matched on bus (implicit) and device_type.  The same
matching criteria are retained exactly, but is now also available to
devmatch(8).

Reviewed by:	bryanv, markj; imp (earlier version)
Differential Revision:	https://reviews.freebsd.org/D20407
2019-06-04 02:37:11 +00:00
Conrad Meyer
dfca0a8b3d virtio(4): Expose PNP metadata through newbus
Expose the same fields and widths from both vtio buses, even though they
don't quite line up; several virtio drivers can attach to both buses,
and sharing a PNP info table for both seems more convenient.

In practice, I doubt any virtio driver really needs to match on anything
other than bus and device_type (eliminating the unused entries for
vtmmio), and also in practice device_type is << 2^16 (so far, values
range from 1 to 20).  So it might be fine to only expose a 16-bit
device_type for PNP purposes.  On the other hand, I don't see much harm
in overkill here.

Reviewed by:	bryanv, markj (earlier version)
Differential Revision:	https://reviews.freebsd.org/D20406
2019-06-04 02:34:59 +00:00
Conrad Meyer
ad5979f7da virtio_random(4): Fix random(4) integration
random(4) masks unregistered entropy sources.  Prior to this revision,
virtio_random(4) did not correctly register a random_source and did not
function as a source of entropy.

Random source registration for loadable pure sources requires registering a
poll callback, which is invoked periodically by random(4)'s harvestq
kthread.  The periodic poll makes virtio_random(4)'s periodic entropy
collection redundant, so this revision removes the callout.

The current random source API is somewhat limiting, so simply fail to attach
any virtio_random devices if one is already registered as a source.  This
scenario is expected to be uncommon.

While here, handle the possibility of short reads from the hypervisor random
device gracefully / correctly.  It is not clear why a hypervisor would
return a short read or if it is allowed by spec, but we may as well handle
it.

Reviewed by:	bryanv (earlier version), markm
Security:	yes (note: many other "pure" random sources remain broken)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20419
2019-06-04 00:01:37 +00:00
Conrad Meyer
208be1617c style.9: Codify tolerance for eliding blank lines
Consensus seems to be that eliding blank lines for functions with no local
variables is acceptable.  Codify that explicitly in the style document.

Reported by:	jhb
Reviewed by:	delphij, imp, vangyzen (earlier version); rgrimes
With feedback from:	kib
Differential Revision:	https://reviews.freebsd.org/D20448
2019-06-03 23:57:29 +00:00
John Baldwin
beb388db08 Emulate the AMD MSR_LS_CFG MSR used for various Ryzen errata.
Writes are ignored and reads always return zero.

Submitted by:	José Albornoz <jojo@eljojo.net> (write-only version)
Reviewed by:	Patrick Mooney, cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19506
2019-06-03 23:17:35 +00:00
Rick Macklem
c2ec111378 r348590 had mention of "-I" in a comment that no longer applied to the patch.
Take "-I" out of the comment line, since the patch no longer uses the "-I"
option.

MFC after:	1 month
2019-06-03 23:07:46 +00:00
Rick Macklem
0f0869bca3 Modify mountd so that it incrementally updates the kernel exports upon a reload.
Without this patch, mountd would delete/load all exports from the exports
file(s) when it receives a SIGHUP. This works fine for small exports file(s),
but can take several seconds to do when there are large numbers (10000+) of
exported file systems. Most of this time is spent doing the system calls
that delete/export each of these file systems. When the "-S" option
has been specified (the default these days), the nfsd threads are suspended
for several seconds while the reload is done.

This patch changes mountd so that it only does system calls for file systems
where the exports have been changed/added/deleted as compared to the exports
done for the previous load/reload of the exports file(s).
Basically, when SIGHUP is posted to mountd, it saves the exportlist structures
from the previous load and creates a new set of structures from the current
exports file(s). Then it compares the current with the previous and only does
system calls for cases that have been changed/added/deleted.
The nfsd threads do not need to be suspended until the comparison step is
being done. This results in a suspension period of milliseconds for a server
with 10000+ exported file systems.

There is some code using a LOGDEBUG() macro that allow runtime debugging
output via syslog(LOG_DEBUG,...) that can be enabled by creating a file
called /var/log/mountd.debug. This code is expected to be replaced with
code that uses dtrace by cy@ in the near future, once issues w.r.t. dtrace
in stable/12 have been resolved.

The patch should not change the usage of the exports file(s), but improves
the performance of reloading large exports file(s) where there are only a
small number of changes done to the file(s).

Tested by:	pen@lysator.liu.se
PR:		237860
Reviewed by:	kib
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D20487
2019-06-03 22:58:51 +00:00
Maxim Sobolev
6c4448b394 Put back MTREE_CMD here for now. Doh, not my day, perhaps.
Reported by:	markj, mav
2019-06-03 21:40:42 +00:00
Alexander Motin
0b5319dda0 MFV r348585: 9683 Allow bypassing devid in vdev_disk_open()
illumos/illumos-gate@6fe4f3002c

Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Pavel Zakharov <pavel.zakharov@delphix.com>

This is irrelevant to FreeBSD, just to reduce divergence.
2019-06-03 20:55:52 +00:00
Alexander Motin
43f20e31a6 9683 Allow bypassing devid in vdev_disk_open()
illumos/illumos-gate@6fe4f3002c

Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Pavel Zakharov <pavel.zakharov@delphix.com>
2019-06-03 20:52:19 +00:00
Alexander Motin
9b048dd219 MFV r348583: 9847 leaking dd_clones (DMU_OT_DSL_CLONES) objects
illumos/illumos-gate@17fb938fd6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Matthew Ahrens <mahrens@delphix.com>
2019-06-03 20:49:20 +00:00
Alexander Motin
e3f8abf29a 9847 leaking dd_clones (DMU_OT_DSL_CLONES) objects
illumos/illumos-gate@17fb938fd6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Matthew Ahrens <mahrens@delphix.com>
2019-06-03 20:45:48 +00:00
Alexander Motin
eb106113c2 MFV r348580: 9559 zfs diff handles files on delete queue in fromsnap poorly
illumos/illumos-gate@20633e304b

Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Paul Dagnelie <pcd@delphix.com>
2019-06-03 20:40:32 +00:00
Alexander Motin
3705c6e18f 9559 zfs diff handles files on delete queue in fromsnap poorly
illumos/illumos-gate@20633e304b

Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Paul Dagnelie <pcd@delphix.com>
2019-06-03 20:39:13 +00:00