1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
Commit Graph

278023 Commits

Author SHA1 Message Date
Pierre Pronchery
6eb7879f42 bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon()
Avoid a race condition when accessing guest memory, by reading memory
contents only once.

This has also been applied to _vq_record() in
sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion.

Reported by:	Synacktiv
Reviewed by:	markj
Security:	HYP-10
Sponsored by:	The Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D45735

(cherry picked from commit 869d760cb9)
(cherry picked from commit ed03c30990)
2024-10-02 16:37:49 -04:00
Val Packett
37bea3b062 pci_iov: Add a device_printf if out of bus numbers
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D20591

(cherry picked from commit 6a4f0c0637)
2024-10-02 12:55:48 -07:00
Krzysztof Galazka
fa0f7eefb9 iflib: Simplify iflib_legacy_setup
Follow the pattern from iflib_irq_alloc_generic function and use
iflib_fast_intr as a handler for RX only interrupts.

Also remove some intermediate variables and use consistent
way for referencing queue's structures.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46061

(cherry picked from commit 36a0019238)
2024-10-02 12:55:36 -07:00
Joyu Liao
2e34892898 e1000: Delay safe_pause switch until SI_SUB_CLOCKS
Based on sysinit_sub_id, SI_SUB_CLOCKS is after SI_SUB_CONFIGURE.

SI_SUB_CONFIGURE  = 0x3800000,  /* Configure devices */  
At this stage, the variable “cold” will be set to 0.

SI_SUB_CLOCKS    = 0x4800000,  /* real-time and stat clocks*/
At this stage, the clock configuration will be done, and the real-time
clock can be used.

In the e1000 driver, if the API safe_pause_* are called between
SI_SUB_CONFIGURE and SI_SUB_CLOCKS stages, it will choose the wrong
clock source. The API safe_pause_* uses “cold” the value of which is
updated in SI_SUB_CONFIGURE, to decide if the real-time clock source is
ready. However, the real-time clock is not ready til the SI_SUB_CLOCKS
routines are done.

Obtained from:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org/D42920

(cherry picked from commit 930a1e6f3d)
2024-10-02 12:55:23 -07:00
Kevin Bowling
8688a242b5 e1000: Add sysctl for igb(4) DMA Coalesce
This feature can increase efficiency at the expense of latency

It does not work well with the default interrupt delay, but expose
the otherwise unconnected code in the driver in case people want to
experiment.

See
https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf

Sponsored by:	Blue Box Systems

(cherry picked from commit c9021340a3)
2024-10-02 12:55:12 -07:00
Kevin Bowling
999b6a9818 e1000: Handle igb EEE sysctl
Sponsored by:	Blue Box Systems

(cherry picked from commit 2e78e568c2)
2024-10-02 12:55:01 -07:00
Kevin Bowling
e86189c62b e1000: Add sysctls for some missing MAC stats
Sponsored by:	Blue Box Systems

(cherry picked from commit aa7d086ad9)
2024-10-02 12:54:34 -07:00
Mateusz Piotrowski
416612c637 rc.subr.8: Fix the Bl macro of a list which is actually a table
MFC after:	2 weeks

(cherry picked from commit 6e414739fc)
2024-10-02 11:27:12 +02:00
Mateusz Piotrowski
35d8a02eea rc.subr: Consistently use an absolute path for sysrc
MFC after:	2 weeks
Approved by:	christos

(cherry picked from commit 401516dbc5)
2024-10-02 11:27:05 +02:00
Mateusz Piotrowski
d51260ef94 rc.8: Remove false information about rc.d/local
It does not handle scripts in /usr/local/etc/rc.d/. Instead, it takes
care of /etc/rc.local and /etc/rc.shutdown.local.

MFC after:	2 weeks

(cherry picked from commit 9dc67a7065)
2024-10-02 11:25:33 +02:00
Mateusz Piotrowski
b13093260a rc.subr.8: Do not use mdoc macros for Bl width
Macros do not expand there.

MFC after:	1 week

(cherry picked from commit 859868156a)
2024-10-02 11:22:58 +02:00
Alexander Ziaee
33ad485f47 ntp: Improve descriptions in man pages
+ ntpd added to ntp.conf(5) description (search keywords)
+ expand NTP so these pages are shown when `apropos time`
+ "standard" => "reference" for increased consistency
- removed redundant or duplicated search keywords

