Commit graph

284319 commits

Author SHA1 Message Date
R. Christian McDonald bb5d6d14d8 wpa: Enable receiving priority tagged (VID 0) frames
Certain internet service providers transmit vlan 0 priority tagged
EAPOL frames from the ONT towards the residential gateway. VID 0
should be ignored, and the frame processed according to the priority
set in the 802.1P bits and the encapsulated EtherType (i.e. EAPOL).

The pcap filter utilized by l2_packet is inadquate for this use case.

Here we modify the pcap filter to accept both unencapsulated and
encapsulated (with VLAN 0) EAPOL EtherTypes. This preserves the
original filter behavior while also matching on encapsulated EAPOL.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Reviewed by:	cy
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D40442
2023-06-11 16:26:04 -07:00
Dmitry Chagin 4864590568 Revert "linux(4): The futex_wait operation should restart."
This reverts commit 5eec19c8eb due to its
wrong. Linux interrupts futex syscall on signal and return EINTR.
2023-06-11 12:47:27 +03:00
Bjoern A. Zeeb 51117ed116 LinuxKPI: 802.11: correct HE_MAC_CAP3 values
While we had assigned dummy values so far to HE, correct the HW_MAC_CAP3
values to avoid compile time errors of drivers when shifting values out
of range.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2023-06-10 23:06:14 +00:00
Bjoern A. Zeeb bee50f894b LinuxKPI: qcom: update QMI and MHI
Minor updates to QMI and MHI (mostly making arguments const)
in order to facilitate porting the next generation athk driver.

MFC after:	10 days
2023-06-10 23:06:04 +00:00
Bjoern A. Zeeb ab55b58b5c LinuxKPI: add dummy of.h
Given https://reviews.freebsd.org/D34318 was abandoned add an empty
of.h dummy header file to at least avoid #include errors and avoid
covering those #include with CONFIG_OF.

MFC after:	10 days
2023-06-10 23:05:49 +00:00
Bjoern A. Zeeb a5ae63edd5 LinuxKPI: 802.11: initialize txq
In 5a9a0d7803 we omitted the initialization
of the per-hw txq settings.  Fix this.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Fixes:		5a9a0d7803
2023-06-10 23:05:15 +00:00
Bjoern A. Zeeb 3206587a20 LinuxKPI: 802.11: improve scan handling
Under certain circumstances a hw_scan may be downgraded to a software
scan.  Handle these situations better and make sure we free resources
in all cases once. [1]

Also leave a note about scanning all bands (or we would have to switch
bands manually).

In both cases hardware doing and driver saying seem not entirely
consistent for all and all firmware.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reported by:	imp [1]
2023-06-10 23:04:40 +00:00
Martin Matuska 4e8d558c9d zfs: merge openzfs/zfs@feff9dfed
Notable upstream pull request merges:
  #14833 Update compatibility.d files
  #14841 ZIL: Reduce scope of per-dataset zl_issuer_lock
  #14863 zil: Add some more statistics
  #14866 btree: Implement faster binary search algorithm
  #14894 Fix inconsistent definition of zfs_scrub_error_blocks_per_txg
  #14892 Fix concurrent resilvers initiated at same time
  #14903 Fix NULL pointer dereference when doing concurrent 'send' operations
  #14910 ZIL: Allow to replay blocks of any size
  #14939 Fix the L2ARC write size calculating logic
  #14934 Introduce zfs_refcount_(add|remove)_few()
  #14946 Improve l2arc reporting in arc_summary
  #14953 Finally drop long disabled vdev cache
  #14954 Fix the L2ARC write size calculating logic (2)
  #14955 Use list_remove_head() where possible
  #14959 ZIL: Fix race introduced by f63811f072

Obtained from:	OpenZFS
OpenZFS commit:	feff9dfed3
2023-06-10 19:31:17 +02:00
Graham Perrin 5ca7f02946 hier(7): typo (critial)
https://bugs.freebsd.org/261349

PR:                      261349
Reported by:             Mike Karels <mike@karels.net>
Fixes: 6469f9c595 hier(7): improvement, modernisation
2023-06-10 14:08:35 +01:00
Graham Perrin 6469f9c595 hier(7): improvement, modernisation
Consistent use of lowercase, spacing between sections, etc.

Cease mentioning floppy disks.

De-list /usr/share/misc/fonts/, which has been ??? (without a
description) for twenty-seven years.

Change zpool to pool. (zpool is a command.)

Uppercase PPP for Point-to-Point Protocol.

A few other changes to wording, including avoidance of the phrase
pre-fab.

Update the descriptions of:

* /tmp/
* /usr/share/misc/
* /var/preserve/
* /var/tmp/
* /var/tmp/vi.recover/.

Refer to vi(1) instead of ex(1).

https://bugs.freebsd.org/261349

PR:                      261349
Reviewed by:             mhorne
Approved by:             mhorne
Pull request:            https://github.com/freebsd/freebsd-src/pull/763
2023-06-10 09:41:35 +01:00
David E. O'Brien 2a3493b93b Correct man page URI formatting.
Don't format URL's embedding a ',' where one doesn't exist; so that
one may copy-n-paste the displayed URL into a browser.
2023-06-09 20:49:51 -07:00
Konstantin Belousov a254f67102 rtld: fix typo in comment
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-06-10 04:35:14 +03:00
Ed Maste 5ad6c907f9 Cirrus-CI: add a manually triggered aarch64-gcc12 task
Sponsored by:	The FreeBSD Foundation
2023-06-09 20:49:31 -04:00
George Amanakis feff9dfed3
Fix the L2ARC write size calculating logic (2)
While commit bcd5321 adjusts the write size based on the size of the log
block, this happens after comparing the unadjusted write size to the
evicted (target) size.

In this case l2ad_hand will exceed l2ad_evict and violate an assertion
at the end of l2arc_write_buffers().

Fix this by adding the max log block size to the allocated size of the
buffer to be committed before comparing the result to the target
size.

Also reset the l2arc_trim_ahead ZFS module variable when the adjusted
write size exceeds the size of the L2ARC device.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14936
Closes #14954
2023-06-09 17:05:47 -07:00
Warner Losh 17dce737e3 mvs: Eliminate unused variable.
ccim is unused. Just remove it.

PR: 271920
Sponsored by:		Netflix
2023-06-09 17:21:40 -06:00
John Baldwin 553022aba5 ipf: Remove no-longer-needed NO_WARRAY_BOUNDS. 2023-06-09 15:35:32 -07:00
Bjoern A. Zeeb 2e07e885d6 LinuxKPI: implement timer_{delete,shutdown}_sync()
Implement timer_{delete,shutdown}_sync(), which do not seem to require
anything additional to the already existing del_timer_sync().

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D40124
2023-06-09 22:25:33 +00:00
Richard Scheffenegger 8e7c2e14cf netstat: display c and C flags properly
Restructure c and C flag checks for string length to
work properly. Quickly bypass for non TCP protos too.

Reviewed By:		tuexen
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D40480
2023-06-09 23:58:00 +02:00
Dmitriy Alexandrov af9ce4e9bb kern_ntptime: Fix undefined behavior of the shift operator
L_LINT macro is used with negative numbers [i.e.
L_LINT(time_freq, -MAXFREQ)], it could cause undefined
behavior. It should be similar to the L_RSHIFT(v, n) macro.

MFC after:	2 weeks
Reviewed by:	cy
Pull Request:	https://github.com/freebsd/freebsd-src/pull/769
Signed-off-by: Dmitriy Alexandrov <d06alexandrov@gmail.com>
2023-06-09 14:04:54 -07:00
Brad Smith 2c01176a28 msun: Correct FreeBSD version in sincos() man page
The sincos() man page notes the function was added to msun in FreeBSD
9.0 which must have been an oversight in the review as it was commited
to 12.0 and then backported to the 11 branch.

So I have provided a diff to correct this to the first FreeBSD version
it did ship with which was 11.2.

Reviewed by:	dim, imp
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D40308
2023-06-09 22:04:43 +02:00
Alexander Motin 70ea484e3e
Finally drop long disabled vdev cache.
It was a vdev level read cache, designed to aggregate many small
reads by speculatively issuing bigger reads instead and caching
the result.  But since it has almost no idea about what is going
on with exception of ZIO_FLAG_DONT_CACHE flag set by higher layers,
it was found to make more harm than good, for which reason it was
disabled for the past 12 years.  These days we have much better
instruments to enlarge the I/Os, such as speculative and prescient
prefetches, I/O scheduler, I/O aggregation etc.

Besides just the dead code removal this removes one extra mutex
lock/unlock per write inside vdev_cache_write(), not otherwise
disabled and trying to do some work.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14953
2023-06-09 12:40:55 -07:00
Brian Behlendorf 6db4ed51d6
ZTS: Skip checkpoint_discard_busy
Until the ASSERT which is occasionally hit while running
checkpoint_discard_busy is resolved skip this test case.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #12053
Closes #14952
2023-06-09 11:10:01 -07:00
Alexander Motin 90ccfd426d
Improve l2arc reporting in arc_summary.
- Do not report L2ARC as FAULTED in presence of in-flight writes.
- Report read and write I/Os, bytes and errors.
- Remove few numbers not important to average user.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #12304 
Closes #14946
2023-06-09 10:14:05 -07:00
Alexander Motin b3ad3f48d9
Use list_remove_head() where possible.
... instead of list_head() + list_remove().  On FreeBSD the list
functions are not inlined, so in addition to more compact code
this also saves another function call.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14955
2023-06-09 10:12:52 -07:00
Alexander Motin 55b1842f92
ZIL: Fix race introduced by f63811f072.
We are not allowed to access lwb after setting LWB_STATE_FLUSH_DONE
state and dropping zl_lock, since it may be freed by zil_sync().
To free itxs and waiters after dropping the lock we need to move
lwb_itxs and lwb_waiters lists elements to local storage.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #14957
Closes #14959
2023-06-09 10:08:05 -07:00
Andrew Turner 072a4ba82a Update the Arm Optimized Routine library to v23.01
Sponsored by:   Arm Ltd
2023-06-09 17:56:02 +01:00
Andrew Turner 1dd169af71 Add more arm64 ID registers to the user_regs array
This is a mapping from ID register value to offset in struct cpu_desc.
These registers may be needed with future architecture revisions either
by userspace or by bhyve.

Sponsored by:	Arm Ltd
2023-06-09 17:55:19 +01:00
Ed Maste 6024564cd4 Cirrus-CI: split main script into separate world + kernel
It appears that Cirrus-CI has a 100MB limit for log output, and we
exceed that (!) with the amd64-gcc12 build.  Separate world and kernel
build tasks in an attempt to stay below the limit.

This also has the benefit of showing world and kernel build status
separately in the Cirrus-CI UI.

PR:		271903
Sponsored by:	The FreeBSD Foundation
2023-06-09 11:07:24 -04:00
Baptiste Daroussin 92d817ad6b nlsysevent: remove useless CFLAGS 2023-06-09 17:04:10 +02:00
Stephen J. Kiernan 7bb4d1302c veriexec: Do not save error from file info in fingerprint status
We do not want or need to propagate the error from fetching file info
when determining the file status. It could cause open(2) and similar
calls to fail when trying to access devices.

