lkml.org 
[lkml]   [2019]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: warning: ‘memset’ offset [197, 4 48] from the object at ‘boot params’ i s out of the bounds of referenced subobject =?ISO-8859-7?Q?_=A1ext=5Framdisk=5Fimage=A2_with_type=2C_=A1uns
On Thu, 15 Aug 2019, Greg KH wrote:
> On Tue, Aug 13, 2019 at 06:15:51PM +0200, Paul Menzel wrote:
> > Dear Linux folks,
> >
> >
> > No idea, if you are interested in these reports. Building Linux 5.3-rc4,
> > GCC 9.2.0 shows the warning below.
> >
> > ```
> > 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 ‘unsig
> > ned char’ at offset 491 [-Warray-bounds]
> > 43 | memset(&boot_params->kbd_status, 0,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 44 | (char *)&boot_params->hdr -
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 45 | (char *)&boot_params->kbd_status);
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ```
>
> Yeah, it shows up on my builds as well :(
>
> Any chance you can make a fix for this?

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/boot&id=a156cadef2fe445ac423670eace517b39a01ccd0

I guess I need to reprioritize that and mark it for stable....
\
 
 \ /
  Last update: 2019-08-15 14:57    [W:0.041 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site