Commit Graph

284114 Commits

Author SHA1 Message Date
Pierre Pronchery
baef3a5b58 tcpdump: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 19:44:24 -04:00
Eric Joyner
9dc2f6e26f
ice(4): Update to 1.37.11-k
This driver update has no corresponding ice_ddp update, and doesn't
contain very many functional changes:
- Some refactoring for future SR-IOV PF support
- Various minor fixes

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Tested by:	jeffrey.e.pieper@intel.com
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D39821
2023-05-24 16:38:28 -07:00
Przemyslaw Lewandowski
156424fce9
ixgbe: Change if condition for RSS and rxcsum
This patch fixes TCP connection hangs for 1 rxq and 1 txq without rxcsum
enabled. Documentation for 10G cards and other drivers suggest enabling
rxcsum for RSS and disabling otherwise. When PCSD bit is not set then
fragment checksum and IP identification are reported in the rx
descriptor. When PCSD bit is set then RSS hash value is reported in the
rx descriptor. RSS and RX IPP checksum are mutually exclusive.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

PR:		268910
Reviewed by:	erj@
Tested by:	jeffrey.e.pieper@intel.com
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38621
2023-05-24 16:29:40 -07:00
Peter Wemm
ba244e2a98
delete-old: add two files left behind in certs/blacklisted
The untrusted certs directory was renamed a while ago and these
files were moved to the new location.  Various upgrade paths cause
these files to be missed and prevent deletion of the directory.
2023-05-24 13:03:10 -07:00
Pierre Pronchery
96e6e5b5fe ppp: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:55:07 -04:00
Ed Maste
ffbd1c8bc0 libtelnet: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs, or just
remove libtelnet.

PR:		271615
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:31:14 -04:00
Ed Maste
ae60012e46 release/oci.conf: add missing vm_extra_pre_umount() steps
vm.subr's default vm_extra_pre_umount removes /qemu and
/etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
need to be performed in the cloud-specific conf file.

PR:		271602
Reviewed by:	dch, lwhsu
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40257
2023-05-24 13:11:07 -04:00
Kristof Provost
6342c9ed17 if_ovpn: atomic_set -> atomic_store
The intent is to set the value to UINT32_MAX, not to |= UINT32_MAX.
Happily the intent (ensure that we do not send further packets) is
achieved either way.

Reported by:	markj
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-05-24 18:29:21 +02:00
Andrew Turner
fa512fcd8f arm64: Print the spinlock count on panic
When the spinlock count is non-zero while taking a data abort we panic.
Print this count to help debugging.

Sponsored by:	Arm Ltd
2023-05-24 17:20:06 +01:00
Andrew Turner
0731b0a9f1 Print registers on an arm64 spinlock data abort
When checking if the spinlock count is correct in a data abort we can
panic without printing the registers. These are useful to debug the
abort, e.g. by giving the fault address register.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40228
2023-05-24 17:20:06 +01:00
Andrew Turner
b81e1c6b72 Don't print leading 0's in the arm64 esr
We don't print leading zeros for other registers, so do the same with
ESR_EL1.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40129
2023-05-24 17:20:06 +01:00
Andrew Turner
800b39cf99 arm64: Remove CNTHCTL_EL2 from arm64.h
It is also in hypervisor.h where it belongs.

Sponsored by:	Arm Ltd
2023-05-24 17:20:05 +01:00
Dag-Erling Smørgrav
5afab0e5e5 ldns: Upgrade to 1.8.3.
Merge commit 'cf3e3d5bd0a1fae39c74c7db5a4e8b10732d0766'

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40226
2023-05-24 15:50:18 +00:00
Alexander V. Chernikov
12cfa3c1bd ifconfig: fix interface address ordering with Netlink. 2023-05-24 15:34:21 +00:00
Mike Karels
1186ef86c3 RELNOTES: add note about moving /usr/home to /home
Document change to pw and hence bsdinstall.
2023-05-24 10:32:07 -05:00
Mike Karels
aa1a1e7dc4 mksnap_ffs.8: update /home examples
The default location for home directories is moving from /usr/home
to /home.  Update the examples accordingly.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40205
2023-05-24 10:31:50 -05:00
Ed Maste
d1639e43c5 cpuset: increase userland maximum size to 1024
Hardware with more than 256 CPU cores is now available and will become
increasingly common.  Bump CPU_MAXSIZE (used for userland cpuset_t
sizing) to 1024 to define the ABI for FreeBSD 14.

