Commit Graph

266187 Commits

Author SHA1 Message Date
Rick Macklem
5860696e69 UPDATING: Add entry for __FreeBSD_version bump to 1400022 2021-06-11 18:59:36 -07:00
Rick Macklem
40cc9a3a6b param.h: Bump __FreeBSD_version to 1400022
Commit e1a907a25c changed the internal KAPI between the krpc
and nfsserver.  As such, both modules must be rebuilt from
sources.  Bump __FreeBSD_version to 1400022.
2021-06-11 18:53:02 -07:00
John Baldwin
2349cda44f bhyve vtblk: Inform guests of disk resize events.
Register a resize callback with the blockif interface.  When the
callback fires, update the size of the disk and notify the guest via a
configuration change interrupt.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30506
2021-06-11 18:00:25 -07:00
John Baldwin
c06676bee3 bhyve: Split out a lower-level helper for VirtIO interrupts.
This allows device models to assert VirtIO interrupts for reasons
other than publishing changes to a VirtIO ring such as configuration
changes.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30505
2021-06-11 18:00:25 -07:00
John Baldwin
8794846a91 bhyve: Add support for handling disk resize events to block_if.
Allow clients of blockif to register a resize callback handler.  When
a callback is registered, register an EVFILT_VNODE kevent watching the
backing store for a change in the file's attributes.  If the size has
changed when the kevent fires, invoke the clients' callback.

Currently resize detection is limited to backing stores that support
EVFILT_VNODE kevents such as regular files.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30504
2021-06-11 18:00:24 -07:00
John Baldwin
67d60dcce6 bhyve: Add support for EVFILT_VNODE mevents.
This allows registering an event to watch for changes to a file's
attributes.  This is a bit imperfect as it would be nice to have a way
to determine if an fd can use EVFILT_VNODE successfully.  mevent's
current structure does not permit that and a failure to register a
single kevent impacts several other kevents.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30503
2021-06-11 18:00:24 -07:00
John Baldwin
e8424e2947 bhyve: Register new kevents synchronously.
Change mevent_add*() to synchronously add the new kevent.  This
permits reporting event registration failures to the caller and avoids
failing the registration of other, unrelated events queued up in the
same batch.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30502
2021-06-11 18:00:24 -07:00
Rick Macklem
e1a907a25c krpc: Acquire ref count of CLIENT for backchannel use
Michael Dexter <editor@callfortesting.org> reported
a crash in FreeNAS, where the first argument to
clnt_bck_svccall() was no longer valid.
This argument is a pointer to the callback CLIENT
structure, which is free'd when the associated
NFSv4 ClientID is free'd.

This appears to have occurred because a callback
reply was still in the socket receive queue when
the CLIENT structure was free'd.

This patch acquires a reference count on the CLIENT
that is not CLNT_RELEASE()'d until the socket structure
is destroyed. This should guarantee that the CLIENT
structure is still valid when clnt_bck_svccall() is called.
It also adds a check for closed or closing to
clnt_bck_svccall() so that it will not process the callback
RPC reply message after the ClientID is free'd.

Comments by:	mav
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30153
2021-06-11 16:57:14 -07:00
Olivier Houchard
30b915d7b2 an: Remove driver
Now that an(4) is gone, remove it from GENERIC kernel config files.

Reported by:	flo
2021-06-12 01:08:54 +02:00
John Baldwin
2a279163b9 src.conf.5: Regen for svnlite removal.
Reviewed by:	bcr, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D30738
2021-06-11 14:57:51 -07:00
John Baldwin
0333fad1b7 Remove svnlite.
Reviewed by:	bcr, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D30737
2021-06-11 14:56:41 -07:00
John Baldwin
e290182bcf Remove 'make update'.
In the CVS days this used be a wrapper around either CVS or CVSup and
used to support updating src, doc, and ports checkouts.  With the move
to subversion this only supported updating src and was itself a
wrapper around 'svn update'.  With Git, users are probably better off
using appropriate Git commands directly to update without needing an
explicit make target as a wrapper.

Reviewed by:	bcr, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D30736
2021-06-11 14:56:28 -07:00
Warner Losh
cd7de22376 Remove an manpage 2021-06-11 14:40:13 -06:00
Warner Losh
7700494d96 mtk: Add printing of CPU model
Add the line that's in other foo_machdep.c file where the CPU model is
reported.

This was part of github pull request 459, but in a different way. The
rest of that pull request was either committed or not relevant. I did it
in a more correct way.

Submitted by:	Priit Trees
Sponsored by:	Netflix
2021-06-11 14:28:54 -06:00
Priit Trees
768787bee3 mtk: Initialize mask correctly.
Initialization of mask is missing. Fixes a compile issue.

Reviewed by:	imp@
Pull Request:	https://github.com/freebsd/freebsd-src/pull/459
2021-06-11 14:12:08 -06:00
Warner Losh
b0e54e61b3 Change "compiled" to "assembled"
Assembly files are assembled, not compiled.

Submitted by:	github user gAlfonso-bit
Pull Request:	https://github.com/freebsd/freebsd-src/pull/474

Sponsored by:		Netflix
2021-06-11 13:58:51 -06:00
eoli3n
6f4c1456b5 bsdinstall: Allow automation in jails
Set SCRIPT=/path/to/script env var to be able to automate bsdinstall to
a jail.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/473
Reviewed by:	allanjude
2021-06-11 13:53:17 -06:00
Emmanuel Vadot
d865da5edf ancontrol: Remove an(4) utility
Last an(4) devices have been End Of Life and End Of Sale in 2007.
Time to remove this driver.

Differential Revision:	https://reviews.freebsd.org/D30680
Reviewed by:		imp (earlier version), emaste (earlier version)
Sponsored by:		Diablotin Systems
2021-06-11 21:18:21 +02:00
Emmanuel Vadot
663b174b5b an: Remove driver
Last an(4) devices have been End Of Life and End Of Sale in 2007.
Time to remove this driver.

Differential Revision:	https://reviews.freebsd.org/D30679
Reviewed by:		imp (earlier version), emaste (earlier version)
Sponsored by:		Diablotin Systems
2021-06-11 21:18:04 +02:00
Emmanuel Vadot
ab30bb8270 an: Deprecate the driver
Last an(4) devices have been End Of Life and End Of Sale in 2007.
Time to remove this driver.

Differential Revision:	https://reviews.freebsd.org/D30678
Reviewed by:		imp (earlier version), adrian (earlier version)
MFC after:		3 days
Sponsored by:		Diablotin Systems
2021-06-11 21:17:34 +02:00
Oleksandr Tymoshenko
cb25a94558 arm64: allwinner: Add i2s and codec support
Differential Revision:	https://reviews.freebsd.org/D27830
2021-06-11 21:06:08 +02:00
Oleksandr Tymoshenko
2cfe870acd arm64: Add Soc audio framework
This framework is initial implementation of the simple-audio-card compatible
audio driver framework. It provides glue for CPU/codec/aux device.

Differential Revision:	https://reviews.freebsd.org/D27830
2021-06-11 21:06:04 +02:00
Michael Tuexen
f1536bb538 tcp: remove debug output from RACK
Reported by:		iron.udjin@gmail.com, Marek Zarychta
Reviewed by:		rrs
PR:			256538
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D30723
Sponsored by:		Netflix, Inc.
2021-06-11 20:23:39 +02:00
Warner Losh
a3238e92d7 style: Relax 80 column rule
Note that the 80 column rule has been relaxed for some time when things
are clearer when a little longer. Add in that things that people grep
for, such as error messages, shouldn't be broken up which is the most
common reason people exceed 80 columns intentionally.

Reviewed by:		jhb, domagoj.stolfa@gmail.com
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30255
2021-06-11 10:54:06 -06:00
Warner Losh
ab6145c976 style: tweak tab after #define advice
Once upon a time, #define<tab> was cultural thing. However, even when it
was promulgated, it was a minority usage. 20 years ago the split was
30k/69k (tab/space) and today the split is 80k/546k (tab/space). Update
guidance to allow either with the usual suggestion to be consistent
within a file.

