Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package broadcom-sta Hello, Version 6.30.223.248-3 fixes #770327 which has severity set to critical. It also includes minor doc change about supported hardware. Thanks, Cyril Lacoux. Here is the changelog entry: broadcom-sta (6.30.223.248-3) unstable; urgency=medium * Synced supported chipsets list with README.txt file (Closes: #762954). * Bumped standards version to 3.9.6 (No changes). * Added series of patches from Mickael MASSON <mmasson....@gmail.com> to fix system hang when activating monitor mode (Closes: #770327). -- Cyril Lacoux <clac...@easter-eggs.com> Sun, 07 Dec 2014 17:49:06 +0400 unblock broadcom-sta/6.30.223.248-3 -- System Information: Debian Release: 8.0 APT prefers unstable APT policy: (500, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
diff -Nru broadcom-sta-6.30.223.248/debian/changelog broadcom-sta-6.30.223.248/debian/changelog --- broadcom-sta-6.30.223.248/debian/changelog 2014-10-20 20:45:06.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/changelog 2014-12-07 18:07:56.000000000 +0400 @@ -1,3 +1,12 @@ +broadcom-sta (6.30.223.248-3) unstable; urgency=medium + + * Synced supported chipsets list with README.txt file (Closes: #762954). + * Bumped standards version to 3.9.6 (No changes). + * Added series of patches from Mickael MASSON <mmasson....@gmail.com> to + fix system hang when activating monitor mode (Closes: #770327). + + -- Cyril Lacoux <clac...@easter-eggs.com> Sun, 07 Dec 2014 17:49:06 +0400 + broadcom-sta (6.30.223.248-2) unstable; urgency=medium * Switched compression method from bz2 to xz. diff -Nru broadcom-sta-6.30.223.248/debian/control broadcom-sta-6.30.223.248/debian/control --- broadcom-sta-6.30.223.248/debian/control 2014-09-21 11:21:12.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/control 2014-10-28 11:15:47.000000000 +0400 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Cyril Lacoux <clac...@easter-eggs.com> Build-Depends: debhelper (>= 8), dkms -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: http://www.broadcom.com/support/802.11/linux_sta.php Package: broadcom-sta-common @@ -13,8 +13,8 @@ Description: Common files for the Broadcom STA Wireless driver Broadcom STA is a binary-only device driver to support the following IEEE 802.11a/b/g/n wireless network cards: BCM4311-, BCM4312-, BCM4313-, - BCM4321-, BCM4322-, BCM43224-, BCM43225-, BCM43227-, and BCM43228-based - hardware. + BCM4321-, BCM4322-, BCM43142-, BCM43224-, BCM43225-, BCM43227-, BCM43228-, + BCM4331-, BCM4360-, and BCM4352-based hardware. . This package contains the common files. @@ -28,8 +28,8 @@ Description: dkms source for the Broadcom STA Wireless driver Broadcom STA is a binary-only device driver to support the following IEEE 802.11a/b/g/n wireless network cards: BCM4311-, BCM4312-, BCM4313-, - BCM4314-, BCM4321-, BCM4322-, BCM43224-, BCM43225-, BCM43227-, BCM4352, and - BCM43228-based hardware. + BCM4321-, BCM4322-, BCM43142-, BCM43224-, BCM43225-, BCM43227-, BCM43228-, + BCM4331-, BCM4360-, and BCM4352-based hardware. . This package provides the source code for the wl kernel modules. The wireless-tools package is also required in order to make use of these modules. @@ -42,8 +42,8 @@ Description: Source for the Broadcom STA Wireless driver Broadcom STA is a binary-only device driver to support the following IEEE 802.11a/b/g/n wireless network cards: BCM4311-, BCM4312-, BCM4313-, - BCM4314-, BCM4321-, BCM4322-, BCM43224-, BCM43225-, BCM43227-, BCM4352, and - BCM43228-based hardware. + BCM4321-, BCM4322-, BCM43142-, BCM43224-, BCM43225-, BCM43227-, BCM43228-, + BCM4331-, BCM4360-, and BCM4352-based hardware. . This package provides the source code for the wl kernel modules. The wireless-tools package is also required in order to make use of these modules. diff -Nru broadcom-sta-6.30.223.248/debian/patches/07-fix_procfs_handling.patch broadcom-sta-6.30.223.248/debian/patches/07-fix_procfs_handling.patch --- broadcom-sta-6.30.223.248/debian/patches/07-fix_procfs_handling.patch 1970-01-01 04:00:00.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/patches/07-fix_procfs_handling.patch 2014-12-07 17:25:46.000000000 +0400 @@ -0,0 +1,145 @@ +Description: Fix kernel crash/system hang because of incorrect pointer + argument use while retrieving cookie in procfs handling. + . + based on: http://ix.io/9DV + tested on: kernel 3.14 +Author: Mickael MASSON <mmasson....@gmail.com> +Bug-Debian: https://bugs.debian.org/770327 + +Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c +=================================================================== +--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_linux.c 2014-12-07 17:23:06.437532026 +0400 ++++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c 2014-12-07 17:23:06.433532026 +0400 +@@ -3225,42 +3225,75 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + static int + wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data) ++{ ++ wl_info_t * wl = (wl_info_t *)data; + #else + static ssize_t +-wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data) +-#endif ++wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp) + { +- wl_info_t * wl = (wl_info_t *)data; +- int to_user; +- int len; ++ wl_info_t * wl = PDE_DATA(file_inode(filp)); ++#endif ++ int bcmerror, len; ++ int to_user = 0; ++ char tmp[8]; + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + if (offset > 0) { + *eof = 1; + return 0; + } ++#else ++ if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */ ++ return 0; /* 0 <=> EOF */ ++ } + #endif + +- if (!length) { +- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__)); +- return 0; +- } + WL_LOCK(wl); +- wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); +- len = sprintf(buffer, "%d\n", to_user); +- WL_UNLOCK(wl); +- return len; ++ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); ++ WL_UNLOCK(wl); ++ ++ if (bcmerror != BCME_OK) { ++ WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); ++ return -EIO; ++ } ++ ++ len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user); ++ tmp[ARRAY_SIZE(tmp) - 1] = '\0'; ++ if (len >= ARRAY_SIZE(tmp)) { ++ printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); ++ return -ERANGE; ++ } ++ else if (len < 0) { ++ printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); ++ return len; ++ } ++ if (length < len) { ++ printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length); ++ return -EMSGSIZE; ++ } ++ if (copy_to_user(buffer, tmp, len) != 0) { ++ printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__); ++ return -EFAULT; ++ } ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) ++ *offp += len; ++#endif ++ ++ return len; + } + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + static int + wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data) ++{ ++ wl_info_t * wl = (wl_info_t *)data; + #else + static ssize_t +-wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data) +-#endif ++wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp) + { +- wl_info_t * wl = (wl_info_t *)data; ++ wl_info_t * wl = PDE_DATA(file_inode(filp)); ++#endif + int from_user = 0; + int bcmerror; + +@@ -3271,7 +3304,11 @@ + } + if (copy_from_user(&from_user, buff, 1)) { + WL_ERROR(("%s: copy from user failed\n", __FUNCTION__)); +- return -EIO; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) ++ return -EIO; ++#else ++ return -EFAULT; ++#endif + } + + if (from_user >= 0x30) +@@ -3281,10 +3318,15 @@ + bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL); + WL_UNLOCK(wl); + +- if (bcmerror < 0) { ++ if (bcmerror != BCME_OK) { + WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); + return -EIO; + } ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */ ++ *offp += length; ++#endif ++ + return length; + } + +@@ -3305,8 +3347,8 @@ + if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { + WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); + #else +- if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) { +- WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp)); ++ if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) { ++ WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp)); + #endif + ASSERT(0); + return -1; diff -Nru broadcom-sta-6.30.223.248/debian/patches/08-enable_error_traces.patch broadcom-sta-6.30.223.248/debian/patches/08-enable_error_traces.patch --- broadcom-sta-6.30.223.248/debian/patches/08-enable_error_traces.patch 1970-01-01 04:00:00.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/patches/08-enable_error_traces.patch 2014-12-07 17:28:33.000000000 +0400 @@ -0,0 +1,81 @@ +Description: enable error + add some traces + . + tested on: kernel 3.14 +Author: Mickael MASSON <mmasson....@gmail.com> +Bug-Debian: https://bugs.debian.org/770327 + +Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_dbg.h +=================================================================== +--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_dbg.h 2014-12-07 17:28:28.393534724 +0400 ++++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_dbg.h 2014-12-07 17:28:28.389534724 +0400 +@@ -55,10 +55,12 @@ + + #define WL_NONE(args) + ++#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */ ++ + #ifdef BCMDBG_ERR + #define WL_ERROR(args) WL_PRINT(args) + #else +-#define WL_ERROR(args) ++#define WL_ERROR(args) FORCE_TRACE_LEVEL args + #endif + #define WL_TRACE(args) + #define WL_APSTA_UPDN(args) +Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c +=================================================================== +--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_linux.c 2014-12-07 17:28:28.393534724 +0400 ++++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c 2014-12-07 17:28:28.389534724 +0400 +@@ -1272,6 +1272,7 @@ + MFREE(wl->osh, wlif->dev, sizeof(struct net_device)); + #else + free_netdev(wlif->dev); ++ wlif->dev = NULL; + #endif + } + +@@ -2456,8 +2457,10 @@ + p80211msg_t *phdr; + + len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN; +- if ((skb = dev_alloc_skb(len)) == NULL) ++ if ((skb = dev_alloc_skb(len)) == NULL) { ++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); + return; ++ } + + skb_put(skb, len); + phdr = (p80211msg_t*)skb->data; +@@ -2536,8 +2539,10 @@ + rtap_len = sizeof(wl_radiotap_ht_brcm_2_t); + + len = rtap_len + (oskb->len - D11_PHY_HDR_LEN); +- if ((skb = dev_alloc_skb(len)) == NULL) ++ if ((skb = dev_alloc_skb(len)) == NULL) { ++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); + return; ++ } + + skb_put(skb, len); + +@@ -2665,8 +2670,10 @@ + len += amsdu_len; + } + +- if ((skb = dev_alloc_skb(len)) == NULL) ++ if ((skb = dev_alloc_skb(len)) == NULL) { ++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); + return; ++ } + + skb_put(skb, len); + +@@ -2991,7 +2998,7 @@ + } + + void +-wl_set_monitor(wl_info_t *wl, int val) ++wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */ + { + const char *devname; + wl_if_t *wlif; diff -Nru broadcom-sta-6.30.223.248/debian/patches/09-fix_system_hang_when_deleting_monitor.patch broadcom-sta-6.30.223.248/debian/patches/09-fix_system_hang_when_deleting_monitor.patch --- broadcom-sta-6.30.223.248/debian/patches/09-fix_system_hang_when_deleting_monitor.patch 1970-01-01 04:00:00.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/patches/09-fix_system_hang_when_deleting_monitor.patch 2014-12-07 17:30:29.000000000 +0400 @@ -0,0 +1,28 @@ +Description: Fix kernel crash/system hang when disabling monitor interface: + echo 0 > /proc/brcm_monitor0 + . + tested on: kernel 3.14 +Author: Mickael MASSON <mmasson....@gmail.com> +Bug-Debian: https://bugs.debian.org/770327 + +Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_cfg80211_hybrid.c +=================================================================== +--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_cfg80211_hybrid.c 2014-12-07 17:30:25.985535710 +0400 ++++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_cfg80211_hybrid.c 2014-12-07 17:30:25.981535710 +0400 +@@ -2633,7 +2633,15 @@ + + void wl_cfg80211_detach(struct net_device *ndev) + { +- struct wl_cfg80211_priv *wl = ndev_to_wl(ndev); ++ struct wl_cfg80211_priv *wl; ++ struct wireless_dev *wdev; ++ ++ wdev = ndev->ieee80211_ptr; ++ if (wdev == NULL) { ++ printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev); ++ return; ++ } ++ wl = ndev_to_wl(ndev); + + wl_deinit_cfg80211_priv(wl); + wl_free_wdev(wl); diff -Nru broadcom-sta-6.30.223.248/debian/patches/series broadcom-sta-6.30.223.248/debian/patches/series --- broadcom-sta-6.30.223.248/debian/patches/series 2014-10-20 09:58:33.000000000 +0400 +++ broadcom-sta-6.30.223.248/debian/patches/series 2014-12-07 17:18:59.000000000 +0400 @@ -5,3 +5,6 @@ 04-user_ioctl.patch 05-kernel-3.15.0.patch 06-kernel-3.17.0.patch +07-fix_procfs_handling.patch +08-enable_error_traces.patch +09-fix_system_hang_when_deleting_monitor.patch