public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Clayton <chris2553@googlemail.com>
To: "Enrico Weigelt, metux IT consult" <lkml@metux.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Warnings whilst building 5.2.0+
Date: Tue, 9 Jul 2019 12:39:34 +0100	[thread overview]
Message-ID: <5276d608-e781-6190-e7df-bc22152b71c1@googlemail.com> (raw)
In-Reply-To: <d5f09396-a562-7989-8e5b-8337c9c9a036@metux.net>



On 09/07/2019 11:37, Enrico Weigelt, metux IT consult wrote:
> On 09.07.19 08:06, Chris Clayton wrote:
> 
> Hi,
> 
>> I've pulled Linus' tree this morning and, after running 'make oldconfig', tried a build. During that build I got the
>> following warnings, which look to me like they should be fixed. 'git describe' shows v5.2-915-g5ad18b2e60b7 and my
>> compiler is the 20190706 snapshot of gcc 9.
> 
> Thanks for the report. I'm rebuilding right know anyways, so I'll look
> out for it.

Thanks for the reply.

>> In file included from arch/x86/kernel/head64.c:35:
>> In function 'sanitize_boot_params',
>>     inlined from 'copy_bootdata' at arch/x86/kernel/head64.c:391:2:
>> ./arch/x86/include/asm/bootparam_utils.h:40:3: warning: 'memset' offset [197, 448] from the object at 'boot_params' is
>> out of the bounds of referenced subobject 'ext_ramdisk_image' with type 'unsigned int' at offset 192 [-Warray-bounds]
>>    40 |   memset(&boot_params->ext_ramdisk_image, 0,
>>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    41 |          (char *)&boot_params->efi_info -
>>       |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    42 |    (char *)&boot_params->ext_ramdisk_image);
>>       |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ./arch/x86/include/asm/bootparam_utils.h:43:3: warning: 'memset' offset [493, 497] from the object at 'boot_params' is
>> out of the bounds of referenced subobject 'kbd_status' with type 'unsigned char' at offset 491 [-Warray-bounds]
>>    43 |   memset(&boot_params->kbd_status, 0,
>>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    44 |          (char *)&boot_params->hdr -
>>       |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    45 |          (char *)&boot_params->kbd_status);
>>       |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Can you check older versions, too ? Maybe also trying older gcc ?
> 

I see the same warnings building linux-5.2.0 with gcc9. However, I don't see the warnings building linux-5.2.0 with the
the 20190705 of gcc8. So the warnings could result from an improvement (i.e. the problem was in the kernel, but
undiscovered by gcc8) or from a regression in gcc9.

> 
> --mtx
> 

  reply	other threads:[~2019-07-09 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09  6:06 Warnings whilst building 5.2.0+ Chris Clayton
2019-07-09 10:37 ` Enrico Weigelt, metux IT consult
2019-07-09 11:39   ` Chris Clayton [this message]
2019-08-07  6:30     ` Chris Clayton
2019-08-07  6:45       ` John Hubbard

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=5276d608-e781-6190-e7df-bc22152b71c1@googlemail.com \
    --to=chris2553@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@metux.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox