From ddbc4864f12a02b7739756bf7ef2426b40e9ae67 Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 9 Feb 2024 12:50:10 +0000 Subject: [PATCH] Struct layout of qwx_softc should not depend on NBPFILTER. Due to a missing #include "bpfilter.h", the size of struct qwx_softc varied in different object files. This made the kernel crash on arm64. To make debugging core dumps and libkvm easier, kernel object layout should not depend on kernel config. Remove #if NBPFILTER > 0 from struct definition. problem analysis kettenis@ OK deraadt@ stsp@ --- sys/dev/ic/qwxvar.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/ic/qwxvar.h b/sys/dev/ic/qwxvar.h index 57bbd92428a..bd98ff7c044 100644 --- a/sys/dev/ic/qwxvar.h +++ b/sys/dev/ic/qwxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qwxvar.h,v 1.15 2024/02/09 09:55:17 stsp Exp $ */ +/* $OpenBSD: qwxvar.h,v 1.16 2024/02/09 12:50:10 bluhm Exp $ */ /* * Copyright (c) 2018-2019 The Linux Foundation. @@ -1773,7 +1773,6 @@ struct qwx_softc { struct qmi_wlanfw_request_mem_ind_msg_v01 *sc_req_mem_ind; -#if NBPFILTER > 0 caddr_t sc_drvbpf; union { @@ -1789,7 +1788,6 @@ struct qwx_softc { } sc_txtapu; #define sc_txtap sc_txtapu.th int sc_txtap_len; -#endif }; int qwx_ce_intr(void *); -- 2.20.1