Commit Graph

278675 Commits

Author SHA1 Message Date
John Baldwin
cdfe82d35a qat: Fix build with GCC.
Use the correct option to suppress warnings due to discarding const
from pointers on GCC vs clang.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D36780
2022-09-29 15:07:02 -07:00
John Baldwin
b174653495 qat: Remove non-existent path from -I.
Reviewed by:	markj
Reported by:	GCC -Wmissing-include-dirs
Differential Revision:	https://reviews.freebsd.org/D36779
2022-09-29 15:06:31 -07:00
John Baldwin
a35572b16e linux32: binutils as requires %eflags instead of %flags for CFI.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D36781
2022-09-29 15:06:01 -07:00
John Baldwin
1aef571102 rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.
Reviewed by:	dougm
Reported by:	GCC -Wunused-value
Differential Revision:	https://reviews.freebsd.org/D36778
2022-09-29 15:05:22 -07:00
Richard Yao
dee8934e8f
Fix unreachable code in zstreamdump
82226e4f44 was intended to prevent a
warning from being printed in situations where it was inappropriate, but
accidentally disabled it entirely by setting featureflags in the wrong
case statement.

Coverity reported this as dead code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13946
2022-09-29 10:16:37 -07:00
Serapheim Dimitropoulos
4acc36ed7c
Fix panic in dsl_process_sub_livelist for EINTR
= Issue

Recently we hit an assertion panic in `dsl_process_sub_livelist` while
exporting the spa and interrupting `bpobj_iterate_nofree`. In that case
`bpobj_iterate_nofree` stops mid-way returning an EINTR without clearing
the intermediate AVL tree that keeps track of the livelist entries it
has encountered so far. At that point the code has a VERIFY for the
number of elements of the AVL expecting it to be zero (which is not the
case for EINTR).

= Fix

Cleanup any intermediate state before destroying the AVL when
encountering EINTR. Also added a comment documenting the scenario where
the EINTR comes up. There is no need to do anything else for the calles
of `dsl_process_sub_livelist` as they already handle the EINTR case.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #13939
2022-09-29 09:39:48 -07:00
Richard Yao
1b87195c3c
Fix unchecked return values
2a493a4c71 was intended to fix all
instances of coverity reported unchecked return values, but
unfortunately, two were missed by mistake. This commit fixes the
unchecked return values that had been missed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13945
2022-09-29 09:02:57 -07:00
Richard Yao
570ca4441e
Miscellaneous ZTS fixes
Coverity had various complaints about minor issues. They are all fairly
straightforward to understand without reading additional files, with the
exception of the draid.c issue. vdev_draid_rand() takes a 128-bit
starting seed, but we were passing a pointer to a 64-bit value, which
understandably made Coverity complain. This is perhaps the only
significant issue fixed in this patch, since it causes stack corruption.

These are not all of the issues in the ZTS that Coverity caught, but a
number of them are already fixed in other PRs. There is also a class of
TOUTOC complaints that involve very minor things in the ZTS (e.g.
access() before unlink()). I have yet to decide whether they are false
positives (since this is not security sensitive code) or something to
cleanup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13943
2022-09-29 08:56:42 -07:00
Michael Tuexen
a779bb4d94 tcp_sso: add support for TCP_MAXUNACKTIME
Reported by:		rscheff@
Reviewed by:		rscheff@
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D36802
2022-09-29 02:02:11 +02:00
Kyle Evans
78f3c734a5 arm64: fix build without FDT
static_kenv is only used under `FDT`, and `try_load_dtb` is only defined
with `FDT`.

Reviewed by:	andrew, imp, manu
Differential Revision:	https://reviews.freebsd.org/D36791
2022-09-29 14:33:33 -05:00
Kyle Evans
23c318ed86 extres: regulator: fix the build without FDT
The regnode interface is currently only built for FDT, thus not
applicable to ACPI-only kernels.  Move the "regnode_if.h" include
underneath a previously existing FDT cpp segment.

Reviewed by:	andrew, imp, manu
Differential Revision:	https://reviews.freebsd.org/D36790
2022-09-29 14:33:33 -05:00
Kyle Evans
b4c2a5b689 arm64: coresight: fix the build without FDT
coresight_cpu_debug only has an FDT attachment, so let's not build it
for kernels without FDT.

coresight.h includes sys/malloc.h via header pollution
dev/ofw/openfirm.h; include it directly in case we're building without
FDT.

Reviewed by:	andrew, manu
Differential Revision:	https://reviews.freebsd.org/D36789
2022-09-29 14:33:33 -05:00
Kyle Evans
4a4ad02da3 uart: uart_cpu_arm64: fix the build without FDT
clang 14 doesn't properly determine that we're unconditionally returning
if we have ACPI but not FDT.  Push FDT setup entirely into a new
function, much like we currently do with ACPI, and just return ENXIO if
that doesn't succeed.

