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]

From: Paul Menzel
Date: Tue Aug 13 2019 - 12:15:56 EST


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);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```


Kind regards,

Paul

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature