s390-tools/s390-tools-sles15sp4-genprotimg-boot-disable-Warray-bounds-for-now.patch
Mark Post 944f52c5bb Accepting request 980529 from home:markkp:branches:Base:System
- Modifed the spec file to install all binaires in /usr/sbin instead of /sbin
  to align with the "usrmerge" initiative in openSUSE. (bsc#1195914) Also
  modified the following files that SUSE provides that need to reflect this
  change:
  *  59-graf.rules
  *  dasd_configure
  *  dasd_reload
  *  detach_disks.sh
  *  iucv_configure
  *  killcdl
  *  mkdump.pl
  *  README.SUSE
  *  s390-tools-sles12-update-by_id-links-on-change-and-add-action.patch
  *  virtsetup.sh
  *  vmlogrdr.service
- Added s390-tools-sles15sp4-libseckey-Adapt-keymgmt_match-implementation-to-Open.patch
  for bsc#1199649. zkey: KMIP plugin fails to connection to KMIP server
  When a zkey key repository is bound to the KMIP plugin, and the
  connection to the KMIP server is to be configired using command 
  'zkey kms configure --kmip-server <server>', it fails to connect
  to the specified KMIP server. 
- Added s390-tools-sles15sp4-genprotimg-boot-disable-Warray-bounds-for-now.patch
  to fix a build failure with gcc12. With gcc12, a "false positive"
  of "array subscript 0 is outside array bounds" is seen in
  genprotimg/boot/stage3a.c (bsc#1200131).

OBS-URL: https://build.opensuse.org/request/show/980529
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=137
2022-06-02 16:42:42 +00:00

51 lines
2.0 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 9e620058184cfdf026241b953bfbb095256198a0 Mon Sep 17 00:00:00 2001
From: Marc Hartmayer <mhartmay@linux.ibm.com>
Date: Tue, 26 Apr 2022 09:22:10 +0000
Subject: [PATCH] genprotimg/boot: disable `-Warray-bounds` for now
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This work around fixes the gcc-12 false positive by disabling `Warray-bounds`:
CC genprotimg/boot/stage3a.o
In file included from stage3a.c:14:
In function __test_facility,
inlined from test_facility at ../../include/boot/s390.h:428:9,
inlined from start at stage3a.c:42:7:
../../include/boot/s390.h:418:17: error: array subscript 0 is outside array bounds of void[0] [-Werror=array-bounds]
418 | return (*ptr & (0x80 >> (nr & 7))) != 0;
| ^~~~
Unfortunately, there is currently no better fix available that doesn't result
in larger boot loader code sizes. Given the importancy of the boot loader file
sizes the other fixes aren't acceptable. The Linux kernel shares the
problem (but for performance reasons), take a look at the discussion
https://lore.kernel.org/lkml/yt9dzgkelelc.fsf@linux.ibm.com/ for details.
Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/130
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
---
genprotimg/boot/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile
index f957a70..95bd6cc 100644
--- a/genprotimg/boot/Makefile
+++ b/genprotimg/boot/Makefile
@@ -15,7 +15,8 @@ ALL_CFLAGS := $(NO_PIE_CFLAGS) -Os -g \
-fno-delete-null-pointer-checks -fno-stack-protector \
-fexec-charset=IBM1047 -m64 -mpacked-stack \
-mstack-size=4096 -mstack-guard=128 -msoft-float \
- -Wall -Wformat-security -Wextra -Werror
+ -Wall -Wformat-security -Wextra -Werror \
+ -Wno-array-bounds
FILES := stage3a.bin stage3b.bin stage3b_reloc.bin
--
2.35.3