Reviewed by:	andrew, manu (earlier version)
Differential Revision:	https://reviews.freebsd.org/D36788
2022-09-29 14:33:32 -05:00
Kyle Evans
79794d5c18 extres: syscon: pull in sys/malloc.h (fix !FDT)
syscon currently includes sys/malloc.h via header pollution from
dev/ofw/ofw_bus.h -> dev/ofw/openfirm.h.  Fix the build without FDT
defined by including sys/malloc.h directly.

Reviewed by:	andrew, imp, manu
Differential Revision:	https://reviews.freebsd.org/D36787
2022-09-29 14:33:32 -05:00
Mariusz Zaborski
26573e2c7f cap_netdb: Fix description style
MFC after:	1 week
2022-09-29 19:51:42 +02:00
Mariusz Zaborski
facd6b58d5 libcapser: Add reference to cap_netdb
MFC after:	1 week
2022-09-29 19:51:04 +02:00
Mark Johnston
0cd631ee06 cam: Provide compatibility for CAMGETPASSTHRU for periph drivers
The CAM version bump 0x19 -> 0x1a changed the CAMGETPASSTHRU definition,
so applications using the old ioctl are broken.  However, that version
change did not affect anything relating to the ioctl implementation for
periphs.

Fixes:		8f9be1eed1 ("cam(4): Improve XPT_DEV_MATCH")
PR:		264709
Tested by:	andreas.mahling@googlemail.com
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36389
2022-09-29 13:14:57 -04:00
Mark Johnston
ec21f85ab5 riscv: Handle invalid L2 entries in pmap_extract()
While here, eliminate a single-use local variable.

PR:		266103
Reviewed by:	mhorne
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36395
2022-09-29 13:11:26 -04:00
Brooks Davis
76aebeab7c targets: libexec/telnetd no longer exists 2022-09-29 17:56:41 +01:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
Brooks Davis
75c2975ac4 release: the telnet package contains the client
Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36784
2022-09-29 17:56:41 +01:00
Brooks Davis
edb5226248 inetd.conf: update telnetd paths
Follow the example of rsh and point to /usr/local.

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36783
2022-09-29 17:56:41 +01:00
Brooks Davis
c0f94ccbb2 bsdbox: remove previously broken telnet(d) support
Support for telnet(d) was commented out some time ago.  Remove now that
telnetd is gone.

Reviewed by:	imp, delphij, emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36782
2022-09-29 17:56:25 +01:00
Mark Johnston
65b8109b4e bhyve: Address some warnings in bhyverun.c
- Add const and __unused qualifiers where appropriate.
- Localize some global variables.
- Consistently spell vmexit state as "vme" in vmexit handlers, to avoid
  shadowing the global vm_exit state array.
- Similarly, avoid shadowing "optarg".

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
6cb261620d bhyve: Use designated initializers for virtio_consts tables
This is easier to read and addresses some compiler warnings.

One might expect these tables to be read-only but it seems that the
snapshot/restore code may modify them.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
ee83710bc4 bhyve: Address compiler warnings in audio.c
- Avoid arithmetic on void pointers.
- Avoid a signed/unsigned comparison in loops which write or fill audio
  data buffers.

Convert while loops to for loops while here.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
57d96d8df9 bhyve: Address -Wno-unused warnings in atkbd.c
MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
889cec66d3 bhyve: Make smbios tables local to smbiostbl.c
Also flag them as const.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Ed Maste
b4d15fdd53 Remove obsolete SystemV dir from BSD.usr.dist
/usr/share/zoneinfo/SystemV is removed via ObsoleteFiles as of commits
da038df8c9 and 57338837ae, so do not create it in the first place.

PR:		266666
Fixes:		da038df8c9 ("share/zoneinfo: don't build obsolete...")
MFC after:	3 days
2022-09-29 12:01:34 -04:00
Andrew Turner
09f715df7f Add a LINT-FDT arm64 config
To ensure a kernel with only FDT builds add a LINT file with ACPI
disabled.

Sponsored by:	The FreeBSD Foundation
2022-09-29 16:35:03 +01:00
Andrew Turner
efd899cd04 The cmn600 and cmn620 drivers are ACPI
These drivers only have attachments for ACPI. Mark as such in
files.arm64.

Sponsored by:	The FreeBSD Foundation
2022-09-29 16:34:10 +01:00
Cy Schubert
4f5c8956cf unbound: Vendor import 1.16.3
Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

MFC after:	3 days
Security:	CVE-2022-3204
Security:	https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog:	https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/

Merge commit '0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f' into unbound/main
2022-09-29 07:21:04 -07:00
Cy Schubert
0dde6f4f8e unbound: Vendor import 1.16.3
Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