This change is reapplied after a change to decouple cpuset from bhyve:
commit e17eca3276 ("vmm: Avoid embedding cpuset_t ioctl ABIs").

PR:		269572, 271213 [exp-run]
Reviewed by:	mjg, jhb
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39941

(cherry picked from commit 76887e84be)
2023-05-24 10:59:05 -04:00
Randall Stewart
57a3a161a9 tcp: request tracking is not http specific.
This change is a name change only. TCP Request tracking can track sendfile and even non-sendfile requests. The
names however in the current code use http, and they should not. The feature is not http specific. Lets change the
name so they more properly reflect whats going on. This also fixes conflicts with http_req which caused application pain.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D40229
2023-05-24 06:35:36 -04:00
Mitchell Horne
08637d5d15 ofw_cpu: quiet secondary CPU devices
We already do plenty to announce the different CPUs in dmesg. Follow the
ACPI CPU strategy of reporting the first CPU device, but quieting the
rest for non-verbose boot. This cuts down slightly on dmesg output.

Reviewed by:	manu, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40243
2023-05-24 10:28:26 -03:00
Mitchell Horne
5edffecc4b ofw_cpu: whitespace cleanup
Reviewed by:	jhb, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40242
2023-05-24 10:28:26 -03:00
Mark Johnston
2c0a6d0e7b bhyvectl: Update usage of vm_run()
Fixes:	e17eca3276 ("vmm: Avoid embedding cpuset_t ioctl ABIs")
2023-05-24 08:23:22 -04:00
Andrew Turner
255adf35c0 Export arm64 VFP handling functions
These will be used by bhyve to manage the host VFP registers, e.g.
saving the host state before entering a guest.

Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40130
2023-05-24 11:55:38 +01:00
Andrew Turner
419f8fc7fb Add more arm64 special registers
These will be used by bhyve

Reviewed by:	markj
Sponsored by:	Arm Ltd
Sponsored by:	Innovate UK
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40128
2023-05-24 11:55:38 +01:00
Zachary Leaf
012ea67d2d arm64 pmap: introduce PHYS_TO_PTE macro
Introduce macro for PHYS_TO_PTE, setting the groundwork for future
support of various Arm VMSA extensions.

For extensions such as 52-bit VA/PA (FEAT_LPA2), the representation of
an address between a PTE and PA are not equivalent. This macro will
allow converting between the different representations.

Currently PHYS_TO_PTE is a NOP. Replace all instances where we go from
PA to PTE with new PHYS_TO_PTE macro.

Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D39828
2023-05-24 11:55:38 +01:00
Zachary Leaf
0f54e49d4b arm64 pmap: introduce PTE_TO_PHYS macro
Introduce macro for PTE_TO_PHYS, setting the groundwork for future
support of various Arm VMSA extensions.

For extensions such as 52-bit VA/PA (FEAT_LPA2), the representation of
an address between a PTE and PA are not equivalent. This macro will
allow converting between the different representations.

Currently going from PTE to PA is achieved by masking off the upper and
lower attributes. Retain this behaviour but replace all instances with
the new macro instead.

Reviewed by:	alc, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D39827
2023-05-24 11:55:38 +01:00
Alexander V. Chernikov
6e3a9d7f2c ifconfig: introduce ifconfig_context to store current global state.
The structure consists of all current context - arguments,
open sockets, current family and so on.

Pass this structure as a first argument to most of the af_ menthods.
This allows to propagate and update shared data without using
 global variables.

The diff is pretty large, but de-facto mechanical. All changes
 except the structure setup in ifconfig[_netlink].c are one-line
 mechanical changes.

Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D40239
MFC after:	2 weeks
2023-05-24 10:40:34 +00:00
Alexander V. Chernikov
44cd85d42e ifconfig: cleanup warnings #1
Cleanup compiler warnings in preparation to set Wextra and remove WARNS?=2

Differential Revision: https://reviews.freebsd.org/D40238
MFC after:	2 weeks
2023-05-24 10:40:34 +00:00
Bjoern A. Zeeb
ad513b4dba LinuxKPI: add utsname for init_utsname() with release
A wireless dirver is requesting release from the result of
init_utsname().  Populate the field on startup.

MFC after:	10 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D40248
2023-05-24 08:41:28 +00:00
Bjoern A. Zeeb
c1b6e9121e LinuxKPI: uuid: add guid_gen() and guid_copy()
Add function used by a wireless driver.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D40249
2023-05-24 08:34:28 +00:00
Mark Johnston
80764cdb73 bhyve: Remove the exitcode stats structure
This structure isn't used for anything, and only counts a subset of
vmexit types.  Moreover, it is not accurate since there is no
synchronization between vcpu threads.  Simply remove it.

No functional change intended.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40245
2023-05-23 21:17:02 -04:00
Mark Johnston
e17eca3276 vmm: Avoid embedding cpuset_t ioctl ABIs
Commit 0bda8d3e9f ("vmm: permit some IPIs to be handled by userspace")
embedded cpuset_t into the vmm(4) ioctl ABI.  This was a mistake since
we otherwise have some leeway to change the cpuset_t for the whole
system, but we want to keep the vmm ioctl ABI stable.

Rework IPI reporting to avoid this problem.  Along the way, make VM_RUN
a bit more efficient:
- Split vmexit metadata out of the main VM_RUN structure.  This data is
  only written by the kernel.
- Have userspace pass a cpuset_t pointer and cpusetsize in the VM_RUN
  structure, as is done for cpuset syscalls.
- Have the destination CPU mask for VM_EXITCODE_IPIs live outside the
  vmexit info structure, and make VM_RUN copy it out separately.  Zero
  out any extra bytes in the CPU mask, like cpuset syscalls do.
- Modify the vmexit handler prototype to take a full VM_RUN structure.

PR:		271330
Reviewed by:	corvink, jhb (previous versions)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40113
2023-05-23 21:15:59 -04:00
Bjoern A. Zeeb
0be82d56b4 fwget: update pci_network_mediatek for mt7996
Add support for another chipset and fix mt7915 to not match on
all IDs.
2023-05-23 23:41:24 +00:00
Bjoern A. Zeeb
6a1c503736 LinuxKPI: add thermal.h to dummy files for now
Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2023-05-23 23:23:59 +00:00
Bjoern A. Zeeb
1213a6bea8 LinuxKPI: skbuff: add napi_build_skb() and skb_mark_for_recycle()
Add more (skeleton) functions used by wireless drivers.

MFC after:	10 days
2023-05-23 23:18:35 +00:00
Yan Ka Chiu
7e49aa86a2
ifconfig(8): Teach ifconfig to attach and run itself in a jail
Add -j <jail> flag to ifconfig to allow ifconfig to attach and run inside a
jail. This allow parent to configure network interfaces of its children
even if ifconfig is not available in child's tree (e.g. Linux Jails)

Reviewed by:	emaste, khng, melifaro
Event:		Kitchener-Waterloo Hackathon 202305
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40213
2023-05-23 16:39:22 -04:00
Dimitry Andric
3741ffdb14 Fix typo in sys/conf/kern.mk's InitAll warning message
I missed this one in commit 3006f6df02.

Fixes:		3006f6df02
MFC after:	3 days
2023-05-23 19:56:46 +02:00
Dimitry Andric
c32736222c Enable -ftrivial-auto-var-init flags for gcc >= 12
Now that gcc >= 12 supports -ftrivial-auto-var-init, add it to
bsd.compiler.mk's "init-all" feature.

