Commit Graph

270958 Commits

Author SHA1 Message Date
Mateusz Guzik
06c95f1fac bhnd: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:59:09 +00:00
Mateusz Guzik
3c39566d65 mbuf: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:54:02 +00:00
Mateusz Guzik
b2835fa22a kobj: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:52:25 +00:00
Mateusz Guzik
a90b85dd5a ktls: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:44:37 +00:00
Mateusz Guzik
88646c4e5f virtio: plug some of set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:38:42 +00:00
Mateusz Guzik
17ad5b249d sis: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:31:10 +00:00
Mateusz Guzik
4472999abe ral: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:24:21 +00:00
Cy Schubert
a6fb9bbea7 ipfilter userland: Replace sprintf with range checking version (snprintf)
MFC after:	1 week
2021-12-14 06:19:21 -08:00
Cy Schubert
9a563c5e48 ipfilter: radix_ipf is a kernel source file
Remove duplicate radix_ipf.* files. They live in sys/.

MFC after:	1 week
2021-12-14 06:19:21 -08:00
Cy Schubert
8f945ad25f ipfilter: Replace sprintf with range checking version (snprintf)
MFC after:	1 week
2021-12-14 06:19:20 -08:00
Cy Schubert
e263821fea ipfilter radix_ipf: name is only valid with RDX_DEBUG
ipf_rdx_node.name is only vaild when RDX_DEBUG is defined.

MFC after:	1 week
2021-12-14 06:19:20 -08:00
Cy Schubert
8d2a8d243e ipfilter: The SNPRINTF macro doesn't exist, remove it
MFC after:	1 week
2021-12-14 06:19:20 -08:00
Cy Schubert
0da2c91e64 hostapd: Fix wlan interfaces not UP/RUNNING
Like wpa_supplicant, hostapd does not automatically UP the interface
when configured. The fix is similar to 5fcdc19a81.

Reported by:	avg
Tested by:	avg
MFC after:	1 week
2021-12-14 06:18:37 -08:00
Mateusz Guzik
4d78ef3e81 virtio console: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:14:34 +00:00
Mateusz Guzik
94b098882f vmx: plug set-but-not-used var
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:12:35 +00:00
Mateusz Guzik
7aa51c9621 sdhci: plug set-but-not-unused vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:08:35 +00:00
Mateusz Guzik
0d3b2bd7e6 vtnet: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:08:28 +00:00
Mateusz Guzik
2b0d3ee9ec sk: plug set-but-not-used vars
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-14 14:08:17 +00:00
Mike Karels
6ccff5c045 Add genet.4 for RPi 4 Ethernet
Add new man page for genet(4) Ethernet on Raspberry Pi 4B, based on
several other Ethernet man pages.  Hook into build.

Note, this could potentially be added as an aarch64 man page; not
sure if that matters now.  Include if_genet(4) link as for other
network devices.

Copyright notice cloned from a recent FreeBSD Foundation copyright.

MFC after:	3 days
Reviewed by:	imp bcr #manpages
Differential Revision: https://reviews.freebsd.org/D33360
2021-12-14 07:46:13 -06:00
Franco Fichtner
1de20ebc46 dummynet: drop unused definitions
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D33429
2021-12-14 13:01:15 +01:00
Mariusz Zaborski
f45ca435bd cap_net: fix verification of bind permission
MFC after:	5 days
2021-12-14 12:02:40 +01:00
Mariusz Zaborski
88910b8b7b cap_net: plug memory leak
MFC after:	5 days
2021-12-14 12:02:40 +01:00
Andrew Turner
6238905c5b Only change DMAP props on DMAP covered memory
When changing memory properties in the arm64 pmap we need to keep both
the kernel address and DMAP mappings in sync.

To keep the kernel and DMAP memory in sync we recurse when updating the
former to also update the latter. There was insuffucuent checking around
this recursion. It would check if the virtual address is not within the
DMAP region, but not if the physical address is covered.

Add the missing check as without it the recursion may return an error.

Sponsored by:	The FreeBSD Foundation
2021-12-14 10:38:19 +00:00
Warner Losh
0630a06b2a loader/kboot: minor style nit
Kill trailing white space.

Sponsored by:		Netflix
2021-12-13 16:55:39 -07:00
наб
f291fa658e t/z_diff/socket, zfs: main: fix unused argument warnings, ARGSUSED tags
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:50:47 -08:00
наб
b7ef2340c2 libzfs: diff: simplify superfluous stdio
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:50:38 -08:00
наб
9bdf0c592b libzfs: diff: print_what() can return the symbol => get_what()
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:50:29 -08:00
наб
a72129edcb libzfs: diff: stream_bytes: use fputc, %hho formats chars
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:50:20 -08:00
наб
1cfb6ef36e libzfs: zpool_set_vdev_prop: remove unused vprop
Found by clang 14 with -Wunused-but-set-variable

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:50:09 -08:00
наб
9e184b7c35 linux: libspl: getmntany: remove unused argument
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:49:59 -08:00
наб
344bbc82e7 zfs, libzfs: diff: accept -h/ZFS_DIFF_NO_MANGLE, disabling path escaping
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12829
2021-12-13 15:49:40 -08:00
Mark Johnston
3aa0bc89c6 libdwarf: Add a weak uncompress() symbol
This works around brokenness in buildworld's bootstrapping logic: it
uses the source tree's metadata to collect dependency info (such as,
"libdwarf depends on libz") but links against static host libraries.
If these two are out of sync, as is the case if one builds a commit
prior to the introduction of the libz dependency, then the build fails
when trying to statically link nm(1).

Mitigate the problem by defining a weak uncompress() symbol which simply
returns an error.  This ensures that the build won't fail when
statically linking libdwarf without zlib.  The downside is that any
tools using libdwarf without zlib will now hit a runtime error if they
attempt to decode compressed sections, but at least they'll fail
deterministically, and compressed debug info is only enabled by default
in main.

In particular, this fixes building of branches lacking commit
dbf05458e3, such as releng branches, stable/12 and 13 and old
revisions of main.  Previously the nm(1) build would fail with:

ld: error: undefined symbol: uncompress
>>> referenced by libdwarf_elf_init.c:233
>>> (/usr/src/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c:233)
>>>               libdwarf_elf_init.o:(_dwarf_elf_init) in archive
>>> /usr/lib/libdwarf.a

Reported by:	dim, ler, krion
Reviewed by:	imp, emaste
Fixes:		dbf05458e3 ("libdwarf: Support consumption of compressed ELF sections")
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33419
2021-12-13 18:47:15 -05:00
Mark Johnston
c983ec6428 libdwarf: Fix error handling in _dwarf_elf_init()
We were not setting "ret" before jumping to the error path, so the
function returned success even when it had failed.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33420
2021-12-13 18:46:59 -05:00
Rick Macklem
fe04c91184 nfscl: add a filesize limit check to nfs_allocate()
As reported in PR#260343, nfs_allocate() did not check
the filesize rlimit. This patch adds that check.

PR:	260343
Reviewed by:	asomers
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33422
2021-12-13 15:32:19 -08:00
Rick Macklem
c302f889e2 nfsd: Limit parsing of layout errors to maxcnt bytes
This patch decrements maxcnt by the appropriate
number of bytes during parsing and checks to see
if there is data remaining.  If not, it just returns
from nfsrv_flexlayouterr() without further processing.
This prevents the tl pointer from running off the end
of the error data pointed at by layp, if there are
flaws in the data.

Reported by:	rtm@lcs.mit.edu
Tested by:	rtm@lcs.mit.edu
PR:	260293
MFC after:	2 weeks
2021-12-13 15:21:31 -08:00
Bjoern A. Zeeb
e448ff6f0e rc: network.subr improve network6_getladdr()
In network6_getladdr() we are iterating over inet6 lines and are not
interested in any others.  So tell ifconfig to limit output to "inet6"
as much as possible.
This is probably a micro-optimisation but was noticed while looking
at other IPv6-related boot-time improvements.

MFC after:	1 week
2021-12-13 22:12:44 +00:00
Warner Losh
5c68a21697 loader:prefix is only used for LOADER_VERIEXEC
Only define and set prefix when LOADER_VERIEXEC is defined. It's only
used by the LOADER_VERIEXEC code.