ntp.org bug:	https://bugs.ntp.org/show_bug.cgi?id=3936
Reviewed by:	Harlan Stenn <stenn@nwtime.org>
Reviewed by:	Cy Schubert <cy@nwtime.org>

(cherry picked from commit c7a33fe37d)
2024-09-30 21:29:48 -07:00
Cy Schubert
b4e224360e wpa: Fix gcc build
Order of libraries still matters with GCC toolchains. Moving the
wpapasn library before the wpacommon specification resolves the link
problem.

This issue was not detected by make universe.

Fixes:		a90b9d0159

(cherry picked from commit 8880825df1)
2024-09-30 21:29:48 -07:00
Cy Schubert
87b2a3073a wpa: Import 2.11
Following is a changelog of new features and fixes to wpa:

hostapd:
* Wi-Fi Easy Connect
  - add support for DPP release 3
  - allow Configurator parameters to be provided during config exchange
* HE/IEEE 802.11ax/Wi-Fi 6
  - various fixes
* EHT/IEEE 802.11be/Wi-Fi 7
  - add preliminary support
* SAE: add support for fetching the password from a RADIUS server
* support OpenSSL 3.0 API changes
* support background radar detection and CAC with some additional
  drivers
* support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3)
* EAP-SIM/AKA: support IMSI privacy
* improve 4-way handshake operations
  - use Secure=1 in message 3 during PTK rekeying
* OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases
  to avoid interoperability issues
* support new SAE AKM suites with variable length keys
* support new AKM for 802.1X/EAP with SHA384
* extend PASN support for secure ranging
* FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP)
  - this is based on additional details being added in the IEEE 802.11
    standard
  - the new implementation is not backwards compatible
* improved ACS to cover additional channel types/bandwidths
* extended Multiple BSSID support
* fix beacon protection with FT protocol (incorrect BIGTK was provided)
* support unsynchronized service discovery (USD)
* add preliminary support for RADIUS/TLS
* add support for explicit SSID protection in 4-way handshake
  (a mitigation for CVE-2023-52424; disabled by default for now, can be
  enabled with ssid_protection=1)
* fix SAE H2E rejected groups validation to avoid downgrade attacks
* use stricter validation for some RADIUS messages
* a large number of other fixes, cleanup, and extensions

wpa_supplicant:
* Wi-Fi Easy Connect
  - add support for DPP release 3
  - allow Configurator parameters to be provided during config exchange
* MACsec
  - add support for GCM-AES-256 cipher suite
  - remove incorrect EAP Session-Id length constraint
  - add hardware offload support for additional drivers
* HE/IEEE 802.11ax/Wi-Fi 6
  - support BSS color updates
  - various fixes
* EHT/IEEE 802.11be/Wi-Fi 7
  - add preliminary support
* support OpenSSL 3.0 API changes
* improve EAP-TLS support for TLSv1.3
* EAP-SIM/AKA: support IMSI privacy
* improve mitigation against DoS attacks when PMF is used
* improve 4-way handshake operations
  - discard unencrypted EAPOL frames in additional cases
  - use Secure=1 in message 2 during PTK rekeying
* OCV: do not check Frequency Segment 1 Channel Number for 160 MHz cases
  to avoid interoperability issues
* support new SAE AKM suites with variable length keys
* support new AKM for 802.1X/EAP with SHA384
* improve cross-AKM roaming with driver-based SME/BSS selection
* PASN
  - extend support for secure ranging
  - allow PASN implementation to be used with external programs for
    Wi-Fi Aware
* FT: Use SHA256 to derive PMKID for AKM 00-0F-AC:3 (FT-EAP)
  - this is based on additional details being added in the IEEE 802.11
    standard
  - the new implementation is not backwards compatible, but PMKSA
    caching with FT-EAP was, and still is, disabled by default
* support a pregenerated MAC (mac_addr=3) as an alternative mechanism
  for using per-network random MAC addresses
* EAP-PEAP: require Phase 2 authentication by default (phase2_auth=1)
  to improve security for still unfortunately common invalid
  configurations that do not set ca_cert
* extend SCS support for QoS Characteristics
* extend MSCS support
* support unsynchronized service discovery (USD)
* add support for explicit SSID protection in 4-way handshake
  (a mitigation for CVE-2023-52424; disabled by default for now, can be
  enabled with ssid_protection=1)
  - in addition, verify SSID after key setup when beacon protection is
    used
* fix SAE H2E rejected groups validation to avoid downgrade attacks
* a large number of other fixes, cleanup, and extensions

Merge commit '6377230b3cf4f238dcd0dc2d76ff25943d3040e5'

(cherry picked from commit a90b9d0159)
2024-09-30 21:29:48 -07:00
Steve Kargl
3d77026d8a libm: fma: correct zero sign with small inputs
This is a fixed version of 888796ade2.

PR:		277783
Reported by:	Victor Stinner
Reviewed by:	emaste
MFC after:	1 week

(cherry picked from commit 888796ade2)
(cherry picked from commit e77ad954bb)
(cherry picked from commit 34f746cc7f)
(cherry picked from commit dc39004bc6)
2024-09-30 21:19:13 -04:00
Ed Maste
047870a3b1 libm: add parens to clarify expressions in fma, fmal
Obtained from:	NetBSD

(cherry picked from commit 001606523a)
(cherry picked from commit d1d8c91147)
2024-09-30 21:18:15 -04:00
Ed Maste
dd7a4da0e9 msun: update Clang bug reference in fma test
LLVM bugzilla bug 8100 became issue #8472 with the migration to GitHub.

https://github.com/llvm/llvm-project/issues/8472
(cherry picked from commit 92927b8bcf)
(cherry picked from commit 6cd4450c6c)
2024-09-30 21:18:15 -04:00
Bjoern A. Zeeb
335a234d72 LinuxKPI: 802.11: support manual lladdr changes
Allow a user to change the "ether" address by ifconfig while a VAP is
not UP.  Compared to net80211 (given we have no callback) we register
an eventhandler per-vif (a global one would force us to use hacks to
derive if a vap is indeed also a lkpi_80211 vif).

Sponsored by:	The FreeBSD Foundation
PR:		277356
Tested by:	lwhsu
Differential Revision: https://reviews.freebsd.org/D46121

(cherry picked from commit 4aff4048f5)
2024-09-30 12:19:05 +00:00
Pierre Pronchery
32e077f273 bhyve: initialize register value
In case of an error in a code pattern like

```
uint64_t val;
error = memread(vcpu, gpa, &val, 1, arg);
error = vie_update_register(vcpu, reg, val, size);
```

uninitialized stack data would be used.

Reported by:    Synacktiv
Reviewed by:	markj
Security:       HYP-21
Sponsored by:   The Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46107

(cherry picked from commit 94693ec7c8)
(cherry picked from commit a03acfa434)
2024-09-30 08:11:47 -04:00
Zhenlei Huang
1290de0d54 mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 7ea3fd3bb5)
(cherry picked from commit 70280bc71d)
2024-09-30 13:05:43 +08:00
Zhenlei Huang
7000dd2e29 liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 57cd8f27b7)
(cherry picked from commit 518e138448)
2024-09-30 13:05:43 +08:00
Zhenlei Huang
7b7353261e jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 3fdef8e855)
(cherry picked from commit 6b25a8f079)
2024-09-30 13:05:43 +08:00
Zhenlei Huang
545f28e021 cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit af28fc3c19)
(cherry picked from commit e78770d62f)
2024-09-30 13:05:42 +08:00
Zhenlei Huang
617dcd17a5 bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit d44bc2f07b)
(cherry picked from commit f5cbe8ce89)
2024-09-30 13:05:42 +08:00
Zhenlei Huang
b620bc6e1d axgbe: Stop checking for failures from taskqueue_create(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit b29adaaf44)
(cherry picked from commit 39c35f6c54)
2024-09-30 13:05:41 +08:00
Zhenlei Huang
26e17489cd ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit f5524be39e)
(cherry picked from commit 7ae7006224)
2024-09-30 13:05:41 +08:00
Zhenlei Huang
8b872247de alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 0cd3976d07)
(cherry picked from commit a6c873a822)
2024-09-30 13:05:41 +08:00
Zhenlei Huang
0b1ac58493 age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 5cece2c24b)
(cherry picked from commit ea86e323e5)
2024-09-30 13:05:40 +08:00
Zhenlei Huang
3e90f15df4 ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853

