lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 20 May 2022 03:49:06 +0000 From: Pkshih <pkshih@...ltek.com> To: "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>, "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org> CC: "johannes@...solutions.net" <johannes@...solutions.net>, "kernel@...gutronix.de" <kernel@...gutronix.de>, "neojou@...il.com" <neojou@...il.com>, "kvalo@...nel.org" <kvalo@...nel.org>, "tony0620emma@...il.com" <tony0620emma@...il.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "martin.blumenstingl@...glemail.com" <martin.blumenstingl@...glemail.com>, "linux@...i-kroll.de" <linux@...i-kroll.de>, "netdev@...r.kernel.org" <netdev@...r.kernel.org> Subject: Re: [PATCH 02/10] rtw88: Drop rf_lock On Wed, 2022-05-18 at 10:23 +0200, Sascha Hauer wrote: > The rtwdev->rf_lock spinlock protects the rf register accesses in > rtw_read_rf() and rtw_write_rf(). Most callers of these functions hold > rtwdev->mutex already with the exception of the callsites in the debugfs > code. The debugfs code doesn't justify an extra lock, so acquire the mutex > there as well before calling rf register accessors and drop the now > unnecessary spinlock. > > Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de> > --- > drivers/net/wireless/realtek/rtw88/debug.c | 11 +++++++++++ > drivers/net/wireless/realtek/rtw88/hci.h | 9 +++------ > drivers/net/wireless/realtek/rtw88/main.c | 1 - > drivers/net/wireless/realtek/rtw88/main.h | 3 --- > 4 files changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/debug.c > b/drivers/net/wireless/realtek/rtw88/debug.c > index 1a52ff585fbc7..ba5ba852efb8c 100644 > --- a/drivers/net/wireless/realtek/rtw88/debug.c > +++ b/drivers/net/wireless/realtek/rtw88/debug.c > [...] > @@ -523,6 +527,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) > u32 addr, offset, data; > u8 path; > > + mutex_lock(&rtwdev->mutex); > + > for (path = 0; path < rtwdev->hal.rf_path_num; path++) { > seq_printf(m, "RF path:%d\n", path); > for (addr = 0; addr < 0x100; addr += 4) { > @@ -537,6 +543,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) > seq_puts(m, "\n"); > } > > + mutex_unlock(&rtwdev->mutex); > + > return 0; > } > This will take time to dump all RF registers for debugging purpose. For PCI interface, I think this would be okay. Could you try to dump registers via debufs while you are using a USB WiFi device, such as play Youtube or download files... If it doesn't work very well, I suggest to use rf_mutex to replace rf_lock inplace, but not just remove rf_lock. -- Ping-Ke
Powered by blists - more mailing lists