From f3680bad8ee9a2dfac2a5d0372d4a0236fa5a1ae Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Thu, 15 Aug 2024 22:08:11 +0100 Subject: [PATCH] zfs: Detect purecap kernels via MACHINE_ABI not a list of MACHINE_ARCH The current list is missing aarch64cb, so zfs for purecap benchmark kernels is built with subobject bounds and thus panics with a bounds fault early in boot if used. Instead of updating the list to include aarch64cb, just check MACHINE_ABI, which is available here. --- sys/modules/zfs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index b2967c174231..dcae59156252 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -528,6 +528,6 @@ zfs-sha512-x86_64.o: sha512-x86_64.S ${CTFCONVERT_CMD} .endif -.if ${MACHINE_ARCH} == "aarch64c" || ${MACHINE_ARCH} == "riscv64c" +.if ${MACHINE_ABI:Mpurecap} CFLAGS+=-Xclang -cheri-bounds=conservative .endif