MFC after:	3 days
Security:	CVE-2022-3204
Security:	https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog:	https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/
2022-09-29 07:14:11 -07:00
Bjoern A. Zeeb
f82316f678 net80211: move IEEE80211_F_WME check to vap for consistency
The IEEE80211_F_WME checks done on the ic were changed to be per-vap
back in the time when multi-bss was introduced or earlier in 2008.
This one was left out but given it is a (re-)accos-req case I see
no reason not to use the vap value here for consistency too.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D36733
2022-09-29 12:54:23 +00:00
Mark Johnston
a2578094a3 opensolaris: Delete unused sources
The SDT implementation in the opensolaris compat module just defines the
sdt:::set-error probe for ZFS.  But OpenZFS provides its own
implementation, and this one was not connected to the build.

No functional change intended.

MFC after:	1 week
2022-09-29 08:34:29 -04:00
Michał Grzelak
7b54d275ef libsa/netif.c: Replace #if with #ifdef
Follow the convention with *_DEBUG macros in stand/libsa/* and replace
"#if" with "#ifdef".

Reviewed by:	kd
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36740
2022-09-29 12:52:02 +02:00
Michał Grzelak
c66c6da4f0 libsa/arp.c: Change printf format string
Change printf format string to avoid compilation failure when
ARP_DEBUG macro is defined.

Reviewed by:	imp
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36735
2022-09-29 12:51:14 +02:00
Michał Grzelak
ee0d06faa0 libsa/rarp.c: Change casted type and printf format
Change the casted type and printf format string to avoid compilation
failure when RARP_DEBUG macro is defined.

Reviewed by:	imp
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36738
2022-09-29 12:51:14 +02:00
Michał Grzelak
1ed7916188 libsa/rarp.c: Change printf format string
Change printf format string to avoid compilation failure when
RARP_DEBUG macro is defined.

Reviewed by:	imp
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36739
2022-09-29 12:51:14 +02:00
Hajimu UMEMOTO
10d872339a corrected RFC numbers in comments to proper ones 2022-09-29 19:57:59 +09:00
Souradeep Chakrabarti
6cf00ef80c arm64: enablement for ARM64 in Hyper-V (Part 1)
The changes are to refactor the code of vmbus.c and hyperv.c to keep minimal
arch specific codes there and have them in separate files in x86/ arm64/ .
x86 is a new directory, which contains codes for x86 / x86_64. Instead of
repeating the same codes in existing amd64/ and i386/, this approach reduced
the repetition. This is first of three patches for Hyper-V enablement.

Reviewed by:	whu
Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D36466
2022-09-29 10:14:41 +00:00
Kirk McKusick
221da3e921 Fix an incorrectly placed parenthesis.
While syntactically correct and even looking correct, it was definitely
not providing the desired result. And it has been this way for nearly
twenty years.

MFC after:    2 weeks
Sponsored by: The FreeBSD Foundation
2022-09-29 01:45:41 -07:00
Navdeep Parhar
8d2c13931b cxgbe/tom: Fix assertions in the code that maintains TCB history.
The tids used for TOE connections start from tid_base, not 0.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-09-28 20:01:14 -07:00
John Baldwin
536f7d84cd newkey: Fix mismatch in array bounds in for adjust().
Reviewed by:	emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36762
2022-09-28 14:06:16 -07:00
John Baldwin
157436dcbf mail: Fix mismatch in array bounds for isign().
Reviewed by:	imp, emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36761
2022-09-28 14:05:42 -07:00
John Baldwin
10297a9ed4 sh: Fix mismatch in array bounds for vforkexecshell().
Reviewed by:	imp, jilles, emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36760
2022-09-28 14:05:07 -07:00
John Baldwin
5ceec6c105 pam_unix: Fix mismatch in array bounds for make_salt().
Reviewed by:	imp, emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36759
2022-09-28 14:04:48 -07:00
John Baldwin
5d27845e5a ldns: Disable -Warray-parameter warnings from GCC 12 on sha2.c.
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36758
2022-09-28 14:02:30 -07:00
John Baldwin
a2e41a585b libc rpc: Fix mismatches in prototypes for array bounds.
Various RPC functions used a bare pointer in function prototypes to
describe fixed-length buffer arguments but used a fixed-length array
in the function definition.  The manual page for these functions
describes the parameters as being fixed-length buffers, so update
the prototypes to match the definitions.

Reviewed by:	imp, emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36757
2022-09-28 14:01:36 -07:00
John Baldwin
409dae262f bsd.sys.mk: Add NO_WARRAY_PARAMETER helper variable.
This variable expands to -Wno-array-parameter on GCC 11+.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36756
2022-09-28 14:01:04 -07:00