All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 5.15
Date: Mon, 1 Nov 2021 18:17:59 -0700	[thread overview]
Message-ID: <89a3686d-1ef6-4677-5d9f-f5e15a77c50e@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdWBgGvt8q9suk6tysgga7sJ4v74eJHHO=ifg2Rc3S9A9Q@mail.gmail.com>

On 11/1/21 1:13 AM, Geert Uytterhoeven wrote:
> Hi Günter.
> 
> On Mon, Nov 1, 2021 at 1:28 AM Guenter Roeck <linux@roeck-us.net> wrote:
>> On Sun, Oct 31, 2021 at 02:09:07PM -0700, Linus Torvalds wrote:
>> Building m68k:allmodconfig ... failed
>> --------------
>> Error log:
>> In file included from include/linux/string.h:20,
>>                   from include/linux/bitmap.h:10,
>>                   from include/linux/cpumask.h:12,
>>                   from include/linux/smp.h:13,
>>                   from include/linux/lockdep.h:14,
>>                   from include/linux/spinlock.h:63,
>>                   from include/linux/mmzone.h:8,
>>                   from include/linux/gfp.h:6,
>>                   from include/linux/slab.h:15,
>>                   from drivers/nvme/target/discovery.c:7:
>> In function 'memcpy_and_pad',
>>      inlined from 'nvmet_execute_disc_identify' at drivers/nvme/target/discovery.c:268:2:
>> arch/m68k/include/asm/string.h:72:25: error: '__builtin_memcpy' reading 8 bytes from a region of size 7
>>
>> Another instance of the same problem:
>>
>> In function 'memcpy_and_pad',
>>      inlined from 'nvmet_execute_identify_ctrl' at drivers/nvme/target/admin-cmd.c:372:2:
>> arch/m68k/include/asm/string.h:72:25: error: '__builtin_memcpy' reading 8 bytes from a region of size 7
>>
>> This is seen with gcc 11.1 and 11.2. gcc 10.3 builds fine.
>> The code in question is
>>
>>          memcpy_and_pad(id->fr, sizeof(id->fr),
>>                         UTS_RELEASE, strlen(UTS_RELEASE), ' ');
>>
>> and UTS_RELEASE is "5.15.0". I have no idea what might be wrong with the code.
> 
> Me neither.  That warning (now error) has been seen with all point
> releases (i.e. strlen(UTS_RELEASE) < 8) since v5.0.
> 

Ah yes, I can see that now. I guess I didn't notice earlier because it was
only reported as warning.

>> Does anyone have an idea ?
> 
> We had a discussion in
> https://lore.kernel.org/all/CAMuHMdX365qmWiii=gQLADpW49EMkdDrVJDPWNBpAZuZM0WQFQ@mail.gmail.com
> but without any definitive conclusion.
> 
>> Do I need to revert to gcc 10.3 for m68k ?
> 
> I'm not sure that might help, as the issue has been seen with
> e.g. 8.1.0 and 8.2.0, too, with a slightly different message:
> warning: ‘__builtin_memcpy’ forming offset 8 is out of the bounds [0,
> 7] [-Warray-bounds]
> 
> Any suggestions? Thanks!
> 

Replacing "strlen(UTS_RELEASE)" with "sizeof(UTS_RELEASE) - 1" seems to do
the trick, at least with gcc 11.2 and v5.15. I just wonder if that would be
acceptable. Any idea ?

Thanks,
Guenter

  reply	other threads:[~2021-11-02  1:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31 21:09 Linux 5.15 Linus Torvalds
2021-11-01  0:23 ` Guenter Roeck
2021-11-01  8:13   ` Geert Uytterhoeven
2021-11-02  1:17     ` Guenter Roeck [this message]
2021-11-02  1:44       ` Linus Torvalds
2021-11-02  3:19         ` Guenter Roeck
2021-11-01  4:49 ` Thorsten is tracking regression again and could need a little help (was: Re: Linux 5.15) Thorsten Leemhuis
2021-11-01 11:46   ` Idzibear
2021-11-01 11:56     ` Greg KH
2021-11-01 12:54     ` Thorsten Leemhuis
2021-11-01 12:33   ` Greg KH
2021-11-01 12:44     ` Thorsten Leemhuis
2021-11-01 13:03       ` Greg KH
2021-11-01 13:34         ` Thorsten Leemhuis
2021-11-01 15:27           ` Greg KH
2021-11-01 16:19             ` Thorsten Leemhuis
2021-11-01 15:07 ` Linux 5.15 Andy Shevchenko
2021-11-01 16:19   ` Lee Jones
2021-11-01 17:25 ` Sudip Mukherjee

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=89a3686d-1ef6-4677-5d9f-f5e15a77c50e@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.