regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0
@ 2022-09-21 10:35 Naresh Kamboju
  2022-10-10 16:54 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Kamboju @ 2022-09-21 10:35 UTC (permalink / raw)
  To: Netdev, open list, linux-wireless
  Cc: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, ath11k, regressions, lkft-triage

Following build warnings noticed while building arm64 on Linux next-20220921

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2238 |                         v = ath11k_peer_assoc_h_he_limit(v,
he_mcs_mask);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2238:29: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2251 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'ath11k_peer_assoc_h_he',
    inlined from 'ath11k_peer_assoc_prepare' at
drivers/net/wireless/ath/ath11k/mac.c:2662:2:
drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning:
'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
0 [-Wstringop-overread]
 2251 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing
argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
function 'ath11k_peer_assoc_h_he_limit'
 2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Build log: https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0
  2022-09-21 10:35 drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0 Naresh Kamboju
@ 2022-10-10 16:54 ` Kalle Valo
  2022-10-10 17:52   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2022-10-10 16:54 UTC (permalink / raw)
  To: Naresh Kamboju, Arnd Bergmann
  Cc: Netdev, open list, linux-wireless, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, ath11k, regressions, lkft-triage

+ arnd

Naresh Kamboju <naresh.kamboju@linaro.org> writes:

> Following build warnings noticed while building arm64 on Linux next-20220921
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2238 |                         v = ath11k_peer_assoc_h_he_limit(v,
> he_mcs_mask);
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2238:29: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2251 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2264 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2264:21: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In function 'ath11k_peer_assoc_h_he',
>     inlined from 'ath11k_peer_assoc_prepare' at
> drivers/net/wireless/ath/ath11k/mac.c:2662:2:
> drivers/net/wireless/ath/ath11k/mac.c:2251:21: warning:
> 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size
> 0 [-Wstringop-overread]
>  2251 |                 v = ath11k_peer_assoc_h_he_limit(v, he_mcs_mask);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_peer_assoc_prepare':
> drivers/net/wireless/ath/ath11k/mac.c:2251:21: note: referencing
> argument 2 of type 'const u16 *' {aka 'const short unsigned int *'}
> drivers/net/wireless/ath/ath11k/mac.c:2019:12: note: in a call to
> function 'ath11k_peer_assoc_h_he_limit'
>  2019 | static u16 ath11k_peer_assoc_h_he_limit(u16 tx_mcs_set,
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Build log: https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/

Thanks, I was able to reproduce it now and submitted a patch:

https://patchwork.kernel.org/project/linux-wireless/patch/20221010160638.20152-1-kvalo@kernel.org/

But it's strange that nobody else (myself included) didn't see this
earlier. Nor later for that matter, this is the only report I got about
this. Arnd, any ideas what could cause this only to happen on GCC 11?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0
  2022-10-10 16:54 ` Kalle Valo
@ 2022-10-10 17:52   ` Arnd Bergmann
  2022-10-11  8:12     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2022-10-10 17:52 UTC (permalink / raw)
  To: Kalle Valo, Naresh Kamboju
  Cc: Netdev, open list, linux-wireless, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, ath11k, regressions,
	lkft-triage

On Mon, Oct 10, 2022, at 6:54 PM, Kalle Valo wrote:
> Naresh Kamboju <naresh.kamboju@linaro.org> writes:

>>
>> Build log: https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/
>
> Thanks, I was able to reproduce it now and submitted a patch:
>
> https://patchwork.kernel.org/project/linux-wireless/patch/20221010160638.20152-1-kvalo@kernel.org/
>
> But it's strange that nobody else (myself included) didn't see this
> earlier. Nor later for that matter, this is the only report I got about
> this. Arnd, any ideas what could cause this only to happen on GCC 11?
>
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

No idea here, though I have not tried to reproduce it. This looks
like a false positive to me, which might be the result of some
missed optimization in the compiler when building with certain
options. I see in the .config that KASAN is enabled, and this sometimes
causes odd behavior like this. If it does not happen without KASAN,
maybe report it as a bug against the compiler.

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0
  2022-10-10 17:52   ` Arnd Bergmann
@ 2022-10-11  8:12     ` Kalle Valo
  2022-10-11 10:53       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2022-10-11  8:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Naresh Kamboju, Netdev, open list, linux-wireless,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, regressions, lkft-triage

"Arnd Bergmann" <arnd@arndb.de> writes:

> On Mon, Oct 10, 2022, at 6:54 PM, Kalle Valo wrote:
>> Naresh Kamboju <naresh.kamboju@linaro.org> writes:
>
>>>
>>> Build log: https://builds.tuxbuild.com/2F4W7nZHNx3T88RB0gaCZ9hBX6c/
>>
>> Thanks, I was able to reproduce it now and submitted a patch:
>>
>> https://patchwork.kernel.org/project/linux-wireless/patch/20221010160638.20152-1-kvalo@kernel.org/
>>
>> But it's strange that nobody else (myself included) didn't see this
>> earlier. Nor later for that matter, this is the only report I got about
>> this. Arnd, any ideas what could cause this only to happen on GCC 11?
>>
>> -- 
>> https://patchwork.kernel.org/project/linux-wireless/list/
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
> No idea here, though I have not tried to reproduce it. This looks
> like a false positive to me, which might be the result of some
> missed optimization in the compiler when building with certain
> options. I see in the .config that KASAN is enabled, and this sometimes
> causes odd behavior like this. If it does not happen without KASAN,
> maybe report it as a bug against the compiler.

You guessed correctly, disabling KASAN makes the warning go away. So no
point of reporting this to GCC, thanks for the help!

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0
  2022-10-11  8:12     ` Kalle Valo
@ 2022-10-11 10:53       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2022-10-11 10:53 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Naresh Kamboju, Netdev, open list, linux-wireless,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, regressions, lkft-triage

On Tue, Oct 11, 2022, at 10:12 AM, Kalle Valo wrote:
> "Arnd Bergmann" <arnd@arndb.de> writes:

>
> You guessed correctly, disabling KASAN makes the warning go away. So no
> point of reporting this to GCC, thanks for the help!

What I meant was that if the problem is specific to KASAN, it might
be nice to report it in the gcc bug tracker with the KASAN component,
ideally with some kind of minimized test case or at least preprocessed
source.

   Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-11 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 10:35 drivers/net/wireless/ath/ath11k/mac.c:2238:29: warning: 'ath11k_peer_assoc_h_he_limit' reading 16 bytes from a region of size 0 Naresh Kamboju
2022-10-10 16:54 ` Kalle Valo
2022-10-10 17:52   ` Arnd Bergmann
2022-10-11  8:12     ` Kalle Valo
2022-10-11 10:53       ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).