From b301381f90163ecb18b90bf7150007cd2e1cb190 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 4 Aug 2023 12:41:04 +0000 Subject: [PATCH] (genprotimg|zipl)/boot: remove executable bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootloader binaries cannot be executed via `exec()` therefore remove the executable bit. Reviewed-by: Jan Höppner Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- genprotimg/boot/Makefile | 1 + zipl/boot/Makefile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile index c9ba5b38..799df9cc 100644 --- a/genprotimg/boot/Makefile +++ b/genprotimg/boot/Makefile @@ -79,6 +79,7 @@ stage3b.elf: head.o $(ZIPL_OBJS) %.bin.debug: %.elf $(OBJCOPY) --only-keep-debug $< $@ + @chmod a-x $@ %.bin: %.elf $(OBJCOPY) -O binary $< $@ diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile index 9ca9717e..499fb537 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -76,12 +76,15 @@ stage3.exec: head.o stage3.o kdump3.o libc.o ebcdic.o ebcdic_conv.o sclp.o \ %.exec: %.o $(LINK) -Wl,-T,$(filter %.lds,$^) $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@ + @chmod a-x $@ %.bin.debug: %.exec $(OBJCOPY) --only-keep-debug $< $@ + @chmod a-x $@ %.bin: %.exec $(OBJCOPY) -O binary $< $@ + @chmod a-x $@ clean: