From: Greg Kroah-Hartman Date: Tue, 19 Aug 2025 12:26:05 +0000 (+0200) Subject: drop bootconfig patch X-Git-Tag: v6.12.43~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb8df680a9a76583e8ea3d8f084e03746269bf0a;p=thirdparty%2Fkernel%2Fstable-queue.git drop bootconfig patch --- diff --git a/queue-6.1/bootconfig-fix-unaligned-access-when-building-footer.patch b/queue-6.1/bootconfig-fix-unaligned-access-when-building-footer.patch deleted file mode 100644 index 1db433b948..0000000000 --- a/queue-6.1/bootconfig-fix-unaligned-access-when-building-footer.patch +++ /dev/null @@ -1,84 +0,0 @@ -From a679b5ac076185b45bb86f248c93636685b44630 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 23 Jul 2025 12:49:25 +0200 -Subject: bootconfig: Fix unaligned access when building footer - -From: Ben Hutchings - -[ Upstream commit 6ed5e20466c79e3b3350bae39f678f73cf564b4e ] - -Currently we add padding between the bootconfig text and footer to -ensure that the footer is aligned within the initramfs image. -However, because only the bootconfig data is held in memory, not the -full initramfs image, the footer may not be naturally aligned in -memory. - -This can result in an alignment fault (SIGBUS) when writing the footer -on some architectures, such as sparc. - -Build the footer in a struct on the stack before adding it to the -buffer. - -References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sparc64&ver=6.16%7Erc7-1%7Eexp1&stamp=1753209801&raw=0 -Link: https://lore.kernel.org/all/aIC-NTw-cdm9ZGFw@decadent.org.uk/ - -Signed-off-by: Ben Hutchings -Signed-off-by: Masami Hiramatsu (Google) -Signed-off-by: Sasha Levin ---- - tools/bootconfig/main.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c -index 8a48cc2536f5..dce2d6ffcca5 100644 ---- a/tools/bootconfig/main.c -+++ b/tools/bootconfig/main.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - -@@ -359,7 +360,12 @@ static int delete_xbc(const char *path) - - static int apply_xbc(const char *path, const char *xbc_path) - { -- char *buf, *data, *p; -+ struct { -+ uint32_t size; -+ uint32_t csum; -+ char magic[BOOTCONFIG_MAGIC_LEN]; -+ } footer; -+ char *buf, *data; - size_t total_size; - struct stat stat; - const char *msg; -@@ -430,17 +436,13 @@ static int apply_xbc(const char *path, const char *xbc_path) - size += pad; - - /* Add a footer */ -- p = data + size; -- *(uint32_t *)p = htole32(size); -- p += sizeof(uint32_t); -+ footer.size = htole32(size); -+ footer.csum = htole32(csum); -+ memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); -+ memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); - -- *(uint32_t *)p = htole32(csum); -- p += sizeof(uint32_t); -- -- memcpy(p, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -- p += BOOTCONFIG_MAGIC_LEN; -- -- total_size = p - data; -+ total_size = size + BOOTCONFIG_FOOTER_SIZE; - - ret = write(fd, data, total_size); - if (ret < total_size) { --- -2.39.5 - diff --git a/queue-6.1/series b/queue-6.1/series index 1efafd8dfd..6604ed6521 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -110,7 +110,6 @@ alsa-pcm-rewrite-recalculate_boundary-to-avoid-costl.patch alsa-usb-audio-avoid-precedence-issues-in-mixer_quir.patch iio-adc-ad7768-1-ensure-sync_in-pulse-minimum-timing.patch asoc-codecs-rt5640-retry-device_id-verification.patch -bootconfig-fix-unaligned-access-when-building-footer.patch xen-netfront-fix-tx-response-spurious-interrupts.patch net-usb-cdc-ncm-check-for-filtering-capability.patch ktest.pl-prevent-recursion-of-default-variable-optio.patch diff --git a/queue-6.12/bootconfig-fix-unaligned-access-when-building-footer.patch b/queue-6.12/bootconfig-fix-unaligned-access-when-building-footer.patch deleted file mode 100644 index 4f1512cd00..0000000000 --- a/queue-6.12/bootconfig-fix-unaligned-access-when-building-footer.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 7374e988eb9d1da10f80713f4bad10891ef26016 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 23 Jul 2025 12:49:25 +0200 -Subject: bootconfig: Fix unaligned access when building footer - -From: Ben Hutchings - -[ Upstream commit 6ed5e20466c79e3b3350bae39f678f73cf564b4e ] - -Currently we add padding between the bootconfig text and footer to -ensure that the footer is aligned within the initramfs image. -However, because only the bootconfig data is held in memory, not the -full initramfs image, the footer may not be naturally aligned in -memory. - -This can result in an alignment fault (SIGBUS) when writing the footer -on some architectures, such as sparc. - -Build the footer in a struct on the stack before adding it to the -buffer. - -References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sparc64&ver=6.16%7Erc7-1%7Eexp1&stamp=1753209801&raw=0 -Link: https://lore.kernel.org/all/aIC-NTw-cdm9ZGFw@decadent.org.uk/ - -Signed-off-by: Ben Hutchings -Signed-off-by: Masami Hiramatsu (Google) -Signed-off-by: Sasha Levin ---- - tools/bootconfig/main.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c -index 8a48cc2536f5..dce2d6ffcca5 100644 ---- a/tools/bootconfig/main.c -+++ b/tools/bootconfig/main.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - -@@ -359,7 +360,12 @@ static int delete_xbc(const char *path) - - static int apply_xbc(const char *path, const char *xbc_path) - { -- char *buf, *data, *p; -+ struct { -+ uint32_t size; -+ uint32_t csum; -+ char magic[BOOTCONFIG_MAGIC_LEN]; -+ } footer; -+ char *buf, *data; - size_t total_size; - struct stat stat; - const char *msg; -@@ -430,17 +436,13 @@ static int apply_xbc(const char *path, const char *xbc_path) - size += pad; - - /* Add a footer */ -- p = data + size; -- *(uint32_t *)p = htole32(size); -- p += sizeof(uint32_t); -+ footer.size = htole32(size); -+ footer.csum = htole32(csum); -+ memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); -+ memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); - -- *(uint32_t *)p = htole32(csum); -- p += sizeof(uint32_t); -- -- memcpy(p, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -- p += BOOTCONFIG_MAGIC_LEN; -- -- total_size = p - data; -+ total_size = size + BOOTCONFIG_FOOTER_SIZE; - - ret = write(fd, data, total_size); - if (ret < total_size) { --- -2.39.5 - diff --git a/queue-6.12/series b/queue-6.12/series index 978eef3333..a197d710bf 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -157,7 +157,6 @@ asoc-qcom-use-drvdata-instead-of-component-to-keep-i.patch netfilter-nft_set_pipapo-prefer-kvmalloc-for-scratch.patch selftests-netfilter-enable-config_inet_sctp_diag.patch powerpc-thp-tracing-hide-hugepage-events-under-confi.patch -bootconfig-fix-unaligned-access-when-building-footer.patch bluetooth-btusb-add-new-vid-pid-0489-e14e-for-mt7925.patch bluetooth-hci_sock-reset-cookie-to-zero-in-hci_sock_.patch xen-netfront-fix-tx-response-spurious-interrupts.patch diff --git a/queue-6.15/bootconfig-fix-unaligned-access-when-building-footer.patch b/queue-6.15/bootconfig-fix-unaligned-access-when-building-footer.patch deleted file mode 100644 index a7115ff1f6..0000000000 --- a/queue-6.15/bootconfig-fix-unaligned-access-when-building-footer.patch +++ /dev/null @@ -1,84 +0,0 @@ -From b66feb0b11757660ea003747d1ef9d0c79fd6913 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 23 Jul 2025 12:49:25 +0200 -Subject: bootconfig: Fix unaligned access when building footer - -From: Ben Hutchings - -[ Upstream commit 6ed5e20466c79e3b3350bae39f678f73cf564b4e ] - -Currently we add padding between the bootconfig text and footer to -ensure that the footer is aligned within the initramfs image. -However, because only the bootconfig data is held in memory, not the -full initramfs image, the footer may not be naturally aligned in -memory. - -This can result in an alignment fault (SIGBUS) when writing the footer -on some architectures, such as sparc. - -Build the footer in a struct on the stack before adding it to the -buffer. - -References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sparc64&ver=6.16%7Erc7-1%7Eexp1&stamp=1753209801&raw=0 -Link: https://lore.kernel.org/all/aIC-NTw-cdm9ZGFw@decadent.org.uk/ - -Signed-off-by: Ben Hutchings -Signed-off-by: Masami Hiramatsu (Google) -Signed-off-by: Sasha Levin ---- - tools/bootconfig/main.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c -index 8a48cc2536f5..dce2d6ffcca5 100644 ---- a/tools/bootconfig/main.c -+++ b/tools/bootconfig/main.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - -@@ -359,7 +360,12 @@ static int delete_xbc(const char *path) - - static int apply_xbc(const char *path, const char *xbc_path) - { -- char *buf, *data, *p; -+ struct { -+ uint32_t size; -+ uint32_t csum; -+ char magic[BOOTCONFIG_MAGIC_LEN]; -+ } footer; -+ char *buf, *data; - size_t total_size; - struct stat stat; - const char *msg; -@@ -430,17 +436,13 @@ static int apply_xbc(const char *path, const char *xbc_path) - size += pad; - - /* Add a footer */ -- p = data + size; -- *(uint32_t *)p = htole32(size); -- p += sizeof(uint32_t); -+ footer.size = htole32(size); -+ footer.csum = htole32(csum); -+ memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); -+ memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); - -- *(uint32_t *)p = htole32(csum); -- p += sizeof(uint32_t); -- -- memcpy(p, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -- p += BOOTCONFIG_MAGIC_LEN; -- -- total_size = p - data; -+ total_size = size + BOOTCONFIG_FOOTER_SIZE; - - ret = write(fd, data, total_size); - if (ret < total_size) { --- -2.39.5 - diff --git a/queue-6.15/series b/queue-6.15/series index 4ad06163c9..6132353c0c 100644 --- a/queue-6.15/series +++ b/queue-6.15/series @@ -186,7 +186,6 @@ netfilter-nft_set_pipapo-prefer-kvmalloc-for-scratch.patch selftests-netfilter-enable-config_inet_sctp_diag.patch powerpc-thp-tracing-hide-hugepage-events-under-confi.patch verification-dot2k-make-a-separate-dot2k_templates-k.patch -bootconfig-fix-unaligned-access-when-building-footer.patch bluetooth-btusb-add-new-vid-pid-0489-e14e-for-mt7925.patch bluetooth-hci_event-add-support-for-handling-le-big-.patch bluetooth-hci_sock-reset-cookie-to-zero-in-hci_sock_.patch diff --git a/queue-6.16/bootconfig-fix-unaligned-access-when-building-footer.patch b/queue-6.16/bootconfig-fix-unaligned-access-when-building-footer.patch deleted file mode 100644 index 77ee8fdde2..0000000000 --- a/queue-6.16/bootconfig-fix-unaligned-access-when-building-footer.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 56515a9278e8f1f77f4abc8e8eb7672fbe23a610 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 23 Jul 2025 12:49:25 +0200 -Subject: bootconfig: Fix unaligned access when building footer - -From: Ben Hutchings - -[ Upstream commit 6ed5e20466c79e3b3350bae39f678f73cf564b4e ] - -Currently we add padding between the bootconfig text and footer to -ensure that the footer is aligned within the initramfs image. -However, because only the bootconfig data is held in memory, not the -full initramfs image, the footer may not be naturally aligned in -memory. - -This can result in an alignment fault (SIGBUS) when writing the footer -on some architectures, such as sparc. - -Build the footer in a struct on the stack before adding it to the -buffer. - -References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sparc64&ver=6.16%7Erc7-1%7Eexp1&stamp=1753209801&raw=0 -Link: https://lore.kernel.org/all/aIC-NTw-cdm9ZGFw@decadent.org.uk/ - -Signed-off-by: Ben Hutchings -Signed-off-by: Masami Hiramatsu (Google) -Signed-off-by: Sasha Levin ---- - tools/bootconfig/main.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c -index 8a48cc2536f5..dce2d6ffcca5 100644 ---- a/tools/bootconfig/main.c -+++ b/tools/bootconfig/main.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - -@@ -359,7 +360,12 @@ static int delete_xbc(const char *path) - - static int apply_xbc(const char *path, const char *xbc_path) - { -- char *buf, *data, *p; -+ struct { -+ uint32_t size; -+ uint32_t csum; -+ char magic[BOOTCONFIG_MAGIC_LEN]; -+ } footer; -+ char *buf, *data; - size_t total_size; - struct stat stat; - const char *msg; -@@ -430,17 +436,13 @@ static int apply_xbc(const char *path, const char *xbc_path) - size += pad; - - /* Add a footer */ -- p = data + size; -- *(uint32_t *)p = htole32(size); -- p += sizeof(uint32_t); -+ footer.size = htole32(size); -+ footer.csum = htole32(csum); -+ memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); -+ memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); - -- *(uint32_t *)p = htole32(csum); -- p += sizeof(uint32_t); -- -- memcpy(p, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -- p += BOOTCONFIG_MAGIC_LEN; -- -- total_size = p - data; -+ total_size = size + BOOTCONFIG_FOOTER_SIZE; - - ret = write(fd, data, total_size); - if (ret < total_size) { --- -2.39.5 - diff --git a/queue-6.16/series b/queue-6.16/series index 58e0327dc9..bb1a9c84ff 100644 --- a/queue-6.16/series +++ b/queue-6.16/series @@ -202,7 +202,6 @@ netfilter-nft_set_pipapo-prefer-kvmalloc-for-scratch.patch selftests-netfilter-enable-config_inet_sctp_diag.patch powerpc-thp-tracing-hide-hugepage-events-under-confi.patch verification-dot2k-make-a-separate-dot2k_templates-k.patch -bootconfig-fix-unaligned-access-when-building-footer.patch bluetooth-btusb-add-new-vid-pid-0489-e14e-for-mt7925.patch bluetooth-hci_event-add-support-for-handling-le-big-.patch bluetooth-hci_sock-reset-cookie-to-zero-in-hci_sock_.patch diff --git a/queue-6.6/bootconfig-fix-unaligned-access-when-building-footer.patch b/queue-6.6/bootconfig-fix-unaligned-access-when-building-footer.patch deleted file mode 100644 index 00e95b8e37..0000000000 --- a/queue-6.6/bootconfig-fix-unaligned-access-when-building-footer.patch +++ /dev/null @@ -1,84 +0,0 @@ -From d572d3efbf3b9e703ed222291b49b020d4e47fe5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 23 Jul 2025 12:49:25 +0200 -Subject: bootconfig: Fix unaligned access when building footer - -From: Ben Hutchings - -[ Upstream commit 6ed5e20466c79e3b3350bae39f678f73cf564b4e ] - -Currently we add padding between the bootconfig text and footer to -ensure that the footer is aligned within the initramfs image. -However, because only the bootconfig data is held in memory, not the -full initramfs image, the footer may not be naturally aligned in -memory. - -This can result in an alignment fault (SIGBUS) when writing the footer -on some architectures, such as sparc. - -Build the footer in a struct on the stack before adding it to the -buffer. - -References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sparc64&ver=6.16%7Erc7-1%7Eexp1&stamp=1753209801&raw=0 -Link: https://lore.kernel.org/all/aIC-NTw-cdm9ZGFw@decadent.org.uk/ - -Signed-off-by: Ben Hutchings -Signed-off-by: Masami Hiramatsu (Google) -Signed-off-by: Sasha Levin ---- - tools/bootconfig/main.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c -index 8a48cc2536f5..dce2d6ffcca5 100644 ---- a/tools/bootconfig/main.c -+++ b/tools/bootconfig/main.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include - -@@ -359,7 +360,12 @@ static int delete_xbc(const char *path) - - static int apply_xbc(const char *path, const char *xbc_path) - { -- char *buf, *data, *p; -+ struct { -+ uint32_t size; -+ uint32_t csum; -+ char magic[BOOTCONFIG_MAGIC_LEN]; -+ } footer; -+ char *buf, *data; - size_t total_size; - struct stat stat; - const char *msg; -@@ -430,17 +436,13 @@ static int apply_xbc(const char *path, const char *xbc_path) - size += pad; - - /* Add a footer */ -- p = data + size; -- *(uint32_t *)p = htole32(size); -- p += sizeof(uint32_t); -+ footer.size = htole32(size); -+ footer.csum = htole32(csum); -+ memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); -+ memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); - -- *(uint32_t *)p = htole32(csum); -- p += sizeof(uint32_t); -- -- memcpy(p, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); -- p += BOOTCONFIG_MAGIC_LEN; -- -- total_size = p - data; -+ total_size = size + BOOTCONFIG_FOOTER_SIZE; - - ret = write(fd, data, total_size); - if (ret < total_size) { --- -2.39.5 - diff --git a/queue-6.6/series b/queue-6.6/series index e96ee69f3d..a5b8652f05 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -137,7 +137,6 @@ iio-adc-ad7768-1-ensure-sync_in-pulse-minimum-timing.patch asoc-codecs-rt5640-retry-device_id-verification.patch asoc-qcom-use-drvdata-instead-of-component-to-keep-i.patch powerpc-thp-tracing-hide-hugepage-events-under-confi.patch -bootconfig-fix-unaligned-access-when-building-footer.patch bluetooth-hci_sock-reset-cookie-to-zero-in-hci_sock_.patch xen-netfront-fix-tx-response-spurious-interrupts.patch net-usb-cdc-ncm-check-for-filtering-capability.patch