Reviewed by:		sef, allenjude, 0mp (prior rev), jhb
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30254
2021-06-11 10:54:06 -06:00
Mariusz Zaborski
89d5cbb822 libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size
of every nvlist separately. For example, if we had a nvlist with three
nodes each containing another (A contains B, and B contains C), we first
calculated the size of nvlist A (which contains B, C), then we calculate
the size of B (which contains C, notice that we already did the
calculation of B, when we calculate A), and finally C. This means that
this calculation was O(N!). This was done because each time we pack
nvlist, we have to put its size in the header
(the separate header for A, B, and C).

To not break the ABI and to reduce the complexity of nvlist_size,
instead of calculating the nvlist size when requested,
we track the size of each nvlist.

Reported by:	pjd, kp
Tested by:	kp
2021-06-11 17:51:29 +02:00
Randall Stewart
ba1b3e48f5 tcp: Missing mfree in rack and bbr
Recently (Nov) we added logic that protects against a peer negotiating a timestamp, and
then not including a timestamp. This involved in the input path doing a goto done_with_input
label. Now I suspect the code was cribbed from one in Rack that has to do with the SYN.
This had a bug, i.e. it should have a m_freem(m) before going to the label (bbr had this
missing m_freem() but rack did not). This then caused the missing m_freem to show
up in both BBR and Rack. Also looking at the code referencing m->m_pkthdr.lro_nsegs
later (after processing) is not a good idea, even though its only for logging. Best to
copy that off before any frees can take place.

Reviewed by: mtuexen
Sponsored by: Netflix Inc
Differential Revision:	https://reviews.freebsd.org/D30727
2021-06-11 11:38:08 -04:00
Hans Petter Selasky
6847ea5019 Improve handling of USB device re-open in the LibUSB v1.x API.
Make sure the "device_is_gone" flag is cleared after every successful open,
so that the "device_is_gone" flag doesn't persist forever.

Found by:	sergii.dmytruk@3mdeb.com
PR:		256296
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-06-11 17:06:44 +02:00
Michael Tuexen
fa3746be42 tcp: fix two bugs in new reno
* Completely initialise the CC module specific data
* Use beta_ecn in case of an ECN event whenever ABE is enabled
  or it is requested by the stack.

Reviewed by:		rscheff, rrs
MFC after:		3 days
Sponsored by:		Netflix, Inc.
2021-06-11 15:40:34 +02:00
Hans Petter Selasky
a7cf31da5a Add new USB ID to u3g(4).
Submitted by:	pierre-jean.gineste@nuabee.fr
PR:		231909
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-06-11 13:05:58 +02:00
Michael Tuexen
224cf7b35b tcp: fix compilation of IPv4-only builds
PR:			256538
Reported by:		iron.udjin@gmail.com
MFC after:		3 days
Sponsored by:		Netflix, Inc.
2021-06-11 09:50:46 +02:00
Warner Losh
7aa2e90176 spl: Fix gcc6 build
-Wno-error= is only a clang flag, restrict its use to only clang.

Sponsored by:		Netflix
2021-06-10 21:28:52 -06:00
Warner Losh
07d72396f8 tools: Remove obsolete svn information.
Reviewed by:		jhb@
Differential Revision:	https://reviews.freebsd.org/D30720
Sponsored by:		Netflix
2021-06-10 19:02:22 -06:00
Brad Davis
ab6d05336c tests/sys/netpfil: Move common tests out from behind MK_PF.
Approved by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-06-10 17:56:01 -06:00
Martin Matuska
47ddbfae27 zfs: unbreak build with clang 12
Change -Wno-error-atomic-alignment to -Wno-error=atomic-alignment
in the Makefile of libspl.

Reported by:	Ed Maste <emaste@FreeBSD.org>
Fix by:		Alexander Richardson <arichardson@FreeBSD.org>
2021-06-11 01:34:46 +02:00
Lutz Donnerhacke
294799c6b0 libalias: tidy up housekeeping
Replace current expensive, but sparsly called housekeeping
by a single, repetive action.

This is part of a larger restructure of libalias in order to switch to
more efficient data structures.  The whole restructure process is
split into 15 reviews to ease reviewing.  All those steps will be
squashed into a single commit for MFC in order to hide the
intermediate states from production systems.

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30277
2021-06-10 23:30:10 +02:00
Neel Chauhan
b47f461c8e linuxkpi: Add list_for_each_entry_lockless() macro
This is needed by the drm-kmod 5.7 update.

