Changes of Revision 25

broadcom-wl.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Fri Apr 18 07:36:47 UTC 2025 - Stephan Hemeier <Sauerlandlinux@gmx.de>
4
+
5
+- Add broadcom-wl.linux-6.15.patch 
6
+
7
+-------------------------------------------------------------------
8
 Sat Feb  8 21:15:37 UTC 2025 - Stephan Hemeier <Sauerlandlinux@gmx.de>
9
 
10
 - Add broadcom-wl.linux-6.14.patch
11
broadcom-wl.spec Changed
9
 
1
@@ -63,6 +63,7 @@
2
 Patch26:        broadcom-wl.linux-6.12.patch
3
 Patch27:        broadcom-wl.linux-6.13.patch
4
 Patch28:        broadcom-wl.linux-6.14.patch
5
+Patch29:        broadcom-wl.linux-6.15.patch
6
 
7
 %if %{defined kernel_module_package_buildreqs}
8
 BuildRequires:  %{kernel_module_package_buildreqs}
9
broadcom-wl.linux-6.15.patch Added
137
 
1
@@ -0,0 +1,135 @@
2
+From a0acb522ad849b2e2a3019794a293fdeb717ba03 Mon Sep 17 00:00:00 2001
3
+From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
4
+Date: Sun, 23 Feb 2025 14:29:21 +0000
5
+Subject: PATCH Tentative patch for broadcom-wl 6.30.223.271 driver for Linux
6
+ 6.15-rc1
7
+
8
+Due to the fact that the driver is unmaintained, and can't be adapted
9
+to the current Linux kernel security standards (e.g. IBT), as it has a
10
+proprietary blob; and this is likely to be an ever-growing security
11
+risk, I have added a warning when the module is loaded.
12
+Use at your own risk; no warranty of any kind is provided.
13
+See also the objtool changes on the Makefile below.
14
+
15
+The changes to replace EXTRA_CFLAGS and EXTRA_LDFLAGS with ccflags-y
16
+and ldflags-y are rel. commit "kbuild: remove EXTRA_*FLAGS support"
17
+(Masahiro Yamada, 6 Feb 2025), according to which they have been
18
+deprecated since 2007, so no need to add any fallback for old kernels.
19
+
20
+NB: If the package build also contains references to EXTRA_*FLAGS
21
+(e.g. Arch Linux's broadcom-wl-dkms PKGBUILD), replace those as well!
22
+---
23
+ Makefile              | 33 ++++++++++++++++++++++++---------
24
+ src/wl/sys/wl_linux.c | 11 +++++++++++
25
+ 2 files changed, 35 insertions(+), 9 deletions(-)
26
+
27
+diff --git a/Makefile b/Makefile
28
+index a323a0d..3cca0ca 100644
29
+--- a/Makefile
30
++++ b/Makefile
31
+@@ -117,15 +117,15 @@ GCCVERSION := $(subst $(space),$(empty),$(GCCVERSION))
32
+ GCCVERSION := $(shell expr `echo $(GCCVERSION)` | cut -b1-3)
33
+ GE_49 := $(shell expr `echo $(GCCVERSION)` \>= 490)
34
+ 
35
+-EXTRA_CFLAGS :=
36
++ccflags-y :=
37
+ 
38
+ ifeq ($(APIFINAL),CFG80211)
39
+-  EXTRA_CFLAGS += -DUSE_CFG80211
40
++  ccflags-y += -DUSE_CFG80211
41
+   $(info Using CFG80211 API)
42
+ endif
43
+ 
44
+ ifeq ($(APIFINAL),WEXT)
45
+-  EXTRA_CFLAGS += -DUSE_IW
46
++  ccflags-y += -DUSE_IW
47
+   $(info Using Wireless Extension API)
48
+ endif
49
+ 
50
+@@ -137,17 +137,17 @@ wl-objs            += src/wl/sys/wl_linux.o
51
+ wl-objs            += src/wl/sys/wl_iw.o
52
+ wl-objs            += src/wl/sys/wl_cfg80211_hybrid.o
53
+ 
54
+-EXTRA_CFLAGS       += -I$(src)/src/include -I$(src)/src/common/include
55
+-EXTRA_CFLAGS       += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/ppr/include
56
+-EXTRA_CFLAGS       += -I$(src)/src/shared/bcmwifi/include
57
+-#EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
58
++ccflags-y          += -I$(src)/src/include -I$(src)/src/common/include
59
++ccflags-y          += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/ppr/include
60
++ccflags-y          += -I$(src)/src/shared/bcmwifi/include
61
++#ccflags-y          += -DBCMDBG_ASSERT -DBCMDBG_ERR
62
+ ifeq "$(GE_49)" "1"
63
+-EXTRA_CFLAGS       += -Wno-date-time
64
++ccflags-y          += -Wno-date-time
65
+ endif
66
+ 
67
+-EXTRA_CFLAGS       += -Wno-date-time
68
++ccflags-y          += -Wno-date-time
69
+
70
+-EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
71
++ldflags-y          := $(src)/lib/wlc_hybrid.o_shipped
72
+ 
73
+ KBASE              ?= /lib/modules/${KV_FULL}
74
+ KBUILD_DIR         ?= $(KBASE)/build
75
+@@ -155,6 +155,21 @@ MDEST_DIR          ?= $(KBASE)/kernel/drivers/net/wireless
76
+ CROSS_TOOLS        = /path/to/tools
77
+ CROSS_KBUILD_DIR   = /path/to/kernel/tree
78
+ 
79
++# Rel. commit "objtool: Always fail on fatal errors" (Josh Poimboeuf, 31 Mar 2025)
80
++# This is a *ugly* hack to disable objtool during the final processing of wl.o.
81
++# Since is embeds the proprietary blob (wlc_hybrid.o_shipped), objtool can't
82
++# process it, as it does not follow the requirements of current kernels,
83
++# including support for critical security features. As of Linux v6.15+, it causes
84
++# a build error. Disable it, at your own risk. Note the MIT license applies:
85
++# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88
++# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
89
++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90
++# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
91
++# SOFTWARE.
92
++wl.o: override objtool-enabled =
93
++
94
+ all:
95
+   KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`
96
+ 
97
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
98
+index 5ddbc4d..09a4af5 100644
99
+--- a/src/wl/sys/wl_linux.c
100
++++ b/src/wl/sys/wl_linux.c
101
+@@ -168,6 +168,8 @@ static int wl_set_radio_block(void *data, bool blocked);
102
+ static void wl_report_radio_state(wl_info_t *wl);
103
+ #endif
104
+ 
105
++// Rel. commit "modpost: require a MODULE_DESCRIPTION()" (Jeff Johnson, 11 Mar 2025)
106
++MODULE_DESCRIPTION("Broadcom-wl wireless driver unmaintained, out-of-tree");
107
+ MODULE_LICENSE("MIXED/Proprietary");
108
+ 
109
+ static struct pci_device_id wl_id_table =
110
+@@ -914,6 +916,10 @@ static struct pci_driver wl_pci_driver __refdata = {
111
+ static int __init
112
+ wl_module_init(void)
113
+ {
114
++  printk(KERN_WARNING "You are using the broadcom-wl driver, which is not "
115
++      "maintained and is incompatible with Linux kernel security mitigations. "
116
++      "It is heavily recommended to replace the hardware and remove the driver. "
117
++      "Proceed at your own risk!");
118
+   int error = -ENODEV;
119
+ 
120
+ #ifdef BCMDBG
121
+@@ -2457,7 +2463,12 @@ wl_del_timer(wl_info_t *wl, wl_timer_t *t)
122
+   ASSERT(t);
123
+   if (t->set) {
124
+       t->set = FALSE;
125
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
126
++      // Rel. commit "treewide: Switch/rename to timer_delete_sync()" (Thomas Gleixner, 5 Apr 2025)
127
++      if (!timer_delete(&t->timer)) {
128
++#else
129
+       if (!del_timer(&t->timer)) {
130
++#endif
131
+ #ifdef BCMDBG
132
+           WL_INFORM(("wl%d: Failed to delete timer %s\n", wl->unit, t->name));
133
+ #endif
134
+-- 
135
+2.49.0
136
+
137