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: <85baab98b0e74936bdecac3a63552f1a@realtek.com>
Date: Tue, 29 Apr 2025 00:21:22 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Ondřej Jirman <megi@....cz>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "open
 list:REALTEK WIRELESS DRIVER (rtw89)" <linux-wireless@...r.kernel.org>
Subject: RE: [PATCH] wifi: rtw89: Fix inadverent sharing of struct ieee80211_supported_band data

> > Since you have duplicated arrays of channels and bitrate, we should add const
> > to them, like:
> >
> >   static const struct ieee80211_channel rtw89_channels_{2ghz,5ghz,6ghz}[]
> >   static const struct ieee80211_rate rtw89_bitrates[]
> 
> That will produce:
> 
>   initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 
> warnings, because  struct ieee80211_supported_band doesn't have these fields
> as const. The discarding of const qualifiers is apparently safe in this case,
> so I can either cast the pointers to non-const when assigned here:
> 
>  270 static const struct ieee80211_supported_band rtw89_sband_2ghz = {
>  271         .band           = NL80211_BAND_2GHZ,
>  272         .channels       = rtw89_channels_2ghz,
>  273         .n_channels     = ARRAY_SIZE(rtw89_channels_2ghz),
>  274         .bitrates       = rtw89_bitrates,
>  275         .n_bitrates     = ARRAY_SIZE(rtw89_bitrates),
>  276         .ht_cap         = {0},
>  277         .vht_cap        = {0},
>  278 };
> 

Ah. I was not aware of this point. Please keep it as was. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