(cherry picked from commit 3f3f3ca25b)
(cherry picked from commit 5de9286b9a)
2024-09-30 13:05:40 +08:00
Zhenlei Huang
c55da1eaf7 vchiq(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 778ea7ed5a)
(cherry picked from commit 40015f1c11)
2024-09-30 13:05:39 +08:00
Zhenlei Huang
eded71c830 sdhci(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit f80483cdd5)
(cherry picked from commit 5a7db2ff56)
2024-09-30 13:05:39 +08:00
Zhenlei Huang
36fb983d22 sound: Stop checking for failures from malloc(M_WAITOK)
Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 59121599bb)
(cherry picked from commit bfcaaff418)
2024-09-30 13:05:39 +08:00
Zhenlei Huang
68c96d15d3 sume(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 761339c554)
(cherry picked from commit 140a0c8f39)
2024-09-30 13:05:38 +08:00
Zhenlei Huang
5d9c2687c3 pms(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 4fb8a80a78)
(cherry picked from commit 025c475494)
2024-09-30 13:05:38 +08:00
Zhenlei Huang
6f7d5f52c1 mlx(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 556cd18fb0)
(cherry picked from commit cf44738feb)
2024-09-30 13:05:38 +08:00
Zhenlei Huang
909623bc1a mfi(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 701308ef40)
(cherry picked from commit 4fee8d3e92)
2024-09-30 13:05:37 +08:00
Zhenlei Huang
20805d4793 iser(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 40a6bbc428)
(cherry picked from commit ec68da0a7e)
2024-09-30 13:05:37 +08:00
Zhenlei Huang
438e078d31 ice(4): Stop checking for failures from malloc(M_WAITOK)
As a consequence now ice_alloc_vsi_qmap() does not fail. Remove unneeded
error checks.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 5f97656fa3)
(cherry picked from commit bb8c6f4325)
2024-09-30 13:05:37 +08:00
Zhenlei Huang
e86d353a89 hptrr(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 92b0370ec6)
(cherry picked from commit e4de0a965f)
2024-09-30 13:05:36 +08:00
Zhenlei Huang
736dfe255d hptnr(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit a3ec5d3ee7)
(cherry picked from commit c860df902b)
2024-09-30 13:05:36 +08:00
Zhenlei Huang
3df0c68bdb hpt27xx(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 28e413a699)
(cherry picked from commit 0341c77f20)
2024-09-30 13:05:36 +08:00
Zhenlei Huang
97cc0b1fa2 fwip(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 4d47c7ca7b)
(cherry picked from commit f3af527260)
2024-09-30 13:05:36 +08:00
Zhenlei Huang
f5f9d9d403 etherswitch: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 48741f4cec)
(cherry picked from commit e78c315e89)
2024-09-30 13:05:35 +08:00
Zhenlei Huang
568cb55925 ena(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 51971340bd)
(cherry picked from commit 8c2d777a22)
2024-09-30 13:05:35 +08:00
Zhenlei Huang
73e399c157 drm2: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 6dbf3aca4f)
(cherry picked from commit 95532d15a1)
2024-09-30 13:05:34 +08:00
Zhenlei Huang
be61ff389f cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 955b380365)
(cherry picked from commit 09ed34449c)
2024-09-30 13:05:34 +08:00
Zhenlei Huang
09491167a5 cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit bb51f7c8a4)
(cherry picked from commit 9216ba1853)
2024-09-30 13:05:34 +08:00
Zhenlei Huang
783ec23313 bnxt(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit dcd387aaa5)
(cherry picked from commit e763c326fc)
2024-09-30 13:05:34 +08:00
Zhenlei Huang
55e34ff3a4 axgbe: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit ab0b996bdd)
(cherry picked from commit 3db5be6821)
2024-09-30 13:05:33 +08:00
Zhenlei Huang
d0aa34422a ath(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit 3fdf587ab0)
(cherry picked from commit 8c2748b922)
2024-09-30 13:05:33 +08:00