kumquat-buildroot/board
Romain Naour 6e1106b4a9 board/qemu/sparc64-sun4u: avoid gcc-11 warning to build the kernel
gcc-11 warns about what appears to be an out-of-range array access but
stop the build due to -Werror added to cflags:

arch/sparc/kernel/mdesc.c: In function 'mdesc_node_by_name':
arch/sparc/kernel/mdesc.c:647:22: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
  647 |                 if (!strcmp(names + ep[ret].name_offset, name))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/mdesc.c:77:33: note: at offset 16 into source object 'mdesc' of size 16
   77 |         struct mdesc_hdr        mdesc;
      |                                 ^~~~~
arch/sparc/kernel/mdesc.c: In function 'mdesc_get_property':
arch/sparc/kernel/mdesc.c:692:22: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
  692 |                 if (!strcmp(names + ep->name_offset, name)) {
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/mdesc.c:77:33: note: at offset 16 into source object 'mdesc' of size 16
   77 |         struct mdesc_hdr        mdesc;
      |                                 ^~~~~
arch/sparc/kernel/mdesc.c: In function 'mdesc_next_arc':
arch/sparc/kernel/mdesc.c:719:21: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
  719 |                 if (strcmp(names + ep->name_offset, arc_type))
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/mdesc.c:77:33: note: at offset 16 into source object 'mdesc' of size 16
   77 |         struct mdesc_hdr        mdesc;
      |                                 ^~~~~
cc1: all warnings being treated as errors

The issue was initially reported to gcc [1] where it was analized.
As suggested, change the struct mdesc_elem * accesses from the end
of mdesc to those from the beginning of the data array.

Update the prototype of node_block(), name_block() and data_block()
since the code really seems to want to do is to compute the address
somewhere into the chunk pointed to by hp.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100262

Upstream status: Pending
https://www.spinics.net/lists/sparclinux/msg26385.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-06-20 18:40:05 +02:00
..
aarch64-efi configs/aarch64_efi: bump kernel version and update 2021-05-04 22:12:36 +02:00
acmesystems configs/acmesystems_acqua_a5: new defconfigs 2021-03-30 22:15:58 +02:00
altera/socrates_cyclone5
amarula
andes
arcturus configs/arcturus_ucls1012a: bump kernel to 4.14.140 and u-boot version to 2019.10 2020-08-12 16:41:06 +02:00
arm configs/arm_foundationv8: bump to Linux 5.9.11 2020-12-01 23:39:08 +01:00
armadeus board/armadeus: replace utf-8 graphic sympols by ascii characters 2019-05-18 23:34:18 +02:00
arrow/avenger96 configs/avenger96_defconfig: add support for Arrow Avenger96 board 2021-02-08 16:25:00 +01:00
asus/tinker
atmel configs/microchip_sama5d2_icp: new defconfigs 2021-05-19 14:44:19 +02:00
avnet/s6lx9_microboard
bananapi configs/bananapi_m2_zero: new defconfig 2020-07-25 23:12:34 +02:00
beagleboardx15 configs/beagleboardx15: drop custom post-image script 2019-10-27 12:20:43 +01:00
beaglebone board/beaglebone: remove genimage_linux41.cfg 2021-03-29 09:14:04 +02:00
beagleboneai configs/beagleboneai: new defconfig 2019-09-25 22:59:32 +02:00
beaglev configs/beaglev: enable host jh71xx-tools 2021-05-15 14:12:17 +02:00
beelink/gs1 configs/beelink_gs1: bump to U-Boot 2020.01 2020-04-12 23:08:22 +02:00
boundarydevices/common board/boundarydevices: update readme.txt for nitrogen8mp 2021-04-28 23:37:00 +02:00
chromebook configs/chromebook_elm: bump to Linux v5.9 2020-10-12 22:31:57 +02:00
ci20 board/ci20/genimage.cfg: drop hardcoded rootfs partition size 2020-01-22 20:50:02 +01:00
csky configs/csky_gx6605s: bump kernel to 5.0 and use buildroot toolchain 2019-08-02 23:42:51 +02:00
cubietech/cubieboard2
embest/riotboard
engicam board/icorem6: fix the Qt5 display name 2019-12-26 20:38:43 +01:00
firefly/roc-rk3399-pc configs/roc_rk3399_pc: new defconfig 2020-03-29 15:09:48 +02:00
freescale configs/freescale_imx8mpevk: new defconfig 2021-03-27 14:23:16 +01:00
friendlyarm configs: rename a bunch of friendlyarm boards 2021-03-01 22:53:35 +01:00
globalscale/espressobin configs/globalscale_espressobin: new defconfig 2020-07-25 23:01:55 +02:00
grinn board/chiliboard: drop custom post-image script 2020-03-20 22:35:48 +01:00
hardkernel board/hardkernel/odruidc2: remove rootfs size limit 2020-10-15 23:12:31 +02:00
intel/galileo
kontron/smarc-sal28 configs/kontron_smarc_sal28: integrate RCW into rootfs image 2021-01-14 22:30:46 +01:00
lego/ev3
lemaker/bananapro board/lemaker/bananapro: fix wlan module 2020-02-04 19:27:48 +01:00
librecomputer/lafrite configs/lafrite: new defconfig 2019-09-15 16:00:56 +02:00
licheepi
linksprite/pcduino
microchip configs/microchip_sama5d2_icp: new defconfigs 2021-05-19 14:44:19 +02:00
minnowboard configs/minnowboard_max-graphical_defconfig: unbreak X11/mesa 2021-06-06 09:32:31 +02:00
nexbox/a95x configs/nexbox_a95x_defconfig: bump to kernel 5.10.12 2021-02-04 18:15:09 +01:00
olimex configs/olimex_a33_olinuxino: new defconfig 2019-08-03 08:28:35 +02:00
olpc board/olpc/xo-1.75: enable drivers that were added in 5.8 2020-09-11 08:51:16 +02:00
openblocks/a6
orangepi configs/orangepi_r1_defconfig: fix typo in comment 2021-02-03 23:16:09 +01:00
pandaboard configs/pandaboard: drop custom post-image script 2019-10-27 12:21:29 +01:00
pc board/pc/genimage-efi.cfg: align the rootfs to start at 16MB offset from start of the image 2020-11-03 22:44:02 +01:00
pcengines/apu2 configs/pcengines_apu2: new defconfig 2020-09-03 21:06:31 +02:00
pine64 configs/rock64: new defconfig 2020-12-31 17:39:24 +01:00
qemu board/qemu/sparc64-sun4u: avoid gcc-11 warning to build the kernel 2021-06-20 18:40:05 +02:00
qmtech/zynq configs/zynq_qmtech: new defconfig 2020-04-19 21:43:35 +02:00
radxa configs/rock_pi_n8: new defconfig 2020-08-16 22:40:59 +02:00
raspberrypi board/raspberrypi: add Compute Module 4/IO Board support (64 Bit) 2021-05-20 09:53:30 +02:00
roseapplepi configs/roseapplypi: bump kernel to 5.10.1 2020-12-19 08:34:07 +01:00
sheevaplug
sifive/hifive-unleashed configs/hifive_unleashed: use mainline Linux + U-Boot 2021-01-31 23:26:33 +01:00
sinovoip configs/bananapi_m1_plus_defconfig: new defconfig 2021-01-25 22:02:36 +01:00
solidrun configs/mx6cubox: bump U-Boot version 2020-10-12 22:33:11 +02:00
stmicroelectronics configs/stm32f469_disco: fix kernel bootup 2021-06-16 23:09:34 +02:00
synopsys configs/snps_archs38_hsdk: re-enable USB support 2020-07-25 23:03:54 +02:00
technexion configs/imx7dpico: Bump U-Boot to 2019.07 and kernel to version 5.1.16. 2019-07-09 20:04:58 +02:00
technologic configs/ts4800: remove defconfig 2019-09-01 11:36:28 +02:00
toradex/apalis-imx6
udoo board/udoo: use common freescale infrastructure 2020-10-15 18:02:35 +02:00
uevm5432 configs/uevm5432: new defconfig 2021-05-19 13:42:28 +02:00
wandboard board/wandboard/post-build.sh: create boot.scr at TARGET_DIR/boot 2020-04-13 21:45:21 +02:00
warp7 configs/warp7: Bump kernel and U-Boot versions 2019-07-14 11:57:39 +02:00
zynq
zynqmp
raspberrypi0
raspberrypi0w
raspberrypi2
raspberrypi3
raspberrypi3-64
raspberrypi4 board/raspberrypi: add support for the new pi4 2019-08-03 11:06:44 +02:00
raspberrypi4-64 configs/raspberrypi4_64: new defconfig 2019-12-08 21:49:08 +01:00
raspberrypicm4io board/raspberrypi: add Compute Module 4/IO Board support 2021-05-20 09:53:29 +02:00
raspberrypicm4io-64 board/raspberrypi: add Compute Module 4/IO Board support (64 Bit) 2021-05-20 09:53:30 +02:00