From a105e17598c82dec671bae85a2457cdd806957a9 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Tue, 10 Dec 2024 07:56:41 +0800 Subject: kexec-tools: upgrade 2.0.29 -> 2.0.30 0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch 0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch refreshed for 2.0.30 (From OE-Core rev: 68da0e1ecac6c83dd5ff942db0d9c8cb975fe806) Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- ...-disabled-check-if-kaslr-seed-dtb-propert.patch | 11 +-- ...xec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch | 9 +-- meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb | 89 ---------------------- meta/recipes-kernel/kexec/kexec-tools_2.0.30.bb | 89 ++++++++++++++++++++++ 4 files changed, 96 insertions(+), 102 deletions(-) delete mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb create mode 100644 meta/recipes-kernel/kexec/kexec-tools_2.0.30.bb diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch index ddc1519126..ee731cea4b 100644 --- a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch @@ -1,4 +1,4 @@ -From d48ec5e1a5fb7907520dee71b1d94045486a0c29 Mon Sep 17 00:00:00 2001 +From 9e95f8933bded10fdd664fc95492825347ec59a7 Mon Sep 17 00:00:00 2001 From: Alexander Kamensky Date: Thu, 12 Nov 2020 12:56:46 -0800 Subject: [PATCH] arm64: kexec: disabled check if kaslr-seed dtb property was @@ -34,10 +34,10 @@ Upstream-Status: Submitted [http://lists.infradead.org/pipermail/kexec/2020-Nove 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c -index ec6df4b..10238d9 100644 +index 9091f40..ea304f9 100644 --- a/kexec/arch/arm64/kexec-arm64.c +++ b/kexec/arch/arm64/kexec-arm64.c -@@ -503,7 +503,7 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) +@@ -504,7 +504,7 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) int len, range_len; int nodeoffset; int new_size; @@ -46,7 +46,7 @@ index ec6df4b..10238d9 100644 result = fdt_check_header(dtb->buf); -@@ -576,18 +576,6 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) +@@ -577,18 +577,6 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) return result; } } else { @@ -65,6 +65,3 @@ index ec6df4b..10238d9 100644 /* * Invoke the getrandom system call with * GRND_NONBLOCK, to make sure we --- -2.25.1 - diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch index dc52981025..8dc5fed765 100644 --- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch @@ -1,4 +1,4 @@ -From a6a9e17dfeb5627f3e6f569b66f243f50f8a3645 Mon Sep 17 00:00:00 2001 +From 1a09bf71c2f541c2cfb44a00661051597bbd0b76 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Tue, 6 Aug 2024 21:42:43 -0700 Subject: [PATCH] kexec.c: add MFD_NOEXEC_SEAL flag explicitly @@ -18,7 +18,7 @@ Signed-off-by: Chen Qi 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kexec/kexec.c b/kexec/kexec.c -index 7c614b0..41d285d 100644 +index 4f51987..8f02595 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -60,6 +60,10 @@ @@ -32,7 +32,7 @@ index 7c614b0..41d285d 100644 unsigned long long mem_min = 0; unsigned long long mem_max = ULONG_MAX; unsigned long elfcorehdrsz = 0; -@@ -655,7 +659,7 @@ static int copybuf_memfd(const char *kernel_buf, size_t size) +@@ -657,7 +661,7 @@ static int copybuf_memfd(const char *kernel_buf, size_t size) { int fd, count; @@ -41,6 +41,3 @@ index 7c614b0..41d285d 100644 if (fd == -1) return fd; --- -2.25.1 - diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb deleted file mode 100644 index 9f5eb6e8c1..0000000000 --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb +++ /dev/null @@ -1,89 +0,0 @@ -SUMMARY = "Kexec fast reboot tools" -DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" -HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" -SECTION = "kernel/userland" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09 \ - " -DEPENDS = "zlib xz" -RDEPENDS:${PN} = "makedumpfile" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ - file://kdump \ - file://kdump.conf \ - file://kdump.service \ - file://0001-powerpc-change-the-memory-size-limit.patch \ - file://0002-purgatory-Pass-r-directly-to-linker.patch \ - file://0005-Disable-PIE-during-link.patch \ - file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ - file://0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch \ - " - -SRC_URI[sha256sum] = "0756dd54dab2f2a437e5d4df64b9760c3e6cf6a7d29fb296bdeeeb749f6ea28e" - -inherit autotools update-rc.d systemd - -export LDFLAGS = "-L${STAGING_LIBDIR}" -EXTRA_OECONF = " --with-zlib=yes" - -do_compile:prepend() { - # Remove the prepackaged config.h from the source tree as it overrides - # the same file generated by configure and placed in the build tree - rm -f ${S}/include/config.h - - # Remove the '*.d' file to make sure the recompile is OK - for dep in `find ${B} -type f -name '*.d'`; do - dep_no_d="`echo $dep | sed 's#.d$##'`" - # Remove file.d when there is a file.o - if [ -f "$dep_no_d.o" ]; then - rm -f $dep - fi - done -} - -do_install:append () { - install -d ${D}${sysconfdir}/sysconfig - install -m 0644 ${UNPACKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -D -m 0755 ${UNPACKDIR}/kdump ${D}${sysconfdir}/init.d/kdump - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0755 ${UNPACKDIR}/kdump ${D}${libexecdir}/kdump-helper - install -D -m 0644 ${UNPACKDIR}/kdump.service ${D}${systemd_system_unitdir}/kdump.service - sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/kdump.service - fi -} - -PACKAGES =+ "kexec kdump vmcore-dmesg" - -ALLOW_EMPTY:${PN} = "1" -RRECOMMENDS:${PN} = "kexec kdump vmcore-dmesg" - -FILES:kexec = "${sbindir}/kexec" -FILES:kdump = "${sbindir}/kdump \ - ${sysconfdir}/sysconfig/kdump.conf \ - ${sysconfdir}/init.d/kdump \ - ${libexecdir}/kdump-helper \ - ${systemd_system_unitdir}/kdump.service \ -" - -FILES:vmcore-dmesg = "${sbindir}/vmcore-dmesg" - -INITSCRIPT_PACKAGES = "kdump" -INITSCRIPT_NAME:kdump = "kdump" -INITSCRIPT_PARAMS:kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." - -SYSTEMD_PACKAGES = "kdump" -SYSTEMD_SERVICE:kdump = "kdump.service" - -SECURITY_PIE_CFLAGS:remove = "-fPIE -pie" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' -# makedumpfile would not compile on mips/rv32 -COMPATIBLE_HOST:mipsarcho32 = "null" -COMPATIBLE_HOST:riscv32 = "null" - -INSANE_SKIP:${PN} = "arch" diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.30.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.30.bb new file mode 100644 index 0000000000..6a67427888 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.30.bb @@ -0,0 +1,89 @@ +SUMMARY = "Kexec fast reboot tools" +DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" +SECTION = "kernel/userland" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09 \ + " +DEPENDS = "zlib xz" +RDEPENDS:${PN} = "makedumpfile" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ + file://kdump \ + file://kdump.conf \ + file://kdump.service \ + file://0001-powerpc-change-the-memory-size-limit.patch \ + file://0002-purgatory-Pass-r-directly-to-linker.patch \ + file://0005-Disable-PIE-during-link.patch \ + file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ + file://0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch \ + " + +SRC_URI[sha256sum] = "bb6b39bbe00099219e95ab34b25ea4348e1a95964eefc45c1e6fe32362ac9021" + +inherit autotools update-rc.d systemd + +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" + +do_compile:prepend() { + # Remove the prepackaged config.h from the source tree as it overrides + # the same file generated by configure and placed in the build tree + rm -f ${S}/include/config.h + + # Remove the '*.d' file to make sure the recompile is OK + for dep in `find ${B} -type f -name '*.d'`; do + dep_no_d="`echo $dep | sed 's#.d$##'`" + # Remove file.d when there is a file.o + if [ -f "$dep_no_d.o" ]; then + rm -f $dep + fi + done +} + +do_install:append () { + install -d ${D}${sysconfdir}/sysconfig + install -m 0644 ${UNPACKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -D -m 0755 ${UNPACKDIR}/kdump ${D}${sysconfdir}/init.d/kdump + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -D -m 0755 ${UNPACKDIR}/kdump ${D}${libexecdir}/kdump-helper + install -D -m 0644 ${UNPACKDIR}/kdump.service ${D}${systemd_system_unitdir}/kdump.service + sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/kdump.service + fi +} + +PACKAGES =+ "kexec kdump vmcore-dmesg" + +ALLOW_EMPTY:${PN} = "1" +RRECOMMENDS:${PN} = "kexec kdump vmcore-dmesg" + +FILES:kexec = "${sbindir}/kexec" +FILES:kdump = "${sbindir}/kdump \ + ${sysconfdir}/sysconfig/kdump.conf \ + ${sysconfdir}/init.d/kdump \ + ${libexecdir}/kdump-helper \ + ${systemd_system_unitdir}/kdump.service \ +" + +FILES:vmcore-dmesg = "${sbindir}/vmcore-dmesg" + +INITSCRIPT_PACKAGES = "kdump" +INITSCRIPT_NAME:kdump = "kdump" +INITSCRIPT_PARAMS:kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." + +SYSTEMD_PACKAGES = "kdump" +SYSTEMD_SERVICE:kdump = "kdump.service" + +SECURITY_PIE_CFLAGS:remove = "-fPIE -pie" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' +# makedumpfile would not compile on mips/rv32 +COMPATIBLE_HOST:mipsarcho32 = "null" +COMPATIBLE_HOST:riscv32 = "null" + +INSANE_SKIP:${PN} = "arch" -- cgit v1.2.3-54-g00ecf