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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250109012356.1015198-1-buaajxlj@163.com>
Date: Thu,  9 Jan 2025 09:23:56 +0800
From: Liang Jie <buaajxlj@....com>
To: pkshih@...ltek.com
Cc: buaajxlj@....com,
	kvalo@...nel.org,
	liangjie@...iang.com,
	linux-kernel@...r.kernel.org,
	linux-wireless@...r.kernel.org,
	phhuang@...ltek.com
Subject: RE: [PATCH] wifi: rtw89: Correct immediate cfg_len calculation for scan_offload_be

On Thu, 9 Jan 2025 00:35:38 +0000, Ping-Ke Shih <pkshih@...ltek.com> wrote:
> Liang Jie <buaajxlj@....com> wrote: 
> > From: Liang Jie <liangjie@...iang.com>
> > 
> > This patch ensures the correct calculation of `cfg_len` prior to the
> 
> No "This patch". Just in imperative tense -- "Ensure ..."
> 
> > allocation of the skb in the `rtw89_fw_h2c_scan_offload_be` function,
> >
> >   ...
> >
> > behavior across different firmware versions.
> > 
> > Fixes: 6ca6b918f280 ("wifi: rtw89: 8922a: Add new fields for scan offload H2C command")
> > 
> 
> No this blank line. 
> 
> > Signed-off-by: Liang Jie <liangjie@...iang.com>
> > ---
> >
> >   ...
> >
> >         u8 probe_id[NUM_NL80211_BANDS];
> > -       u8 cfg_len = sizeof(*h2c);
> > +       u8 cfg_len;
> 
> In fact, SCAN_OFFLOAD_BE_V0 means `old` format used by `old' firmware version,
> which isn't a main flow. I prefer to keep here unchanged, and modify cfg_len
> along with SCAN_OFFLOAD_BE_V0 for v0 firmware. 
> 
> As existing patterns, this will be
> 
> 	u8 cfg_len = sizeof(*h2c);
> 	u8 ver = U8_MAX;
> 
> 	if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw))
> 		ver = 0;
> 
> 	...
> 
> 	if (ver == 0)
> 		cfg_len = offsetofend(typeof(*h2c), w8);
> 
> 	...
> 
> 	if (ver == 0)
> 		goto flex_member;
> 
> 	...
> 
> 
> >         unsigned int cond;
> >         void *ptr;
> >         int ret;
> >
> >   ...
> >
> > 2.25.1

Thank you very much for your suggestions. I will incorporate them and submit
[PATCH v2] accordingly.

Best regards,
Liang Jie


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