Obtained from:	Juniper Networks, Inc.
2023-06-09 10:49:59 -04:00
Randall Stewart e022f2b013 tcp: Rack fixes and misc updates
So over the past few weeks we have found several bugs and updated hybrid pacing to have
more data in the low-level logging. We have also moved more of the BBlogs to "verbose" mode
so that we don't generate a lot of the debug data unless you put verbose/debug on.
There were a couple of notable bugs, one being the incorrect passing of percentage
for reduction to timely and the other the incorrect use of 20% timely Beta instead of
80%. This also expands a simply idea to be able to pace a cwnd (fillcw) as an alternate
pacing mechanism combining that with timely reduction/increase.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D40391
2023-06-09 10:27:08 -04:00
Warner Losh 9121945d70 Regenerate sysent stuff after $FreeBSD$ removal
Sponsored by:		Netflix
2023-06-09 07:28:27 -06:00
Warner Losh 61fe63f698 makesyscall: Stop generating $FreeBSD$
With 14 coming, we no longer need to generate the $FreeBSD$. We can
likely MFC that to 13 as well.

MFC After:		2 weeks
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D39879
2023-06-09 07:26:24 -06:00
Joseph Mingrone a75d93a74d
tcpdump: Do not hard code HAVE_LIBCRYPTO in config.h
Reviewed by:	emaste
Fixes:		ee67461e56 (tpcdump: Update to 4.99.4)
Sponsored by:	The FreeBSD Foundation
2023-06-09 09:16:11 -03:00
Konstantin Belousov e9a38ed2fa rtld: fix allocate_module_tls() variant I fallback to static allocation
Submitted by:	Joerg Sonnenberger
Fixes:	91880e07f605edb90339685bc934699a4344de3bESC
MFC after:	1 week
2023-06-09 15:13:46 +03:00
Kevin Bowling 5253d74e46 e1000: Format em_txrx
No functional changes intended.

Reviewed by:	markj (prior version)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D30072
2023-06-08 19:06:04 -07:00
Kevin Bowling 034f38cdf8 e1000: Add SPDX tag to em_txrx
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D30072
2023-06-08 18:42:20 -07:00
Xin LI d101656818 hexdump: Partial lines cannot be repetitions of earlier lines.
When checking for repetitions of earlier lines, we compare the
first nread bytes of the line against the saved line. However,
when we read a partial line, it should never be treated as a
repetition of an earlier line, even if the first bytes match.

This change fixes a bug where a partial line could be
incorrectly identified as a repetition of an earlier line.

Reported-by:	Mark Adler <madler@alumni.caltech.edu>
PR:		118723
Reviewed-by:	emaste
MFC-after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D40471
2023-06-08 18:39:05 -07:00
Dmitry Chagin cbbac56091 linux(4): Preserve fpu xsave state across signal delivery on amd64
PR:			270247
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40444
MFC after:		2 weeks
2023-06-09 01:33:26 +03:00
Dmitry Chagin 920184ed6e linux(4): In preparation for xsave refactor fxsave code on amd64
Due to fxsave area is os independent reimplement fxsave handmade code
using copying of a whole area.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40443
MFC after:		2 weeks
2023-06-09 01:32:46 +03:00
Daniel Kolesa 2178e8c27a sh: make smark a static variable instead of a local in main()
We are modifying it after setjmp and then accessing it after the jump,
so it cannot be a local.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40415
2023-06-08 23:01:43 +02:00
Mark Johnston 1320520ba4 libvmmapi: Remove some unneeded includes
These are amd64-specific and so can't be used when targetting arm64, but
they don't appear to be needed.

No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2023-06-08 15:03:46 -04:00
Gleb Smirnoff bbc64cf66c stand/boot1.efi: use the bootonce dataset as root dataset
Before this change we would only pass the bootonce dataset name
to the environment for the next loader, while actually reading
the next stage loader from the 'bootfs' dataset, not the bootonce
dataset.

