Commit Graph

250290 Commits

Author SHA1 Message Date
Navdeep Parhar
b0dede77b1 cxgbe/iw_cxgbe: Add an async callback to notify iw_cxgbe in case of a
fatal error.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2020-05-19 16:28:20 +00:00
Xin LI
a918433b8a Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2020-05-19 16:06:03 +00:00
Andrew Turner
ad020198ff Stop performing a full icache sync when the DIC and IDC flags are set
The DIC and IDC bits in the CTR_EL0 register signal to the kernel when it
can relax the instruction cache synchronisation operations. The IDC bit
means we can relax cleaning the data cache to the point of unification
while the DIC bit means we don't need to invalidate the instruction cache
for data coherence. In both cases an appropriate barrier is still needed.

For now only implement the case where both bits are set, as is the case
on the Neoverse-N1 as used in the Amazon AWS Graviton 2 CPU. Note that
this behaviour is a optional on the N1 so we may later need to implement
only one or the other bit being set.

There is a tunable to disable each flag on boot.

Testing on a 4 core Graviton 2 instance found a significant improvement
in sys and real time when running "make buildkernel -j4", with no
significant difference in user time.

Reviewed by:	markj
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D24853
2020-05-19 16:04:27 +00:00
Andrew Turner
13628ada98 Create MSI/MSI-X isrcs as needed in the GICv3 ITS driver
Previously we would create an isrc for each MSI/MSI-X interrupt. This
causes issues for other interrupt sources in the system, e.g. a GPIO
driver, as they may be unable to allocate interrupts. This works around
this by allocating the isrc only when needed.

Reported by:	alisaidi@amazon.com
Reviewed by:	mmel
Sponsored by:	Innovaate UK
Differential Revision:	https://reviews.freebsd.org/D24876
2020-05-19 15:27:20 +00:00
Kyle Evans
1840a4fa01 bsdinstall: do a certctl rehash upon installation of configuration
If certctl is installed on the system we're configuring, do a certctl
rehash.

Note that certctl may not be present if the world we've installed was built
either WITHOUT_OPENSSL or WITHOUT_CAROOT. In this scenario, we don't
currently see if the host has a certctl as this may be an indication that
the system *shouldn't* have certs installed into /etc/ssl.

Reviewed by:	allanjude, dteske
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D24640
2020-05-19 15:19:39 +00:00
Takanori Watanabe
022f27959e Fix Typo in ng_hci_le_connection_complete_ep struct.
PR:	246538
Submitted by:	Marc Veldman
2020-05-19 13:58:52 +00:00
Mark Johnston
6580e4c1c6 Belatedly add a RELNOTES entry for r347532. 2020-05-19 13:54:33 +00:00
Takanori Watanabe
11fb4bdb4d Add LE Whitelist commands to hccontrol
PR: 214555
Submitted by Marc Veldman
2020-05-19 13:44:32 +00:00
Benedict Reuschling
acace3175c The -F flag of swapon(8) requires -a to work.
Before this change, swapon(8) implied that -F works as a standalone option,
which is not the case and would produce a usage message. This change extends
the description of the -F option to mention that -a is required with it.

PR:		238551
Submitted by:	Christian Baltini
MFC after:	5 days
2020-05-19 12:16:44 +00:00
Benedict Reuschling
d50ff7de21 Fix a typo: argments -> arguments
PR:		243294
Submitted by:	Igor Ostapenko
MFC after:	5 days
2020-05-19 11:05:27 +00:00
Benedict Reuschling
8655a965fd Update SYNOPSIS section to be consistent regarding -u, -i, and -I.
Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.

With the updated SYNOPSIS, it is now allowed (and consistent) to run:

sed -i BAK s/foo/bar/g some_file

PR:		240556
Submitted by:	Oliver Fromme
MFC after:	5 days
2020-05-19 09:17:20 +00:00
Emmanuel Vadot
eda697d2ef linuxkpi: Add irq_work.h
Since handlers are call in a thread context we can simply use a workqueue
to emulate those functions.
The DRM code was patched to do that already, having it in linuxkpi allows us
to not patch the upstream code.

Sponsored-by: The FreeBSD Foundation
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D24859
2020-05-19 09:04:35 +00:00
Emmanuel Vadot
5e30a739c7 linuxkpi: add pci_dev_present
pci_dev_present shows if a set of pci ids are present in the system.
It just wraps pci_find_device.
Needed by DRMv5.2

Submitted by:	Austing Shafer (ashafer@badland.io)
Differential Revision:	https://reviews.freebsd.org/D24796
2020-05-19 08:44:33 +00:00
Emmanuel Vadot
ff443195bf linuxkpi: Add __init_waitqueue_head
The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

Sponsored-by: The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24861
2020-05-19 08:43:17 +00:00
Michael Tuexen
999f86d67d Replace snprintf() by SCTP_SNPRINTF() and let SCTP_SNPRINTF() map
to snprintf() on FreeBSD. This allows to check for failures of snprintf()
on platforms other than FreeBSD kernel.
2020-05-19 07:23:35 +00:00
Michael Tuexen
821bae7cf3 Revert r361209:
cem noted that on FreeBSD snprintf() can not fail and code should not
check for that.

A followup commit will replace the usage of snprintf() in the SCTP
sources with a variadic macro SCTP_SNPRINTF, which will simply map to
snprintf() on FreeBSD and do a checking similar to r361209 on
other platforms.
2020-05-19 07:21:11 +00:00
Li-Wen Hsu
6c9dbd8b13 Revert r361237, it's fixed by r361231
PR:		246560
Sponsored by:	The FreeBSD Foundation
2020-05-19 07:16:09 +00:00
Kyle Evans
ac65add052 Belated RELNOTES entry for r361238
This may get revised later if the larger change lands, but we should note
this.
2020-05-19 03:19:01 +00:00
Kyle Evans
47c7d8327c zfs: reject read(2) of a dirfd with EISDIR
This is independent of the recently-discussed global change, which is still
in review/discussion stage.

This is effectively a measure for consistency in the ZFS world, where
FreeBSD was the only platform (as far as I could find) that allowed this.
What ZFS exposes is decidedly not useful for any real purposes, to
paraphrase (hopefully faithfully) jhb's findings when exploring this:

The size of a directory in ZFS is the number of directory entries within.
When reading a directory, you would instead get the leading part of its raw
contents; the amount you get being dictated by the "size," i.e. number of
directory entries. There's decidedly (luckily) no stack disclosure happening
here, though the behavior is bizarre and almost certainly a historical
accident.

This change has already been upstreamed to OpenZFS.

MFC after:	1 week
2020-05-19 02:41:05 +00:00
Li-Wen Hsu
3f5fe78b9a Temporarily disable test case causes kernel panic in CI:
- sys.netinet.so_reuseport_lb_test.basic_ipv6

PR:		246560
Sponsored by:	The FreeBSD Foundation
2020-05-19 02:07:08 +00:00
Justin Hibbits
1da3138f68 powerpc/mmu: Don't use the cache instructions to zero pages
A page (even physmem) can be marked as cache-inhibited.  Attempting to use
'dcbz' to zero a page mapped cache-inhibited triggers an alignment
exception, which is fatal in kernel.  This was seen when testing hardware
acceleration with X on POWER9.

At some point in the future, this should be changed to a more straight
forward zero loop instead of bzero(), and a similar change be made to the
other pmaps.

Reported by:	pkubaj@
2020-05-19 01:06:31 +00:00
Mike Karels
2fdbcbea76 Fix NULL-pointer bug from r361228.
Note that in_pcb_lport and in_pcb_lport_dest can be called with a NULL
local address for IPv6 sockets; handle it.  Found by syzkaller.