Sponsored by:		Netflix
2021-12-13 12:04:53 -07:00
Kristof Provost
08851be187 ndp tests: fix cleanup
Fix the cleanup function name so we actually remove our test jail and
interfaces.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-13 18:14:59 +01:00
黃清隆
6964b77e59 sys/dev/arcmsr: Update Areca RAID driver to fix some issues on ARC-1886.
1. Doorbell interrupt status may arrive lately when doorbell interrupt on
   ARC-1886.
2. System boot up hung when ARC-1886 with no volume created or no device
   attached.

Many thanks to Areca for continuing to support FreeBSD.

MFC after:	2 weeks
2021-12-13 08:09:15 -08:00
Andrew Turner
71bf1c4cc5 Add accelerated arm64 sha512 to libmd
As with sha256 add support for accelerated sha512 support to libmd on
arm64. This depends on clang 13+ to build as this is the first release
with the needed intrinsics. Gcc should also support them, however from
a currently unknown release.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33373
2021-12-13 15:33:22 +00:00
Kristof Provost
4826406b30 pf tests: log additional information when a test ends
Log information from the running jails (routing, interfaces and pf) as
well as interfaces on the host.

This information is expected to be useful in debugging test failures.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-13 15:54:03 +01:00
Cy Schubert
8f19f3d31a ipfilter: Fix struct ifnet pointer type
The fr_info struct contains a summary of a packet. One of its fields
is a pointer to the ifnet struct the packet arrived on. It is pointed
to by a void* because ipfilter supports multiple O/Ses. Unfortunately
this makes it difficult it examine with DTrace. Defining fin_ifp as a
pointer to an ifnet struct makes the struct it points to using a DTrace
script possible.

MFC after:	1 week
2021-12-13 06:24:50 -08:00
Andriy Gapon
8b37048bc5 Revert "mmc_sim: fix setting of the mutex name"
This reverts commit df472af034.

The change hasn't been reviewed.
2021-12-13 13:51:47 +02:00
Andriy Gapon
b277ef3304 ds3231: fix accidental breakage of !FDT in 1256067c
MFC after:	10 days
2021-12-13 13:49:47 +02:00
Andriy Gapon
df472af034 mmc_sim: fix setting of the mutex name
To quote the manual:
 The pointer passed in as name and type is saved rather than the data
 it points to.  The data pointed to must remain stable until the mutex
 is destroyed.

It seems that the type is actually copied, but the name is stored as
a pointer indeed.
mmc_cam_sim_alloc used a name stored on stack.
So, a corrupt mutex name would be reported.
For example:
  lock order reversal: (sleepable after non-sleepable)
  1st 0xd7285b20 <8A><C0><C0>P@<C1><D0>P@<C1>^D^A (aw_mmc_sim, sleep mutex) @ /usr/devel/git/orange/sys/cam/cam_xpt.c:2804

This change moves the name to struct mmc_sim.
Also, that name is used as the sim name as well.
Unused mtx_name variable is removed too.
2021-12-13 13:40:47 +02:00
Andriy Gapon
1256067c5c ds3231: allow configuration via hints on FDT systems
MFC after:	10 days
2021-12-13 13:40:00 +02:00
Andriy Gapon
b416345d5b pcf8591: remove write-only variables
MFC after:	1 week
2021-12-13 13:39:08 +02:00
Andriy Gapon
cca0d3bbd8 amdsbwd: always enable watchdog register decoding
This seems to be required even if the watchdog is accessed via the common
MMIO space.

Tested on:
- Ryzen 3 3200U APU;
- Ryzen 7 5800X CPU with X570 chipset.

MFC after:	2 weeks
2021-12-13 13:36:50 +02:00
Alfonso Siciliano
1de4665dfc kbdmap: adapt to the new libbsddialog API
Differential Revision:	https://reviews.freebsd.org/D33398
2021-12-13 09:08:09 +01:00
Alfonso Siciliano
0a7e19b30f tzsetup: adapt for libbsddialog 0.0.1
libbsdialog 0.0.1 provides:
* bsddialog_conf.auto_minwidth:
* menurows is variable with autosize (properly defines max menurows)

Then tzsetup can use BSDDIALOG_AUTOSIZE keeping the dialog behavior:
min 24 cols, max 16 menurows

Differential revision:	https://reviews.freebsd.org/D33397
2021-12-13 09:07:47 +01:00