Another problem fixed by this change is a boot from a configuration
when bootonce attribute is present, but 'bootfs' property is not set.

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D40389
2023-06-08 11:14:45 -07:00
Gleb Smirnoff e3e2681d0e stand/loader.efi: read zfs bootonce attribute before checking currdev
First check if bootonce is configured and if it is, then change currdev
accordingly and after that do the sanity check.  This fixes boot in a
situation when ZFS pool doesn't have the "bootfs" property, but has
bootonce attribute set.  A strange, but legitimate case.

Reviewed by:		tsoome, imp
Differential Revision:	https://reviews.freebsd.org/D40388
2023-06-08 11:14:45 -07:00
Jessica Clarke dfa1982352 etc: Don't create stray directories in NO_ROOT distrib-dirs
The loop above is responsible for creating the actual directories,
whilst this one is just responsible for creating the corresponding
METALOG. Since DESTDIR already includes DISTBASE, this results in
creating a second set of roots (one per MTREES entry) within DISTBASE
whenever DISTBASE is non-empty, such as base/base, base/base/var,
base/base/usr, etc. in the distributeworld case. This is purely cosmetic
though as they won't appear in the METALOG.
2023-06-08 19:14:12 +01:00
Jessica Clarke 2e0d99a953 Makefile.inc1: Fix distributeworld mtree mangling for dist root dir
The trailing slash means that ./base itself doesn't get mangled and
remains as-is in the output, leading to a stray /base in base.txz for
NO_ROOT builds and thus in the installed system. Since this action is
running on a line whose file matches one listed by find (and we're
printing all of these as part of that distribution), we don't need to
care about the possibility of a path like ./basefoo/bar where the path
prefix isn't ./base, and can thus just drop the slash rather than
needing something more complicated like "slash or whitespace or EOL" as
one might first think.
2023-06-08 19:14:12 +01:00
Jessica Clarke 469727c966 Makefile.inc1: Use INSTALL_DDIR for distributeworld's distrib-dirs
INSTALL_DDIR is the canonicalised version of DESTDIR/DISTDIR. Whilst
most of what distrib-dirs does doesn't need the canonicalised form, it
is responsible for installing the POSIX and en_US.US_ASCII NLS symlinks
to C, and therefore needs the canonicalised version for those two uses
of install for NO_ROOT builds, since our install does a naive text-based
prefix strip when creating the METALOG entry rather than a smarter path
semantics-aware one (which itself is really a bug, and has bitten us
many times). As a result, using plain DESTDIR/DISTDIR instead can result
in the METALOG having ./path/to/destdir/base/usr/share/nls/$LOCALE
rather than ./base/usr/share/nls/$LOCALE and then being filtered out
when creating base.meta (or, if you're unlucky and the absolute path
begins with base or tests, weird things will probably happen).

Given this footgun an audit of DESTDIR uses is probably in order,
especially those using DESTDIR/DISTDIR, but this is sufficient for now.
2023-06-08 19:14:12 +01:00
Bjoern A. Zeeb a30a0d940d LinuxKPI: add dummy rhashtable implementation
Add a skeleton implementation of rhashtable in order to keep an
upcoming wireless driver compiling.  We'll implement it as soon as
we get there.

MFC after:	10 days
Reviewed by:	emaste (previous version before his suggested changes)
Differential Revision: https://reviews.freebsd.org/D40176
2023-06-08 18:11:11 +00:00
Bjoern A. Zeeb 4cbd427788 LinuxKPI: add devm_ioremap()
Given we do not seem to support ioremap() do not support the "devm"
version either and simply return NULL, which means we do not have
to keep track of the memory to be freed on device free later.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D40173
2023-06-08 18:07:28 +00:00
Bjoern A. Zeeb 17bde9cbc6 LinuxKPI: pci: update struct msi_desc
It seems struct msi_desc is setup differently (or was changed) compared
to how we added it a while ago.  Catch up in order to keep drivers
directly accessing fields compiling.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D40175
2023-06-08 18:04:35 +00:00