Reported by:	cem
MFC after:	1 month
2020-05-19 01:05:13 +00:00
Ed Maste
36b1f67ca1 blacklistd.conf.5: typo/grammar fixes
PR:		246467
Submitted by:	Mike Lempriere
2020-05-19 00:15:19 +00:00
Li-Wen Hsu
f9777376b9 Revert 357780, dtrace -c has been fixed in head`
PR:		244053
Sponsored by:	The FreeBSD Foundation
2020-05-18 23:43:48 +00:00
Mike Karels
2510235150 Allow TCP to reuse local port with different destinations
Previously, tcp_connect() would bind a local port before connecting,
forcing the local port to be unique across all outgoing TCP connections
for the address family. Instead, choose a local port after selecting
the destination and the local address, requiring only that the tuple
is unique and does not match a wildcard binding.

Reviewed by:	tuexen (rscheff, rrs previous version)
MFC after:	1 month
Sponsored by:	Forcepoint LLC
Differential Revision:	https://reviews.freebsd.org/D24781
2020-05-18 22:53:12 +00:00
Michael Tuexen
6863ab0b8b Remove assignment without effect.
MFC after:	3 days
2020-05-18 19:48:38 +00:00
Michael Tuexen
9e8c9c9ef6 Don't check an unsigned variable for being negative.
MFC after:		3 days.
2020-05-18 19:35:46 +00:00
Michael Tuexen
04ce5df9c9 Remove redundant assignment.
MFC after:		3 days
2020-05-18 19:23:01 +00:00
Michael Tuexen
bca1802890 Cleanup, no functional change intended.
MFC after:		3 days
2020-05-18 18:42:43 +00:00
Alan Somers
275379902e fusefs: fix intermittency in some ENOENT tests
When a FUSE operation other than LOOKUP returns ENOENT, the kernel will
reclaim that vnode, resuling in a FUSE_FORGET being sent a short while
later.  Many of the ENOENT tests weren't expecting those FUSE_FORGET
operations.  They usually passed by luck since FUSE_FORGET is often delayed.
This commit adds appropriate expectations.

MFC after:	2 weeks
2020-05-18 18:36:32 +00:00
Michael Tuexen
6395219ae3 Avoid an integer underflow.
MFC after:		3 days
2020-05-18 18:32:58 +00:00
Michael Tuexen
60017c8e88 Remove redundant check.
MFC after:		3 days
2020-05-18 18:27:10 +00:00
John Baldwin
2c213c2e75 Correct the order of arguments to copyin() for Q_SETQUOTA.
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24656
2020-05-18 16:47:44 +00:00
Ed Maste
eb95dbfa4f GNU as: move deprecation message after option parsing
Some cmake test parses the output of the first line of as --version, and
emits an error if it does not contain some expected strings:

Checking whether the ASM compiler is GNU using "--version" did not match
"(GNU assembler)|(GCC)|(Free Software Foundation)"

Emit the deprecation message later, after parsing argv and thus --version.

PR:		246540
Reported by:	dch
Sponsored by:	The FreeBSD Foundation
2020-05-18 16:07:14 +00:00
Andrew Turner
bc71118183 Allow the FACS and XFACS to be zero in acpidump.
These are allowed to be zero when the hardware reduced APCI flag is set

Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D23207
2020-05-18 15:05:59 +00:00
Aleksandr Fedorov
e90337e48f bhyve(8): Add the netgraph network backend decription to the manpage.
Reviewed by:	vmaffione, bcr
Approved by:	vmaffione (mentor)
Sponsored by:	vstack.com
Differential Revision:	https://reviews.freebsd.org/D24846
2020-05-18 15:03:52 +00:00
Michael Tuexen
88116b7e4d Fix logical condition by looking at usecs.
This issue was found by cpp-check running on the userland stack.

MFC after:		3 days
2020-05-18 15:02:15 +00:00
Michael Tuexen
00023d8a87 Whitespace change.
MFC after:		3 days
2020-05-18 15:00:18 +00:00
Li-Wen Hsu
b13788e396 Temporarily disable failing case in CI of amd64:
- lib.libexecinfo.backtrace_test.backtrace_fmt_basic

PR:		246537
Sponsored by:	The FreeBSD Foundation
2020-05-18 12:36:28 +00:00
Michael Tuexen
e708e2a4f4 Handle failures of snprintf().
MFC after:		3 days
2020-05-18 10:07:01 +00:00
Colin Percival
5f148eeefd Add ebsnvme-id to EC2 AMIs and enable /dev/aws/disk
The ebsnvme-id utility exposes information about EC2 disks -- for
Elastic Block Store volumes, their volume IDs and "linux device
names", and for Instance Store (aka "Ephemeral") disks, their
serial numbers.

The dev_aws_disk rc.d script and associated devd.conf rule maintains
a tree under /dev/aws/disk:
	/dev/aws/disk/ebs/<volume ID>
	/dev/aws/disk/linuxname/<linux device name>
	/dev/aws/disk/ephemeral/<serial number>
which are symlinks to the corresponding nda or nvd devices.

MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2020-05-18 02:14:25 +00:00
Kyle Evans
20076f97fd Revert r360833, r360882: certctl rehash in installworld
This was solving the correct-ish problem in the wrong place. Noted by
brooks; while he didn't request a prompt revert, doing so now will
facilitate proper testing for the revised version of this.
2020-05-18 01:48:55 +00:00
Kyle Evans
09841aabfa certctl: don't fall over flat with relative DESTDIR
Up until now, all of our DESTDIR use has been with absolute paths. It turned
out that the cd in/out dance we do here breaks us down later on, as the
relative path no longer resolves.

Convert EXTENSIONS to an ERE that we'll use to grep ls -1 of the dir we're
inspecting, rather than cd'ing into it and globbing it up.

MFC after:	3 days
2020-05-18 01:35:44 +00:00
Rick Macklem
3d7650f04c Add a function nfsm_set() to initialize "struct nfsrv_descript" for building
mbuf lists.

This function is currently trivial, but will that will change when
support for building NFS messages in ext_pgs mbufs is added.
Adding support for ext_pgs mbufs is needed for KERN_TLS, which will
be used to implement nfs-over-tls.
2020-05-18 00:07:45 +00:00
Michael Tuexen
da8c34c382 Non-functional changes, cleanups.
MFC after:		3 days
2020-05-17 22:31:38 +00:00
Colin Percival
ba97bfb0de Add /etc/autofs/special_efs to EC2 AMIs
Since Amazon Elastic File System is only available within AWS, it seems
more appropriate to have this added only in EC2 AMIs rather than
"polluting" non-EC2 images with it.

Reviewed by:	gjb
MFC after:	7 days
Relnotes:	Amazon EFS filesystems can be automounted by enabling autofs
		and placing "/efs -efs" into /etc/auto_master.
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D24791
2020-05-17 21:54:59 +00:00
Emmanuel Vadot
355711ea76 linuxkpi: Add offsetofend macro
This calculate the offset of the end of the member in the given struct.
Needed by DRM in Linux v5.3

Sponsored-by: The FreeBSD Foudation
Differential Revision:	https://reviews.freebsd.org/D24849
2020-05-17 20:14:49 +00:00
Emmanuel Vadot
d003cc4318 linuxkpi: Add __mutex_init
Same as mutex_init, the lock_class_key argument seems to be only used for
debug in Linux, simply ignore it for now.
Needed by DRM in Linux v5.3

Sponsored-by: The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24848
2020-05-17 20:12:16 +00:00
Emmanuel Vadot
7708d3d765 linuxkpi: Add atomic_dec_and_mutex_lock
This function decrement the counter and if the result is 0 it acquires
the mutex and returns 1, if not it simply returns 0.
Needed by DRM from Linux v5.3

Sponsored-by: The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24847
2020-05-17 20:09:11 +00:00
Alexander V. Chernikov
174fb9dbb1 Remove redundant checks for nhop validity.
Currently NH_IS_VALID() simly aliases to RT_LINK_IS_UP(), so we're
 checking the same thing twice.

In the near future the implementation of this check will be simpler,
 as there are plans to introduce control-plane interface status monitoring
 similar to ipfw interface tracker.
2020-05-17 15:32:36 +00:00