PR:		271047
Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D40208
2023-05-23 19:44:45 +02:00
Dimitry Andric
3006f6df02 Update -ftrivial-auto-var-init flags for clang >= 16
As of clang 16, the -ftrivial-auto-var-init=zero option no longer needs
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
to enable the option. Only add it for older clang versions.

PR:		271047
Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D40208
2023-05-23 19:44:45 +02:00
Simon J. Gerraty
75e02c458a libsecureboot ensure correct BUILD_UTC
If using stat(1) on BUILD_UTC_FILE we should use -L incase
it is a symlink.

If we have new enough bmake though we can just use ${BUILD_UTC_FILE:mtime}
2023-05-23 09:02:00 -07:00
Dag-Erling Smørgrav
5063211781 ctags: Error out if writing to stdout failed.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	cracauer, allanjude
Differential Revision:	https://reviews.freebsd.org/D40200
2023-05-23 17:31:28 +02:00
Christos Margiolis
7900879eec rc.resume: remove obsolete comment
Reviewed by:	markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D40235
2023-05-23 18:26:56 +03:00
Christos Margiolis
ff624eb636 kinst: use dtrace_dis_get_byte() instead of own copy
No functional change intended.

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39872
2023-05-23 18:12:18 +03:00
Johannes Totz
2cf8ef5910 rc.suspend: execute rc-scripts with suspend keyword
For symmetry with rc.resume, give rc.suspend the ability to execute
rc-scripts. Use the suspend keyword for that.

Use-case is for setting a wake-up time, e.g. via efiwake.

Reviewed by:	christos
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D39965
2023-05-23 18:11:31 +03:00
Christos Margiolis
98ab9802af dtrace: rename rp to frame in dtrace_getreg()
Reviewed by:	mhorne, markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40231
2023-05-23 17:44:47 +03:00
Christos Margiolis
ed35c7cf77 dtrace.1: fix mandoc -Tlint
Reviewed by:	markj
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D40230
2023-05-23 17:29:19 +03:00
Mark Johnston
30038a8b4e md: Get rid of the pbuf zone
The zone is used solely to provide KVA for mapping BIOs so that we can
pass mapped buffers to VOP_READ and VOP_WRITE.  Currently we preallocate
nswbuf/10 bufs for this purpose during boot.

The intent was to limit KVA usage on 32-bit systems, but the
preallocation means that we in fact consumed more KVA than needed unless
one has more than nswbuf/10 (typically 25) vnode-backed MD devices
in existence, which I would argue is the uncommon case.

Meanwhile, all I/O to an MD is handled by a dedicated thread, so we can
instead simply preallocate the KVA region at MD device creation time.

Event:		BSDCan 2023
Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D40215
2023-05-23 10:27:10 -04:00
Christos Margiolis
21a16d55cc dtrace: add register bindings for arm64
Reviewed by:	mhorne, markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39956
2023-05-23 17:19:25 +03:00
Christos Margiolis
db05f9fbfb dtrace: implement dtrace_instr_size() for arm64
Reviewed by:	markj
Approved by;	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39955
2023-05-23 17:19:15 +03:00
Christos Margiolis
27ff920e6a dtrace: remove ifdef around dtrace_instr_size()
Architectures that are not included in the #ifdef won't be able to
compile libdtrace. This was tested on an ARM64 build. If the ifdef is
removed, libdtrace can be compiled with no problems, otherwise it fails
at libdtrace.

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39948
2023-05-23 17:19:04 +03:00
Christos Margiolis
1e136a9cbd dtrace(1): add -d flag to dump D script post-dt_sugar
By specifying the -d flag, libdtrace will dump the D script after it has
applied syntactical sugar transformations (e.g if/else). This is useful
for both understanding what dt_sugar does, as well as debugging it.

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38732
2023-05-23 17:18:39 +03:00