public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>, Kalle Valo <kvalo@kernel•org>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: build warning after merge of the kspp-gustavo tree
Date: Tue, 21 Nov 2023 17:07:32 -0600	[thread overview]
Message-ID: <9d3b74ec-4a92-4304-b8ee-5f70711666bc@embeddedor.com> (raw)
In-Reply-To: <20231122094739.38465ed3@canb.auug.org.au>



On 11/21/23 16:47, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp-gustavo tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> In file included from include/linux/string.h:295,
>                   from include/linux/bitmap.h:12,
>                   from include/linux/cpumask.h:12,
>                   from arch/x86/include/asm/paravirt.h:17,
>                   from arch/x86/include/asm/cpuid.h:62,
>                   from arch/x86/include/asm/processor.h:19,
>                   from arch/x86/include/asm/cpufeature.h:5,
>                   from arch/x86/include/asm/thread_info.h:53,
>                   from include/linux/thread_info.h:60,
>                   from arch/x86/include/asm/preempt.h:9,
>                   from include/linux/preempt.h:79,
>                   from include/linux/spinlock.h:56,
>                   from include/linux/mmzone.h:8,
>                   from include/linux/gfp.h:7,
>                   from include/linux/firmware.h:7,
>                   from drivers/net/wireless/realtek/rtw89/core.h:10,
>                   from drivers/net/wireless/realtek/rtw89/coex.h:8,
>                   from drivers/net/wireless/realtek/rtw89/coex.c:5:
> drivers/net/wireless/realtek/rtw89/coex.c: In function '_append_tdma':
> include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
>     57 | #define __underlying_memcpy     __builtin_memcpy
>        |                                 ^
> include/linux/fortify-string.h:644:9: note: in expansion of macro '__underlying_memcpy'
>    644 |         __underlying_##op(p, q, __fortify_size);                        \
>        |         ^~~~~~~~~~~~~
> include/linux/fortify-string.h:689:26: note: in expansion of macro '__fortify_memcpy_chk'
>    689 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
>        |                          ^~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw89/coex.c:1585:17: note: in expansion of macro 'memcpy'
>   1585 |                 memcpy(&v3->tdma, &dm->tdma, sizeof(v3->tdma));
>        |                 ^~~~~~
> drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5714, 71249] into destination object 'ver' of size 8
>   2703 |         const struct rtw89_btc_ver *ver;
>        |                                     ^~~
> include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
>     57 | #define __underlying_memcpy     __builtin_memcpy
>        |                                 ^
> include/linux/fortify-string.h:644:9: note: in expansion of macro '__underlying_memcpy'
>    644 |         __underlying_##op(p, q, __fortify_size);                        \
>        |         ^~~~~~~~~~~~~
> include/linux/fortify-string.h:689:26: note: in expansion of macro '__fortify_memcpy_chk'
>    689 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
>        |                          ^~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw89/coex.c:1579:17: note: in expansion of macro 'memcpy'
>   1579 |                 memcpy(v, &dm->tdma, sizeof(*v));
>        |                 ^~~~~~
> drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5710, 71245] into destination object 'ver' of size 8
>   2703 |         const struct rtw89_btc_ver *ver;
>        |                                     ^~~
> 
> Exposed by commit
> 
>    1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally")
> 
> This is with your tree on top of Linus' tree (and some fix patches but
> nothing that obviously touches anything relevent) and CONFIG_WERROR
> not set.

Stephen,

The fix for that shows up in linux-next already:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ca76817f4c4bbf8f98268772f4eeea8382a34bcd

Thanks for your help on this. :)
--
Gustavo






> 

  reply	other threads:[~2023-11-21 23:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 22:47 linux-next: build warning after merge of the kspp-gustavo tree Stephen Rothwell
2023-11-21 23:07 ` Gustavo A. R. Silva [this message]
2023-11-21 23:19   ` Stephen Rothwell
2023-11-21 23:23     ` Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2023-11-21 22:50 Stephen Rothwell
2023-11-21 23:19 ` Gustavo A. R. Silva
2021-09-29 23:53 Stephen Rothwell
2021-09-30  0:05 ` Gustavo A. R. Silva
2021-07-13  0:22 Stephen Rothwell
2021-07-13  1:10 ` Gustavo A. R. Silva
2021-07-13  2:39   ` Gustavo A. R. Silva
2021-06-22 22:39 Stephen Rothwell
2021-06-22 22:46 ` Gustavo A. R. Silva
2021-06-22 23:01   ` Gustavo A. R. Silva
2021-06-23  3:03     ` Stephen Rothwell
2021-06-23 13:14 ` David Sterba
2021-06-23 18:39   ` Gustavo A. R. Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d3b74ec-4a92-4304-b8ee-5f70711666bc@embeddedor.com \
    --to=gustavo@embeddedor$(echo .)com \
    --cc=kvalo@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox