git: 5c783a0b2826 - main - ASan: Add asan_static to build
The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5c783a0b2826d1c6bbaa7d4b01a46d1dcdb39e8c commit 5c783a0b2826d1c6bbaa7d4b01a46d1dcdb39e8c Author: SHENG-YI HONG AuthorDate: 2023-11-03 07:02:26 + Commit: Li-Wen Hsu CommitDate: 2023-11-03 07:02:26 + ASan: Add asan_static to build This is a partial fix for building with -DWITH_ASAN. Reviewed by:Fangrui Song, dim, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42388 --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6bdb933c813e..075bca234630 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2995,6 +2995,7 @@ _prereq_libs+= lib/libssp_nonshared _prereq_libs+= lib/libclang_rt/asan _prereq_libs+= lib/libclang_rt/asan-preinit _prereq_libs+= lib/libclang_rt/asan_cxx +_prereq_libs+= lib/libclang_rt/asan_static .endif .if ${MK_UBSAN} != "no" _prereq_libs+= lib/libclang_rt/ubsan_minimal
git: df6e7e11c5f6 - main - pkgbase: set a default set of kernel for when PACKAGE_BUILDING=1
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=df6e7e11c5f660cbd5381819718e3c947325fa2e commit df6e7e11c5f660cbd5381819718e3c947325fa2e Author: Baptiste Daroussin AuthorDate: 2023-11-02 13:20:11 + Commit: Baptiste Daroussin CommitDate: 2023-11-03 08:17:30 + pkgbase: set a default set of kernel for when PACKAGE_BUILDING=1 PACKAGE_BUILDING is already known in the ports tree as a variable use to defined when the packages is being actually built in an automation process, reuse that variable to define the default set of kernel we plan to build for the default pkgbase. Reviewed by:manu, jrtc27 Accepted by:manu MFC After: 1 week Differential Revision: https://reviews.freebsd.org/D42444 --- Makefile.inc1 | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 075bca234630..a49903a30903 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1677,15 +1677,10 @@ NO_KERNELOBJ= t KERNCONF=${KERNFAST} .endif .endif -.if ${TARGET_ARCH} == "powerpc64" -KERNCONF?= GENERIC64 -.elif ${TARGET_ARCH} == "powerpc64le" -KERNCONF?= GENERIC64LE -.elif ${TARGET_ARCH} == "powerpcspe" -KERNCONF?= MPC85XXSPE -.else -KERNCONF?= GENERIC -.endif +GENERIC_KERNCONF_SUFX_powerpc64= 64 +GENERIC_KERNCONF_SUFX_powerpc64le= 64LE +GENERIC_KERNCONF_powerpcspe= MPC85XXSPE +GENERIC_KERNCONF?= ${GENERIC_KERNCONF_${TARGET_ARCH}:UGENERIC${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}}} INSTKERNNAME?= kernel KERNSRCDIR?= ${.CURDIR}/sys @@ -1693,6 +1688,23 @@ KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf KRNLOBJDIR=${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} KERNCONFDIR?= ${KRNLCONFDIR} +.for _k in ${GENERIC_KERNCONF} MINIMAL${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}} ${GENERIC_KERNCONF}-MMCCAM +.if exists(${KERNCONFDIR}/${_k}) +PKG_KERNCONF+= ${_k} +.for _dbg in NODEBUG DEBUG +.if exists(${KERNCONFDIR}/${_k}-${_dbg}) +PKG_KERNCONF+= ${_k}-${_dbg} +.endif +.endfor +.endif +.endfor + +.if defined(PACKAGE_BUILDING) +KERNCONF?= ${PKG_KERNCONF} +.else +KERNCONF?= ${GENERIC_KERNCONF} +.endif + BUILDKERNELS= INSTALLKERNEL= .if defined(NO_INSTALLKERNEL)
git: 188fe88ec50e - main - pkgbase: force OSVERSION
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=188fe88ec50eac7c10e1d8350bf1180f8c16e463 commit 188fe88ec50eac7c10e1d8350bf1180f8c16e463 Author: Baptiste Daroussin AuthorDate: 2023-11-03 08:29:23 + Commit: Baptiste Daroussin CommitDate: 2023-11-03 08:29:23 + pkgbase: force OSVERSION This is used to the package annotation helping pkg to know about backward compatibility is set to the version of the packages not the version of the host building the packages --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index a49903a30903..c1c0b56efd1b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2192,6 +2192,7 @@ sign-packages:_pkgbootstrap .PHONY @[ -L "${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/latest" ] && \ unlink ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/latest ; \ ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname repo \ + -o OSVERSION="${OSRELDATE}" \ -m ${WSTAGEDIR}/meta \ -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \ ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \
git: f790f2809202 - stable/14 - ping tests: Fix test on i386 platforms
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f790f2809202389eee7750eb160491d9d3ef commit f790f2809202389eee7750eb160491d9d3ef Author: Jose Luis Duran AuthorDate: 2023-10-17 11:35:38 + Commit: Mark Johnston CommitDate: 2023-11-03 13:30:58 + ping tests: Fix test on i386 platforms Actually use INT_MAX (0x7fff), not UINT_MAX (0x) to avoid overflowing time_t and missing the test. Reported by:Jenkins Reviewed by:markj Fixes: 5b8af90fe332 ("ping: Add ATF-Python tests") Pull Request: https://github.com/freebsd/freebsd-src/pull/874 Differential Revision: https://reviews.freebsd.org/D42268 (cherry picked from commit 24fe0cb84d71a0e9d648c43f92b5c3a730c3855a) --- sbin/ping/tests/test_ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 26a69b62f8fb..b501b8a606bf 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -51,7 +51,7 @@ def build_response_packet(echo, ip, icmp, oip_ihl, special): # Build a package with a timestamp of INT_MAX # (time-warped package) payload_no_timestamp = sc.bytes_hex(load)[16:] -load = (b"\xff" * 8) + sc.hex_bytes(payload_no_timestamp) +load = b"\x7f" + (b"\xff" * 7) + sc.hex_bytes(payload_no_timestamp) if special == "wrong": # Build a package with a wrong last byte payload_no_last_byte = sc.bytes_hex(load)[:-2]
git: 368b97361a03 - main - riscv: Update a variable name to match a comment
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=368b97361a0379acaec4a385c5c9d83ba6edc5a2 commit 368b97361a0379acaec4a385c5c9d83ba6edc5a2 Author: Mark Johnston AuthorDate: 2023-11-03 13:34:11 + Commit: Mark Johnston CommitDate: 2023-11-03 13:38:56 + riscv: Update a variable name to match a comment This makes pmap_insert_pt_page() consistent with arm64 and amd64. No functional change intended. Reported by:alc Fixes: 7703ac2e983b ("riscv: Port improvements from arm64/amd64 pmaps, part 1") --- sys/riscv/riscv/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index f0108b611937..f6923363c484 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -1206,15 +1206,15 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist *free, * field will be set to VM_PAGE_BITS_ALL. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t ml3, bool promoted, +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted, bool all_l3e_PTE_A_set) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT(promoted || !all_l3e_PTE_A_set, ("a zero-filled PTP can't have PTE_A set in every PTE")); - ml3->valid = promoted ? (all_l3e_PTE_A_set ? VM_PAGE_BITS_ALL : 1) : 0; - return (vm_radix_insert(&pmap->pm_root, ml3)); + mpte->valid = promoted ? (all_l3e_PTE_A_set ? VM_PAGE_BITS_ALL : 1) : 0; + return (vm_radix_insert(&pmap->pm_root, mpte)); } /*
git: 7bca09e2bb7f - main - mpsutil: Add higher PCIe speeds.
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7bca09e2bb7f812913249a1e5883742d6d6ac6b2 commit 7bca09e2bb7f812913249a1e5883742d6d6ac6b2 Author: Alexander Motin AuthorDate: 2023-11-03 15:49:59 + Commit: Alexander Motin CommitDate: 2023-11-03 15:49:59 + mpsutil: Add higher PCIe speeds. There are already PCIe Gen4 HBAs, reported improperly. MFC after: 1 week --- usr.sbin/mpsutil/mps_show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mpsutil/mps_show.c b/usr.sbin/mpsutil/mps_show.c index 7454bf15e06c..6efa9b76dd3d 100644 --- a/usr.sbin/mpsutil/mps_show.c +++ b/usr.sbin/mpsutil/mps_show.c @@ -57,7 +57,7 @@ MPS_TABLE(top, show); static int show_adapter(int ac, char **av) { - const char* pcie_speed[] = { "2.5", "5.0", "8.0" }; + const char* pcie_speed[] = { "2.5", "5.0", "8.0", "16.0", "32.0" }; const char* temp_units[] = { "", "F", "C" }; const char* ioc_speeds[] = { "", "Full", "Half", "Quarter", "Eighth" };
git: 70f2356d364f - main - cam: Make cam_debug macros atomic
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=70f2356d364fdb7e2ff5487ae03125a338defd54 commit 70f2356d364fdb7e2ff5487ae03125a338defd54 Author: Warner Losh AuthorDate: 2023-11-02 20:41:09 + Commit: Warner Losh CommitDate: 2023-11-03 16:15:38 + cam: Make cam_debug macros atomic The CAM_DEBUG* macros use multiple printfs to dump the data. This is suboptimal when tracing things that produce even a moderate amount since it gets intertwingled. I can't even turn on tracing with a 24-disk HBA on boot without it getting messed up. Add helper routines to work around clang's over-use of the stack: that way we only pay the stack penalty when a trace hits. Sponsored by: Netflix Reviewed by:ken, mav Differential Revision: https://reviews.freebsd.org/D42411 --- sys/cam/cam_debug.h | 67 --- sys/cam/cam_xpt.c | 75 ++--- sys/cam/cam_xpt.h | 4 +-- 3 files changed, 95 insertions(+), 51 deletions(-) diff --git a/sys/cam/cam_debug.h b/sys/cam/cam_debug.h index 1526f11f4c0d..8c04b1fd7ce9 100644 --- a/sys/cam/cam_debug.h +++ b/sys/cam/cam_debug.h @@ -81,57 +81,46 @@ extern uint32_t cam_dflags; /* Printf delay value (to prevent scrolling) */ extern uint32_t cam_debug_delay; -/* Debugging macros. */ -#defineCAM_DEBUGGED(path, flag)\ - (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)\ -&& (cam_dpath != NULL) \ -&& (xpt_path_comp(cam_dpath, path) >= 0) \ -&& (xpt_path_comp(cam_dpath, path) < 2)) - -#defineCAM_DEBUG(path, flag, printfargs) \ - if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \ -&& (cam_dpath != NULL) \ -&& (xpt_path_comp(cam_dpath, path) >= 0) \ -&& (xpt_path_comp(cam_dpath, path) < 2)) { \ - xpt_print_path(path); \ - printf printfargs; \ - if (cam_debug_delay != 0) \ - DELAY(cam_debug_delay); \ - } +/* Helper routines -- helps conserve stack */ +struct cam_ed; +void xpt_cam_path_debug(struct cam_path *path, const char *fmt, ...); +void xpt_cam_dev_debug(struct cam_ed *dev, const char *fmt, ...); +void xpt_cam_debug(const char *fmt, ...); -#defineCAM_DEBUG_DEV(dev, flag, printfargs)\ - if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \ -&& (cam_dpath != NULL) \ -&& (xpt_path_comp_dev(cam_dpath, dev) >= 0)\ -&& (xpt_path_comp_dev(cam_dpath, dev) < 2)) { \ - xpt_print_device(dev); \ - printf printfargs; \ - if (cam_debug_delay != 0) \ - DELAY(cam_debug_delay); \ +/* Stupid macro to remove a layer of parens */ +#define _CAM_X(...) __VA_ARGS__ + +/* Debugging macros. */ +#defineCAM_DEBUGGED(path, flag) \ + (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)\ +&& (cam_dpath != NULL) \ +&& (xpt_path_comp(cam_dpath, (path)) >= 0) \ +&& (xpt_path_comp(cam_dpath, (path)) < 2)) + +#defineCAM_DEBUG(path, flag, printfargs) \ + if (CAM_DEBUGGED(path, flag)) { \ + xpt_cam_path_debug(path, _CAM_X printfargs);\ } -#defineCAM_DEBUG_PRINT(flag, printfargs) \ - if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \ - printf("cam_debug: "); \ - printf printfargs; \ - if (cam_debug_delay != 0) \ - DELAY(cam_debug_delay); \ +#defineCAM_DEBUG_DEV(dev, flag, printfargs) \ + if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \ + && (cam_dpath != NULL) \ + && (xpt_path_comp_dev(cam_dpath, (dev)) >= 0) \ + && (xpt_path_comp_dev(cam_dpath, (dev)) < 2)) { \ + xpt_cam_dev_debug(dev, _CAM_X printfargs); \ } -#defineCAM_DEBUG_PATH_PRINT(flag, path, printfargs)\ - if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \ - xpt_print(path, "cam_debug: "); \ - printf printfargs; \ - if (cam_debug_delay != 0) \ - DELAY(cam_debug_delay); \ +#defineCAM_DEBUG_PRINT(flag, printfargs)
git: 03e2fc4c4446 - main - cam: Minor tidying up the cam module Makefile
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=03e2fc4c44465d29a8208eaa0bd65198efbd572b commit 03e2fc4c44465d29a8208eaa0bd65198efbd572b Author: Warner Losh AuthorDate: 2023-11-02 20:41:17 + Commit: Warner Losh CommitDate: 2023-11-03 16:15:39 + cam: Minor tidying up the cam module Makefile One src per line + sorting. Sponsored by: Netflix --- sys/modules/cam/Makefile | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/sys/modules/cam/Makefile b/sys/modules/cam/Makefile index 79551349be3c..566b245dca2c 100644 --- a/sys/modules/cam/Makefile +++ b/sys/modules/cam/Makefile @@ -16,30 +16,39 @@ SRCS+= opt_sa.h SRCS+= opt_ses.h SRCS+= opt_ddb.h SRCS+= opt_printf.h -SRCS+= device_if.h bus_if.h vnode_if.h +SRCS+= bus_if.h +SRCS+= device_if.h +SRCS+= vnode_if.h +SRCS+= ata_all.c +SRCS+= ata_da.c +SRCS+= ata_pmp.c +SRCS+= ata_xpt.c SRCS+= cam.c SRCS+= cam_compat.c -SRCS+= cam_iosched.c cam_periph.c cam_queue.c cam_sim.c cam_xpt.c -SRCS+= scsi_all.c scsi_cd.c scsi_ch.c +SRCS+= cam_iosched.c +SRCS+= cam_periph.c +SRCS+= cam_queue.c +SRCS+= cam_sim.c +SRCS+= cam_xpt.c +SRCS+= nvme_all.c +SRCS+= nvme_da.c +SRCS+= nvme_util.c +SRCS+= nvme_xpt.c +SRCS+= scsi_all.c +SRCS+= scsi_cd.c +SRCS+= scsi_ch.c SRCS+= scsi_da.c +SRCS+= scsi_enc.c +SRCS+= scsi_enc_safte.c +SRCS+= scsi_enc_ses.c SRCS+= scsi_pass.c SRCS+= scsi_pt.c SRCS+= scsi_sa.c -SRCS+= scsi_enc.c -SRCS+= scsi_enc_ses.c -SRCS+= scsi_enc_safte.c SRCS+= scsi_sg.c -SRCS+= scsi_targ_bh.c scsi_target.c +SRCS+= scsi_targ_bh.c +SRCS+= scsi_target.c SRCS+= scsi_xpt.c SRCS+= smp_all.c -SRCS+= ata_all.c -SRCS+= ata_xpt.c -SRCS+= ata_da.c -SRCS+= ata_pmp.c -SRCS+= nvme_all.c -SRCS+= nvme_xpt.c -SRCS+= nvme_da.c -SRCS+= nvme_util.c EXPORT_SYMS= YES # XXX evaluate
git: dbffadd8c28e - main - pci_vendors: update to 2023-09-22
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=dbffadd8c28e3ab7dc8b5d38e3c5d7f96a5ad62d commit dbffadd8c28e3ab7dc8b5d38e3c5d7f96a5ad62d Author: Baptiste Daroussin AuthorDate: 2023-11-03 16:32:35 + Commit: Baptiste Daroussin CommitDate: 2023-11-03 16:32:45 + pci_vendors: update to 2023-09-22 --- share/misc/pci_vendors | 390 - 1 file changed, 318 insertions(+), 72 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index d3988731c30a..50115d979327 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2023.08.12 -# Date:2023-08-12 03:15:02 +# Version: 2023.09.22 +# Date:2023-09-22 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -773,7 +773,6 @@ 1028 2142 HBA465e Adapter 1028 2209 HBA465i Adapter 1028 220a HBA465i Front - 1028 228a HBA465e-s Adapter 15d9 1d03 AOC-S4116L-H16IR (16DD/96DD) RAID Adapter 15d9 1d07 AOC-S4016L-L16IT Storage Adapter 15d9 1d08 AOC-S4016L-L16IR Storage Adapter @@ -803,6 +802,20 @@ 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA 00b2 PCIe Switch management endpoint 1d49 0003 ThinkSystem 1611-8P PCIe Gen4 NVMe Switch Adapter +# 24G SAS/PCIe storage adapter chip + 00b3 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx +# 9760W 32 internal port RAID controller + 1000 5000 MegaRAID 9760W-32i 24G SAS/PCIe Storage Adapter +# 9760W 16 internal port RAID controller + 1000 5001 MegaRAID 9760W-16i 24G SAS/PCIe Storage Adapter +# 9760W 16 internal and 16 external port RAID controller + 1000 5010 MegaRAID 9760W-16i16e 24G SAS/PCIe Storage Adapter +# 9700W 32 internal port Storage controller + 1000 5020 eHBA 9700W-32i 24G SAS/PCIe Storage Adapter +# 9700W 16 internal port Storage controller + 1000 5021 eHBA 9700W-16i 24G SAS/PCIe Storage Adapter +# 9700 16 external port Storage controller + 1000 5030 eHBA 9700-16e 24G SAS/PCIe Storage Adapter 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00c0 SAS3324 PCI-Express Fusion-MPT SAS-3 @@ -1039,8 +1052,9 @@ 15d9 1c6e AOC-SLG4-2H8M2 Storage Adapter 1d49 0505 ThinkSystem RAID 540-8i PCIe Gen4 12Gb Adapter 1d49 0506 ThinkSystem RAID 540-16i PCIe Gen4 12Gb Adapter - 1d49 0700 ThinkSystem M.2 SATA/NVMe 2-Bay Non-Hot-Swap RAID Enablement Kit - 1d49 0701 ThinkSystem 7mm SATA/NVMe 2-Bay Rear Hot-Swap RAID Enablement Kit + 1d49 0700 ThinkSystem M.2 RAID B540i-2i SATA/NVMe Enablement Kit + 1d49 0701 ThinkSystem 7mm RAID B540p-2HS SATA/NVMe Enablement Kit + 1d49 0702 ThinkSystem M.2 RAID B540p-2HS SATA/NVMe Enablement Kit 10e7 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller @@ -1152,6 +1166,7 @@ 13e9 Ariel/Navi10Lite 13f9 Oberon/Navi12Lite 13fe Cyan Skillfish [BC-250] + 145a Dummy Function (absent graphics controller) 1478 Navi 10 XL Upstream Port of PCI Express Switch 1479 Navi 10 XL Downstream Port of PCI Express Switch 1506 Mendocino @@ -3932,6 +3947,7 @@ 1462 5022 RX 6600 MECH 2X 148c 2412 PowerColor Red Devil RX 6600 XT 1849 5218 Radeon RX 6600 Challenger ITX 8GB + 1da2 448e Radeon RX 6600 XT Pulse 7408 Aldebaran/MI200 [Instinct MI250X] 740c Aldebaran/MI200 [Instinct MI250X/MI250] 740f Aldebaran/MI200 [Instinct MI210] @@ -3948,6 +3964,7 @@ 1da2 e471 NITRO+ RX 7900 XTX Vapor-X 1eae 7901 RX-79XMERCB9 [SPEEDSTER MERC 310 RX 7900 XTX] 745e Navi 31 [Radeon Pro W7800] + 747e Navi 32 [Radeon RX 7700 XT / 7800 XT] 7480 Navi 33 [Radeon RX 7700S/7600/7600S/7600M XT/PRO W7600] 1849 5313 RX 7600 Challenger OC 7483 Navi 33 [Radeon RX 7600M/7600M XT] @@ -4981,6 +4998,8 @@ 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor (PSP) 3.0 Device 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 1458 XGMAC 10GbE Controller + 1459 XGMAC 10GbE Controller 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller @@ -5037,6 +5056,7 @@ 14b5 Family 17h-19h PCIe Ro
git: 1f90b4edffe8 - main - fflush: Split a temporary variable in two.
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1f90b4edffe815aebb35e74b79e10593b31f6b75 commit 1f90b4edffe815aebb35e74b79e10593b31f6b75 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-03 15:08:03 + Commit: Ed Maste CommitDate: 2023-11-03 17:38:12 + fflush: Split a temporary variable in two. It is clearer to avoid reusing temporary variables for different purposes. Sponsored by: Klara, Inc. --- lib/libc/stdio/fflush.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index 30bbd1371ff9..c658fbec697d 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -103,10 +103,10 @@ int __sflush(FILE *fp) { unsigned char *p, *old_p; - int n, t, old_w; + int n, f, t, old_w; - t = fp->_flags; - if ((t & __SWR) == 0) + f = fp->_flags; + if ((f & __SWR) == 0) return (0); if ((p = fp->_bf._base) == NULL) @@ -121,7 +121,7 @@ __sflush(FILE *fp) old_p = fp->_p; fp->_p = p; old_w = fp->_w; - fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; + fp->_w = f & (__SLBF|__SNBF) ? 0 : fp->_bf._size; for (; n > 0; n -= t, p += t) { t = _swrite(fp, (char *)p, n);
git: 270f75cf3433 - main - powerpc: Fix inconsistent Altivec handling in set_mcontext
The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=270f75cf3433807d124cdf1f0072ab801532f425 commit 270f75cf3433807d124cdf1f0072ab801532f425 Author: Shawn Anastasio AuthorDate: 2023-11-03 17:40:18 + Commit: Alfredo Dal'Ava Junior CommitDate: 2023-11-03 17:55:04 + powerpc: Fix inconsistent Altivec handling in set_mcontext When support for fpu_kern_enter/fpu_kern_leave was added to powerpc, set_mcontext was updated to handle Altivec state restoration in the same way that the FPU state by lazily restoring the context on the first trap. However the function was not correctly updated to unconditionally clear the PCB_VEC and PSL_VEC bits from the pcb's flags and srr1 respectively which can sometimes result in a mismatch between a process's MSR[VEC] state and its pcb_flags. Fix this by simply clearing the VEC flags unconditionally in set_mcontext, which is already done for FPU/VSX. Fixes: a6662c37b6ffe ("powerpc: Implement fpu_kern_enter/fpu_kern_leave") Reviewed by:alfredo MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42417 --- sys/powerpc/powerpc/exec_machdep.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 05d3a3cf79ba..0b1751a76454 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -528,8 +528,8 @@ set_mcontext(struct thread *td, mcontext_t *mcp) * Additionally, ensure VSX is disabled as well, as it is illegal * to leave it turned on when FP or VEC are off. */ - tf->srr1 &= ~(PSL_FP | PSL_VSX); - pcb->pcb_flags &= ~(PCB_FPU | PCB_VSX); + tf->srr1 &= ~(PSL_FP | PSL_VSX | PSL_VEC); + pcb->pcb_flags &= ~(PCB_FPU | PCB_VSX | PCB_VEC); if (mcp->mc_flags & _MC_FP_VALID) { /* enable_fpu() will happen lazily on a fault */ @@ -550,9 +550,6 @@ set_mcontext(struct thread *td, mcontext_t *mcp) pcb->pcb_vec.vscr = mcp->mc_vscr; pcb->pcb_vec.vrsave = mcp->mc_vrsave; memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); - } else { - tf->srr1 &= ~PSL_VEC; - pcb->pcb_flags &= ~PCB_VEC; } return (0);
git: 00d65bdc4b6c..e4fe068d29c9 - vendor/pam_modules - vendor branch updated
The branch vendor/pam_modules has been updated by gordon: URL: https://cgit.FreeBSD.org/src/log/?id=00d65bdc4b6c..e4fe068d29c9 e4fe068d29c9 Vendor import of pam_passwdqc v2.0.3.
git: 5f4c09dd85bf - main - Track upstream project rename in contrib/blocklistd
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc commit 5f4c09dd85bff675e0ca63c55ea3c517e0fddfcc Author: Ed Maste AuthorDate: 2022-10-11 19:27:51 + Commit: Ed Maste CommitDate: 2023-11-03 20:53:04 + Track upstream project rename in contrib/blocklistd Upstream is now https://github.com/zoulasc/blocklist/. Rename the contrib directory and update Makefiles to match, in advance of the next vendor branch update. Sponsored by: The FreeBSD Foundation --- contrib/{blacklist => blocklist}/Makefile | 0 contrib/{blacklist => blocklist}/Makefile.inc | 0 contrib/{blacklist => blocklist}/README| 0 contrib/{blacklist => blocklist}/TODO | 0 contrib/{blacklist => blocklist}/bin/Makefile | 0 contrib/{blacklist => blocklist}/bin/blacklistctl.8| 0 contrib/{blacklist => blocklist}/bin/blacklistctl.c| 0 contrib/{blacklist => blocklist}/bin/blacklistd.8 | 0 contrib/{blacklist => blocklist}/bin/blacklistd.c | 0 contrib/{blacklist => blocklist}/bin/blacklistd.conf.5 | 0 contrib/{blacklist => blocklist}/bin/conf.c| 0 contrib/{blacklist => blocklist}/bin/conf.h| 0 contrib/{blacklist => blocklist}/bin/internal.c| 0 contrib/{blacklist => blocklist}/bin/internal.h| 0 contrib/{blacklist => blocklist}/bin/run.c | 0 contrib/{blacklist => blocklist}/bin/run.h | 0 contrib/{blacklist => blocklist}/bin/state.c | 0 contrib/{blacklist => blocklist}/bin/state.h | 0 contrib/{blacklist => blocklist}/bin/support.c | 0 contrib/{blacklist => blocklist}/bin/support.h | 0 contrib/{blacklist => blocklist}/diff/ftpd.diff| 0 contrib/{blacklist => blocklist}/diff/named.diff | 0 contrib/{blacklist => blocklist}/diff/proftpd.diff | 0 contrib/{blacklist => blocklist}/diff/ssh.diff | 0 contrib/{blacklist => blocklist}/etc/Makefile | 0 contrib/{blacklist => blocklist}/etc/blacklistd.conf | 0 contrib/{blacklist => blocklist}/etc/npf.conf | 0 contrib/{blacklist => blocklist}/etc/rc.d/Makefile | 0 contrib/{blacklist => blocklist}/etc/rc.d/blacklistd | 0 contrib/{blacklist => blocklist}/include/Makefile | 0 contrib/{blacklist => blocklist}/include/bl.h | 0 contrib/{blacklist => blocklist}/include/blacklist.h | 0 contrib/{blacklist => blocklist}/lib/Makefile | 0 contrib/{blacklist => blocklist}/lib/bl.c | 0 contrib/{blacklist => blocklist}/lib/blacklist.c | 0 contrib/{blacklist => blocklist}/lib/libblacklist.3| 0 contrib/{blacklist => blocklist}/lib/shlib_version | 0 contrib/{blacklist => blocklist}/libexec/Makefile | 0 contrib/{blacklist => blocklist}/libexec/blacklistd-helper | 0 contrib/{blacklist => blocklist}/port/Makefile.am | 0 contrib/{blacklist => blocklist}/port/_strtoi.h| 0 contrib/{blacklist => blocklist}/port/clock_gettime.c | 0 contrib/{blacklist => blocklist}/port/config.h | 0 contrib/{blacklist => blocklist}/port/configure.ac | 0 contrib/{blacklist => blocklist}/port/fgetln.c | 0 contrib/{blacklist => blocklist}/port/fparseln.c | 0 contrib/{blacklist => blocklist}/port/getprogname.c| 0 contrib/{blacklist => blocklist}/port/m4/.cvsignore| 0 contrib/{blacklist => blocklist}/port/pidfile.c| 0 contrib/{blacklist => blocklist}/port/popenve.c| 0 contrib/{blacklist => blocklist}/port/port.h | 0 contrib/{blacklist => blocklist}/port/sockaddr_snprintf.c | 0 contrib/{blacklist => blocklist}/port/strlcat.c| 0 contrib/{blacklist => blocklist}/port/strlcpy.c| 0 contrib/{blacklist => blocklist}/port/strtoi.c | 0 contrib/{blacklist => blocklist}/test/Makefile | 0 contrib/{blacklist => blocklist}/test/cltest.c | 0 contrib/{blacklist => blocklist}/test/srvtest.c| 0 lib/libblacklist/Makefile | 6 +++--- libexec/blacklistd-helper/Makefile | 4 ++-- libexec/fingerd/Makefile | 2 +- libexec/ftpd/Makefile | 2 +- secure/usr.sbin/sshd/Makefile | 2 +- usr.sbin/blacklistctl/Makefile | 6 +++--- usr.sbin/blacklistd/Makefile | 6 +++--- 65 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contrib/blacklist/Makefile b/contrib/blocklist/Makefile similarity index 100% rename from contrib/blacklist/Makefile rename to contrib/blocklist/Make
git: 45c27ad5241f - main - LinuxKPI: 802.11: error on state transition failure
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=45c27ad5241f5491234afd0b47d13b8005fdb4de commit 45c27ad5241f5491234afd0b47d13b8005fdb4de Author: Bjoern A. Zeeb AuthorDate: 2023-10-25 22:29:35 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:03 + LinuxKPI: 802.11: error on state transition failure The state transition failures we were seeing in the early days are solved. If we now experience one stop processing before passing over to net80211 (sta_newstate()) and before updating iv_state on the vap. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:cc Differential Revision: https://reviews.freebsd.org/D42423 --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e8fb5b4914a6..3da91fa3e0b7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2137,12 +2137,11 @@ lkpi_iv_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) } if (error != 0) { - /* XXX-BZ currently expected so ignore. */ ic_printf(vap->iv_ic, "%s: error %d during state transition " "%d (%s) -> %d (%s)\n", __func__, error, ostate, ieee80211_state_name[ostate], nstate, ieee80211_state_name[nstate]); - /* return (error); */ + return (error); } #ifdef LINUXKPI_DEBUG_80211
git: 5856761fd5f6 - main - LinuxKPI: 802.11: fix ieee80211_add_channel_cbw() argument
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5856761fd5f675c3871a82effdbf714a1d1bcc5e commit 5856761fd5f675c3871a82effdbf714a1d1bcc5e Author: Bjoern A. Zeeb AuthorDate: 2023-10-26 00:11:43 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:03 + LinuxKPI: 802.11: fix ieee80211_add_channel_cbw() argument Fix the last argument passed to ieee80211_add_channel_cbw() in lkpi_ic_getradiocaps() for both 2Ghz and 5Ghz bands. We passed in the unmodified version rather than the adjusted version based on the per-band channel information possibly leaving ieee80211_channel_flags enabled which should not be. So far this should not have made a difference given we did not enable HT or VHT. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:cc Differential Revision: https://reviews.freebsd.org/D42424 --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 3da91fa3e0b7..aba7e0e961a6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3527,7 +3527,7 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, error = ieee80211_add_channel_cbw(c, maxchan, n, channels[i].hw_value, channels[i].center_freq, channels[i].max_power, - nflags, bands, chan_flags); + nflags, bands, cflags); /* net80211::ENOBUFS: *n >= maxchans */ if (error != 0 && error != ENOBUFS) ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x " @@ -3597,7 +3597,7 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, error = ieee80211_add_channel_cbw(c, maxchan, n, channels[i].hw_value, channels[i].center_freq, channels[i].max_power, - nflags, bands, chan_flags); + nflags, bands, cflags); /* net80211::ENOBUFS: *n >= maxchans */ if (error != 0 && error != ENOBUFS) ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x "
git: 78ca45df3105 - main - LinuxKPI: 802.11: deal with scan_ie_len
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=78ca45df310563ca46448a124674e0542aab2e31 commit 78ca45df310563ca46448a124674e0542aab2e31 Author: Bjoern A. Zeeb AuthorDate: 2023-10-27 20:41:43 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:03 + LinuxKPI: 802.11: deal with scan_ie_len We only need to reserve the extra space for DSSS if NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES is set, so add the conditional. Also add checks in case scan_ie_len will grow beyond the maximum. Given this is currently unlikely, leave the cleanup for later as some other restructuring should be done first. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:cc Differential Revision: https://reviews.freebsd.org/D42425 --- sys/compat/linuxkpi/common/src/linux_80211.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index aba7e0e961a6..ffda3c5693cd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3919,20 +3919,30 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) lhw->scan_ie_len = 2 + IEEE80211_RATE_SIZE; if (lhw->max_rates > IEEE80211_RATE_SIZE) lhw->scan_ie_len += 2 + (lhw->max_rates - IEEE80211_RATE_SIZE); - /* -* net80211 does not seem to support the DSSS Parameter Set but some of -* the drivers insert it so calculate the extra fixed space in. -*/ - lhw->scan_ie_len += 2 + 1; + + if (hw->wiphy->features & NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES) { + /* +* net80211 does not seem to support the DSSS Parameter Set but +* some of the drivers insert it so calculate the extra fixed +* space in. +*/ + lhw->scan_ie_len += 2 + 1; + } /* Reduce the max_scan_ie_len "left" by the amount we consume already. */ - if (hw->wiphy->max_scan_ie_len > 0) + if (hw->wiphy->max_scan_ie_len > 0) { + if (lhw->scan_ie_len > hw->wiphy->max_scan_ie_len) + goto err; hw->wiphy->max_scan_ie_len -= lhw->scan_ie_len; + } if (bootverbose) ieee80211_announce(ic); return (0); +err: + IMPROVE("TODO FIXME CLEANUP"); + return (-EAGAIN); } void
git: 8895b47638ea - main - LinuxKPI: 802.11: zero-pad debug flags
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8895b47638ea4d7a13fba97afe8cd9faacfdda83 commit 8895b47638ea4d7a13fba97afe8cd9faacfdda83 Author: Bjoern A. Zeeb AuthorDate: 2023-10-28 18:43:43 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:03 + LinuxKPI: 802.11: zero-pad debug flags Write the debug flags as full 32bit hex numbers to have a better view on them. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:cc, emaste Differential Revision: https://reviews.freebsd.org/D42426 --- sys/compat/linuxkpi/common/src/linux_80211.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 93c1e2873206..74dc3c9f9dee 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -45,23 +45,23 @@ /* #define LINUXKPI_DEBUG_80211 */ #ifndefD80211_TODO -#defineD80211_TODO 0x1 +#defineD80211_TODO 0x0001 #endif #ifndef D80211_IMPROVE -#defineD80211_IMPROVE 0x2 +#defineD80211_IMPROVE 0x0002 #endif -#defineD80211_IMPROVE_TXQ 0x4 -#defineD80211_TRACE0x10 -#defineD80211_TRACEOK 0x20 -#defineD80211_TRACE_TX 0x100 -#defineD80211_TRACE_TX_DUMP0x200 -#defineD80211_TRACE_RX 0x1000 -#defineD80211_TRACE_RX_DUMP0x2000 -#defineD80211_TRACE_RX_BEACONS 0x4000 +#defineD80211_IMPROVE_TXQ 0x0004 +#defineD80211_TRACE0x0010 +#defineD80211_TRACEOK 0x0020 +#defineD80211_TRACE_TX 0x0100 +#defineD80211_TRACE_TX_DUMP0x0200 +#defineD80211_TRACE_RX 0x1000 +#defineD80211_TRACE_RX_DUMP0x2000 +#defineD80211_TRACE_RX_BEACONS 0x4000 #defineD80211_TRACEX (D80211_TRACE_TX|D80211_TRACE_RX) #defineD80211_TRACEX_DUMP (D80211_TRACE_TX_DUMP|D80211_TRACE_RX_DUMP) -#defineD80211_TRACE_STA0x1 -#defineD80211_TRACE_MO 0x10 +#defineD80211_TRACE_STA0x0001 +#defineD80211_TRACE_MO 0x0010 #defineIMPROVE_TXQ(...) \ if (linuxkpi_debug_80211 & D80211_IMPROVE_TXQ) \
git: ef48d4fa122d - main - net80211: rename iv_flags_vht to iv_vht_flags
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ef48d4fa122d863db11e41608ceea641eec54704 commit ef48d4fa122d863db11e41608ceea641eec54704 Author: Bjoern A. Zeeb AuthorDate: 2023-10-27 18:18:24 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:04 + net80211: rename iv_flags_vht to iv_vht_flags While the flag field is internal start naming it as well as "iv_vht*" so we keep all "VHT" fields together. This breaks with what was done done for HT but with HE, EHT, .. coming one day seems the more logic choice. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:adrian, cc Differential Revision: https://reviews.freebsd.org/D42419 --- sys/net80211/ieee80211.c | 6 +++--- sys/net80211/ieee80211_ht.c | 12 ++-- sys/net80211/ieee80211_ioctl.c| 2 +- sys/net80211/ieee80211_node.c | 6 +++--- sys/net80211/ieee80211_output.c | 6 +++--- sys/net80211/ieee80211_scan_sta.c | 8 sys/net80211/ieee80211_sta.c | 4 ++-- sys/net80211/ieee80211_var.h | 2 +- sys/net80211/ieee80211_vht.c | 10 +- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 6584e0b6e027..41b743c988f4 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -939,7 +939,7 @@ ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag) bit = 0; TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) - if (vap->iv_flags_vht & flag) { + if (vap->iv_vht_flags & flag) { bit = 1; break; } @@ -957,9 +957,9 @@ ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag) IEEE80211_LOCK(ic); if (flag < 0) { flag = -flag; - vap->iv_flags_vht &= ~flag; + vap->iv_vht_flags &= ~flag; } else - vap->iv_flags_vht |= flag; + vap->iv_vht_flags |= flag; ieee80211_syncflag_vht_locked(ic, flag); IEEE80211_UNLOCK(ic); } diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 0e5a4df04305..34d330f0dd09 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1935,12 +1935,12 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) uint32_t vhtflags = 0; vhtflags = 0; - if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_flags_vht & IEEE80211_FVHT_VHT) { + if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_vht_flags & IEEE80211_FVHT_VHT) { if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && - (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160)) { + (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160)) { vhtflags = IEEE80211_CHAN_VHT160; /* Mirror the HT40 flags */ if (htflags == IEEE80211_CHAN_HT40U) { @@ -1952,7 +1952,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) /* XXX 2 means "160MHz and 80+80MHz" */ (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && - (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80)) { + (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80)) { vhtflags = IEEE80211_CHAN_VHT80P80; /* Mirror the HT40 flags */ if (htflags == IEEE80211_CHAN_HT40U) { @@ -1961,7 +1961,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) vhtflags |= IEEE80211_CHAN_HT40D; } } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80MHZ) && - (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80)) { + (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80)) { vhtflags = IEEE80211_CHAN_VHT80; /* Mirror the HT40 flags */ if (htflags == IEEE80211_CHAN_HT40U) { @@ -1979,11 +1979,11 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) * 'ht40' as that flag. */ if ((htflags == IEEE80211_CHAN_HT40U) && - (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT40)) { + (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT40)) { vhtflags = IEEE80211_CHAN_VHT40U
git: fbba0d6b6364 - main - net80211: combine iv_vhtcaps and iv_vht_mcsinfo
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fbba0d6b636492505dc5878b9ed2c1bbdcd88b91 commit fbba0d6b636492505dc5878b9ed2c1bbdcd88b91 Author: Bjoern A. Zeeb AuthorDate: 2023-10-27 18:33:22 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:04 + net80211: combine iv_vhtcaps and iv_vht_mcsinfo The iv_vhtcaps and iv_vht_mcsinfo fields together form struct ieee80211_vht_cap so combine them into one field in the VAP and keep the information together. While the structure layout changes no other functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:adrian, cc Differential Revision: https://reviews.freebsd.org/D42420 --- sys/net80211/ieee80211.c | 2 +- sys/net80211/ieee80211_ddb.c | 2 +- sys/net80211/ieee80211_ht.c | 4 ++-- sys/net80211/ieee80211_var.h | 3 +-- sys/net80211/ieee80211_vht.c | 50 ++-- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 41b743c988f4..dcd61e8de43a 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -553,7 +553,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap, vap->iv_htextcaps = ic->ic_htextcaps; /* 11ac capabilities - XXX methodize */ - vap->iv_vhtcaps = ic->ic_vhtcaps; + vap->iv_vht_cap.vht_cap_info = ic->ic_vhtcaps; vap->iv_vhtextcaps = ic->ic_vhtextcaps; vap->iv_opmode = opmode; diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index e4a09a58049b..e3f70fbe3f29 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -490,7 +490,7 @@ _db_show_vap(const struct ieee80211vap *vap, int showmesh, int showprocs) db_printf("\tflags_ven=%b\n", vap->iv_flags_ven, IEEE80211_FVEN_BITS); db_printf("\tcaps=%b\n", vap->iv_caps, IEEE80211_C_BITS); db_printf("\thtcaps=%b\n", vap->iv_htcaps, IEEE80211_C_HTCAP_BITS); - db_printf("\tvhtcaps=%b\n", vap->iv_vhtcaps, IEEE80211_VHTCAP_BITS); + db_printf("\tvhtcap=%b\n", vap->iv_vht_cap.vht_cap_info, IEEE80211_VHTCAP_BITS); _db_show_stats(&vap->iv_stats); diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 34d330f0dd09..61c57b87c5d7 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1938,7 +1938,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_vht_flags & IEEE80211_FVHT_VHT) { if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ - (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160)) { vhtflags = IEEE80211_CHAN_VHT160; @@ -1950,7 +1950,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) } } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80P80MHZ) && /* XXX 2 means "160MHz and 80+80MHz" */ - (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80)) { vhtflags = IEEE80211_CHAN_VHT80P80; diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 1208a8b3ab4e..08812c5eb27c 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -424,9 +424,8 @@ struct ieee80211vap { /* VHT flags */ uint32_tiv_vht_flags; /* VHT state flags */ - uint32_tiv_vhtcaps; /* VHT capabilities */ + struct ieee80211_vht_cap iv_vht_cap;/* VHT capabilities + MCS info */ uint32_tiv_vhtextcaps; /* VHT extended capabilities (TODO) */ - struct ieee80211_vht_mcs_info iv_vht_mcsinfo; uint32_tiv_vht_spare[4]; int iv_des_nssid; /* # desired ssids */ diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 9f8b104db10c..49d5fa18b448 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -144,7 +144,7 @@ ieee80211_vht_vattach(struct ieee80211vap *vap) if (! IEEE80211_CONF_VHT(ic)) return; - vap->iv_vhtcaps = ic->ic_vhtcaps; + vap->iv_vht_cap.vht_cap_info = ic->ic_vhtcaps; vap->iv_vhtextcaps = ic->ic_vhtextcaps; /* XXX assu
git: 562adbe1d354 - main - net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=562adbe1d354377a260e66eedb6072b720a606dc commit 562adbe1d354377a260e66eedb6072b720a606dc Author: Bjoern A. Zeeb AuthorDate: 2023-10-27 18:44:02 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:04 + net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht Like for the VAP rename ic_flags_vht to ic_vht_flags for consistency to keep "VHT" fields together and merge ic_vhtcaps and ic_vht_mcsinfo into struct ieee80211_vht_cap ic_vht_cap. While the structure layout changes no other functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:adrian, cc Differential Revision: https://reviews.freebsd.org/D42421 --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 +++--- sys/net80211/ieee80211.c | 6 +++--- sys/net80211/ieee80211_ddb.c | 2 +- sys/net80211/ieee80211_ioctl.c | 2 +- sys/net80211/ieee80211_node.c| 2 +- sys/net80211/ieee80211_regdomain.c | 4 ++-- sys/net80211/ieee80211_var.h | 5 ++--- sys/net80211/ieee80211_vht.c | 14 +++--- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ffda3c5693cd..42fb7a60ce57 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3556,16 +3556,16 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, if (hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.vht_supported){ ic->ic_flags_ext |= IEEE80211_FEXT_VHT; - ic->ic_vhtcaps = + ic->ic_vht_cap.vht_cap_info = hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap; setbit(bands, IEEE80211_MODE_VHT_5GHZ); chan_flags |= NET80211_CBW_FLAG_VHT80; if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ( - ic->ic_vhtcaps)) + ic->ic_vht_cap.vht_cap_info)) chan_flags |= NET80211_CBW_FLAG_VHT160; if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( - ic->ic_vhtcaps)) + ic->ic_vht_cap.vht_cap_info)) chan_flags |= NET80211_CBW_FLAG_VHT80P80; } #endif diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index dcd61e8de43a..3809b7e6596c 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -553,7 +553,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap, vap->iv_htextcaps = ic->ic_htextcaps; /* 11ac capabilities - XXX methodize */ - vap->iv_vht_cap.vht_cap_info = ic->ic_vhtcaps; + vap->iv_vht_cap.vht_cap_info = ic->ic_vht_cap.vht_cap_info; vap->iv_vhtextcaps = ic->ic_vhtextcaps; vap->iv_opmode = opmode; @@ -944,9 +944,9 @@ ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag) break; } if (bit) - ic->ic_flags_vht |= flag; + ic->ic_vht_flags |= flag; else - ic->ic_flags_vht &= ~flag; + ic->ic_vht_flags &= ~flag; } void diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index e3f70fbe3f29..cd4a4f191745 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -672,7 +672,7 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, db_printf("\tcryptocaps=%b\n", ic->ic_cryptocaps, IEEE80211_CRYPTO_BITS); db_printf("\thtcaps=%b\n", ic->ic_htcaps, IEEE80211_HTCAP_BITS); - db_printf("\tvhtcaps=%b\n", ic->ic_vhtcaps, IEEE80211_VHTCAP_BITS); + db_printf("\tvhtcaps=%b\n", ic->ic_vht_cap.vht_cap_info, IEEE80211_VHTCAP_BITS); #if 0 uint8_t ic_modecaps[2]; /* set of mode capabilities */ diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index d3e4bd1ca561..170cdc416276 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -711,7 +711,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, dc->dc_drivercaps = ic->ic_caps; dc->dc_cryptocaps = ic->ic_cryptocaps; dc->dc_htcaps = ic->ic_htcaps; - dc->dc_vhtcaps = ic->ic_vhtcaps; + dc->dc_vhtcaps = ic->ic_vht_cap.vht_cap_info; ci = &dc->dc_chaninfo; ic->ic_getradiocaps(ic, maxchans, &ci->ic_nchans, ci->ic_chans); KASSERT(ci->ic_nchans <= maxchans, diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 60230fcec1c5..f277293ceb14 100644 --- a
git: 6c3ae01cc75a - main - net80211: add ieee80211_add_vhtcap_ch()
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c3ae01cc75afdd575f54289b2879a7c98d55bf6 commit 6c3ae01cc75afdd575f54289b2879a7c98d55bf6 Author: Bjoern A. Zeeb AuthorDate: 2023-10-26 20:55:59 + Commit: Bjoern A. Zeeb CommitDate: 2023-11-03 21:08:04 + net80211: add ieee80211_add_vhtcap_ch() Add an implementation of ieee80211_add_vhtcap() which works based on information derived from the vap (and possibly channel/band but we do not support that yet in net80211). This is needed for scans request information in LinuxKPI at times before we have a BSS. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by:adrian, cc Differential Revision: https://reviews.freebsd.org/D42422 --- sys/net80211/ieee80211_vht.c | 27 +++ sys/net80211/ieee80211_vht.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index 50f5a6b17656..1561255be101 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -707,6 +707,33 @@ ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *ni) return (frm); } +/* + * Non-associated probe requests. Add VHT capabilities based on + * the current channel configuration. No BSS yet. + */ +uint8_t * +ieee80211_add_vhtcap_ch(uint8_t *frm, struct ieee80211vap *vap, +struct ieee80211_channel *c) +{ + struct ieee80211_vht_cap *vhtcap; + + memset(frm, 0, 2 + sizeof(*vhtcap)); + frm[0] = IEEE80211_ELEMID_VHT_CAP; + frm[1] = sizeof(*vhtcap); + frm += 2; + + /* 32-bit VHT capability */ + ADDWORD(frm, vap->iv_vht_cap.vht_cap_info); + + /* supp_mcs */ + ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.rx_mcs_map); + ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.rx_highest); + ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.tx_mcs_map); + ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.tx_highest); + + return (frm); +} + static uint8_t ieee80211_vht_get_chwidth_ie(struct ieee80211_channel *c) { diff --git a/sys/net80211/ieee80211_vht.h b/sys/net80211/ieee80211_vht.h index a3830ae13ba7..756c2e367485 100644 --- a/sys/net80211/ieee80211_vht.h +++ b/sys/net80211/ieee80211_vht.h @@ -50,6 +50,8 @@ void ieee80211_vht_node_leave(struct ieee80211_node *ni); uint8_t * ieee80211_add_vhtcap(uint8_t *frm, struct ieee80211_node *); uint8_t * ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *); +uint8_t *ieee80211_add_vhtcap_ch(uint8_t *, struct ieee80211vap *, +struct ieee80211_channel *); void ieee80211_vht_update_cap(struct ieee80211_node *, const uint8_t *, const uint8_t *);
git: 98fd69f0090d - main - rtld/arm: fix initial-exec (IE) thread-local storage relocation
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=98fd69f0090da73d9d0451bd769d7752468284c6 commit 98fd69f0090da73d9d0451bd769d7752468284c6 Author: R. Christian McDonald AuthorDate: 2023-11-03 12:56:58 + Commit: Kristof Provost CommitDate: 2023-11-03 21:43:40 + rtld/arm: fix initial-exec (IE) thread-local storage relocation net/frr[89] revealed an interesting edge-case on arm when dynamically linking a shared library that declares more than one static TLS variable with at least one using the "initial-exec" TLS model. In the case of frr[89], this library was libfrr.so which essentially does the following: #include #include "lib.h" static __thread int *a __attribute__((tls_model("initial-exec"))); void lib_test() { static __thread int b = -1; printf("&a = %p\n", &a); printf(" a = %p\n", a); printf("\n"); printf("&b = %p\n", &b); printf(" b = %d\n", b); } Allocates a file scoped `static __thread` pointer with tls_model("initial-exec") and later a block scoped TLS int. Notice in the above minimal reproducer, `b == -1`. The relocation process does the wrong thing and ends up pointing both `a` and `b` at the same place in memory. The output of the above in the broken state is: &a = 0x4009c018 a = 0x &b = 0x4009c018 b = -1 With the patch applied, the output becomes: &a = 0x4009c01c a = 0x0 &b = 0x4009c018 b = -1 Reviewed by:kib Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42415/ --- libexec/rtld-elf/arm/reloc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index c3e95940be74..6efc9f499761 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -280,10 +280,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; - if (__predict_true(RELOC_ALIGNED_P(where))) + if (__predict_true(RELOC_ALIGNED_P(where))) { + tmp += *where; *where = tmp; - else + } else { + tmp += load_ptr(where); store_ptr(where, tmp); + } dbg("TLS_TPOFF32 %s in %s --> %p", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)tmp);
git: b0203aaa46fb - main - committers-src: Add Jake Freeland
The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=b0203aaa46fbf2a77cbce034b8b7928401649aa8 commit b0203aaa46fbf2a77cbce034b8b7928401649aa8 Author: Jake Freeland AuthorDate: 2023-11-03 16:14:21 + Commit: Jake Freeland CommitDate: 2023-11-04 00:04:17 + committers-src: Add Jake Freeland Add myself to the active src committers list and document my mentor/mentee relationships. --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index fb2ff44b06d2..00e61605f451 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -212,6 +212,7 @@ jch [label="Julien Charbon\n...@freebsd.org\n2014/09/24"] jchandra [label="Jayachandran C.\njchan...@freebsd.org\n2010/05/19"] jeb [label="Jeb Cramer\n...@freebsd.org\n2018/01/25"] jeff [label="Jeff Roberson\nj...@freebsd.org\n2002/02/21"] +jfree [label="Jake Freeland\njf...@freebsd.org\n2023/11/03"] jh [label="Jaakko Heinonen\n...@freebsd.org\n2009/10/02"] jhb [label="John Baldwin\n...@freebsd.org\n1999/08/23"] jhibbits [label="Justin Hibbits\njhibb...@freebsd.org\n2011/11/30"] @@ -590,6 +591,7 @@ imp -> chuck imp -> dmlb imp -> emax imp -> furuta +imp -> jfree imp -> joe imp -> johalun imp -> jon @@ -742,6 +744,7 @@ marcel -> sjg markj -> cem markj -> christos markj -> dougm +markj -> jfree markj -> lwhsu markj -> mhorne markj -> rlibby
git: c3ca5da36ebe - stable/14 - file_test: Fix file test
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c3ca5da36ebee7efb6ba38cec72f57127e302ada commit c3ca5da36ebee7efb6ba38cec72f57127e302ada Author: Jose Luis Duran AuthorDate: 2023-10-07 12:47:29 + Commit: Ed Maste CommitDate: 2023-11-04 03:05:19 + file_test: Fix file test Trimming of the line feed is no longer necessary after https://github.com/file/file/commit/d993c6b0db20711b2c4cb9d2bee8c7f2e59b0a43 Currently the tests: - bcachefs2 - gpkg-1-zst - multiple are failing, but a fix will be committed upstream. This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n." MFC after: 3 days (cherry picked from commit 0d3a87569f14b0e48826bbaab5e05f35669bcebf) --- contrib/file/tests/gpkg-1-zst.result | 2 +- usr.bin/file/tests/file_test.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/file/tests/gpkg-1-zst.result b/contrib/file/tests/gpkg-1-zst.result index 10379834d4b1..e99149450b1a 100644 --- a/contrib/file/tests/gpkg-1-zst.result +++ b/contrib/file/tests/gpkg-1-zst.result @@ -1 +1 @@ -Gentoo GLEP 78 (GPKG) binary package for "inkscape-1.2.1-r2-1" using zstd compression \ No newline at end of file +Gentoo GLEP 78 (GPKG) binary package for "inkscape-1.2.1-r2-1" using zstd compression diff --git a/usr.bin/file/tests/file_test.sh b/usr.bin/file/tests/file_test.sh index e6e398f6e51d..02d494b0f643 100644 --- a/usr.bin/file/tests/file_test.sh +++ b/usr.bin/file/tests/file_test.sh @@ -40,8 +40,7 @@ contrib_file_tests_body() { # The result files were created in UTC. TZ=Z atf_check -o save:actual_output file ${file_args} \ --brief "$testfile" - atf_check -o save:trimmed_output tr -d '\012' < actual_output - atf_check cmp trimmed_output "$result_file" + atf_check cmp actual_output "$result_file" done }
git: 660be17a01ff - stable/14 - file: Support testing multiple magic files.
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=660be17a01ffdfa9494ff6039b7b6ddd82e61e65 commit 660be17a01ffdfa9494ff6039b7b6ddd82e61e65 Author: Xin LI AuthorDate: 2023-10-09 06:06:20 + Commit: Ed Maste CommitDate: 2023-11-04 03:05:19 + file: Support testing multiple magic files. This is based on upstream b74150490be904801378b2712fe0d532e1700124 but adapted to ATF. Reviewed by: jldu...@gmail.com, markj, vangyzen Differential Revision: https://reviews.freebsd.org/D42129 (cherry picked from commit 8f75390c66bdcde95e1b383aecaa27b4adf88279) --- usr.bin/file/tests/Makefile | 2 +- usr.bin/file/tests/file_test.sh | 22 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/usr.bin/file/tests/Makefile b/usr.bin/file/tests/Makefile index ea0ebaa12ce2..cd3d00ae742c 100644 --- a/usr.bin/file/tests/Makefile +++ b/usr.bin/file/tests/Makefile @@ -2,7 +2,7 @@ PACKAGE=tests ATF_TESTS_SH= file_test SRCDIR=${SRCTOP}/contrib/file/tests -_files!= echo ${SRCDIR}/*.testfile ${SRCDIR}/*.result ${SRCDIR}/*.magic +_files!= echo ${SRCDIR}/*.testfile ${SRCDIR}/*.flags ${SRCDIR}/*.result ${SRCDIR}/*.magic ${PACKAGE}FILES+=${_files} .include diff --git a/usr.bin/file/tests/file_test.sh b/usr.bin/file/tests/file_test.sh index 02d494b0f643..490274c05892 100644 --- a/usr.bin/file/tests/file_test.sh +++ b/usr.bin/file/tests/file_test.sh @@ -32,14 +32,26 @@ contrib_file_tests_body() { for testfile in "${srcdir}"/*.testfile; do test_name="${testfile%.testfile}" result_file="${test_name}.result" - magic_file="${test_name}.magic" file_args= - if [ -e "${magic_file}" ]; then - file_args="${file_args} --magic-file ${magic_file}" + magic_files= + for magic_file in ${test_name}*.magic; do + if [ -f "${magic_file}" ]; then + if [ -z "${magic_files}" ]; then + magic_files="${magic_file}" + else + magic_files="${magic_files}:${magic_file}" + fi + fi + done + if [ -z "${magic_files}" ]; then + magic_files=/usr/share/misc/magic + fi + if [ -f "${test_name}.flags" ]; then + file_args="${file_args} -$(cat "${test_name}.flags")" fi # The result files were created in UTC. - TZ=Z atf_check -o save:actual_output file ${file_args} \ - --brief "$testfile" + atf_check -o save:actual_output -e ignore env TZ=Z MAGIC="${magic_files}" \ + file ${file_args} --brief "$testfile" atf_check cmp actual_output "$result_file" done }
git: 687bf7433c3d - stable/14 - (upstream) PR/386: Add newlines for consitency 2
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=687bf7433c3d585ae4826c2713ab182f46e7bdf3 commit 687bf7433c3d585ae4826c2713ab182f46e7bdf3 Author: Jose Luis Duran AuthorDate: 2023-10-09 04:52:53 + Commit: Ed Maste CommitDate: 2023-11-04 03:28:32 + (upstream) PR/386: Add newlines for consitency 2 Obtained from: https://github.com/file/file/pull/134/ (cherry picked from commit 3347078000c078f2e67214ef1ba2e0bffe1aea4f) --- contrib/file/tests/bcachefs2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/file/tests/bcachefs2.result b/contrib/file/tests/bcachefs2.result index 9ebf64bb55bc..30fe8e8910d2 100644 --- a/contrib/file/tests/bcachefs2.result +++ b/contrib/file/tests/bcachefs2.result @@ -1 +1 @@ -bcachefs, UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1, label "Label", version 26, min version 26, device 0/UUID=0a3643b7-c515-47f8-a0ea-91fc38d043d1, 1 devices (unclean) \ No newline at end of file +bcachefs, UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1, label "Label", version 26, min version 26, device 0/UUID=0a3643b7-c515-47f8-a0ea-91fc38d043d1, 1 devices (unclean)