Approved by:		hselasky (src)
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D30708
2021-06-10 08:15:29 -07:00
Fernando Apesteguía
cedaad9317 mmc(4), mmcsc(4): Remove missing Xref
There is no evidence of at91_mci in the code whatsoever. Most of the at91
drivers where removed in 802baf0ba6

PR: 218970
Reported by: reezer@reezer.org

Approved by: imp@
Differential Revision: https://reviews.freebsd.org/D29193
2021-06-10 15:15:54 +02:00
Fernando Apesteguía
49ddfdec19 ports(7): Add install-missing-packages to target list
It is already used in the EXAMPLES section.

Approved by:	bcr@ (manpages)
Differential Revision: https://reviews.freebsd.org/D30044
2021-06-10 14:58:24 +02:00
Randall Stewart
67e892819b tcp: Mbuf leak while holding a socket buffer lock.
When running at NF the current Rack and BBR changes with the recent
commits from Richard that cause the socket buffer lock to be held over
the ip_output() call and then finally culminating in a call to tcp_handle_wakeup()
we get a lot of leaked mbufs. I don't think that this leak is actually caused
by holding the lock or what Richard has done, but is exposing some other
bug that has probably been lying dormant for a long time. I will continue to
look (using his changes) at what is going on to try to root cause out the issue.

In the meantime I can't leave the leaks out for everyone else. So this commit
will revert all of Richards changes and move both Rack and BBR back to just
doing the old sorwakeup_locked() calls after messing with the so_rcv buffer.

We may want to look at adding back in Richards changes after I have pinpointed
the root cause of the mbuf leak and fixed it.

Reviewed by: mtuexen,rscheff
Sponsored by: Netflix Inc
Differential Revision:	https://reviews.freebsd.org/D30704
2021-06-10 08:33:57 -04:00
Kristof Provost
ea21980a3f pf: use M_WAITOK where possible
In the ioctl path use M_WAITOK allocations whereever possible. These are
less sensitive to memory pressure, and ioctl requests have no hard
deadlines.

Reviewed by:	donner
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D30702
2021-06-10 12:20:10 +02:00
Dmitry Chagin
89f15b79b1 linux(4): Regen for ppoll_time64 system call.
MFC after:	2 weeks
2021-06-10 15:19:12 +03:00
Dmitry Chagin
ed61e0ce1d linux(4): Implement ppoll_time64 system call.
MFC after:	2 weeks
2021-06-10 15:18:46 +03:00
Dmitry Chagin
e884512ad1 Split kern_poll() on two counterparts.
The kern_poll_kfds() operates on clear kernel data, kfds points to an
array in the kernel, while kern_poll() operates on user supplied pollfd.
Move nfds check to kern_poll_maxfds().

No functional changes, it's for future use in the Linux emulation layer.

Reviewd by:		kib
Differential Revision:	https://reviews.freebsd.org/D30690
MFC after:		2 weeks
2021-06-10 15:11:25 +03:00
Dmitry Chagin
981a60f112 linux(4): Regen for pselect6_time64 system call.
MFC after:	2 weeks
2021-06-10 15:04:37 +03:00
Dmitry Chagin
f6d075ecd7 linux(4): Implement pselect6_time64 system call.
MFC after:	2 weeks
2021-06-10 15:03:30 +03:00
Dmitry Chagin
c002529000 linux(4): Regen for rt_sigtimedwait_time64 system call.
MFC after:	2 weeks
2021-06-10 14:52:43 +03:00
Dmitry Chagin
db4a1f331b linux(4): Implement rt_sigtimedwait_time64 system call.
It still does not work as intended, awaits D30675.

MFC after:	2 weeks
2021-06-10 14:51:30 +03:00
Dmitry Chagin
985978806e linux(4): Regen for futex_time64 system call.
MFC after:	2 weeks
2021-06-10 14:28:25 +03:00
Dmitry Chagin
2e46d0c3d9 linux(4): Implement futex_time64 system call.
MFC after:	2 weeks
2021-06-10 14:27:06 +03:00