From: Greg Kroah-Hartman Date: Sat, 30 Mar 2024 09:51:21 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v6.7.12~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=645f4967d5997dbed1d00b09fbeb5af028a5dfb5;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: btrfs-zoned-use-zone-aware-sb-location-for-scrub.patch exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch hexagon-vmlinux.lds.s-handle-attributes-section.patch mmc-core-avoid-negative-index-with-array-access.patch mmc-core-initialize-mmc_blk_ioc_data.patch net-ll_temac-platform_get_resource-replaced-by-wrong-function.patch wifi-mac80211-check-clear-fast-rx-for-non-4addr-sta-vlan-changes.patch --- diff --git a/queue-5.15/btrfs-zoned-use-zone-aware-sb-location-for-scrub.patch b/queue-5.15/btrfs-zoned-use-zone-aware-sb-location-for-scrub.patch new file mode 100644 index 00000000000..4ee5b0e4c66 --- /dev/null +++ b/queue-5.15/btrfs-zoned-use-zone-aware-sb-location-for-scrub.patch @@ -0,0 +1,52 @@ +From 74098a989b9c3370f768140b7783a7aaec2759b3 Mon Sep 17 00:00:00 2001 +From: Johannes Thumshirn +Date: Mon, 26 Feb 2024 16:39:13 +0100 +Subject: btrfs: zoned: use zone aware sb location for scrub + +From: Johannes Thumshirn + +commit 74098a989b9c3370f768140b7783a7aaec2759b3 upstream. + +At the moment scrub_supers() doesn't grab the super block's location via +the zoned device aware btrfs_sb_log_location() but via btrfs_sb_offset(). + +This leads to checksum errors on 'scrub' as we're not accessing the +correct location of the super block. + +So use btrfs_sb_log_location() for getting the super blocks location on +scrub. + +Reported-by: WA AM +Link: http://lore.kernel.org/linux-btrfs/CANU2Z0EvUzfYxczLgGUiREoMndE9WdQnbaawV5Fv5gNXptPUKw@mail.gmail.com +CC: stable@vger.kernel.org # 5.15+ +Reviewed-by: Qu Wenruo +Reviewed-by: Naohiro Aota +Signed-off-by: Johannes Thumshirn +Reviewed-by: David Sterba +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/scrub.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/fs/btrfs/scrub.c ++++ b/fs/btrfs/scrub.c +@@ -3972,7 +3972,17 @@ static noinline_for_stack int scrub_supe + gen = fs_info->last_trans_committed; + + for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) { +- bytenr = btrfs_sb_offset(i); ++ ret = btrfs_sb_log_location(scrub_dev, i, 0, &bytenr); ++ if (ret == -ENOENT) ++ break; ++ ++ if (ret) { ++ spin_lock(&sctx->stat_lock); ++ sctx->stat.super_errors++; ++ spin_unlock(&sctx->stat_lock); ++ continue; ++ } ++ + if (bytenr + BTRFS_SUPER_INFO_SIZE > + scrub_dev->commit_total_bytes) + break; diff --git a/queue-5.15/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch b/queue-5.15/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch new file mode 100644 index 00000000000..a348225d315 --- /dev/null +++ b/queue-5.15/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch @@ -0,0 +1,42 @@ +From 2aea94ac14d1e0a8ae9e34febebe208213ba72f7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Wed, 20 Mar 2024 11:26:07 -0700 +Subject: exec: Fix NOMMU linux_binprm::exec in transfer_args_to_stack() + +From: Max Filippov + +commit 2aea94ac14d1e0a8ae9e34febebe208213ba72f7 upstream. + +In NOMMU kernel the value of linux_binprm::p is the offset inside the +temporary program arguments array maintained in separate pages in the +linux_binprm::page. linux_binprm::exec being a copy of linux_binprm::p +thus must be adjusted when that array is copied to the user stack. +Without that adjustment the value passed by the NOMMU kernel to the ELF +program in the AT_EXECFN entry of the aux array doesn't make any sense +and it may break programs that try to access memory pointed to by that +entry. + +Adjust linux_binprm::exec before the successful return from the +transfer_args_to_stack(). + +Cc: +Fixes: b6a2fea39318 ("mm: variable length argument support") +Fixes: 5edc2a5123a7 ("binfmt_elf_fdpic: wire up AT_EXECFD, AT_EXECFN, AT_SECURE") +Signed-off-by: Max Filippov +Link: https://lore.kernel.org/r/20240320182607.1472887-1-jcmvbkbc@gmail.com +Signed-off-by: Kees Cook +Signed-off-by: Greg Kroah-Hartman +--- + fs/exec.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -888,6 +888,7 @@ int transfer_args_to_stack(struct linux_ + goto out; + } + ++ bprm->exec += *sp_location - MAX_ARG_PAGES * PAGE_SIZE; + *sp_location = sp; + + out: diff --git a/queue-5.15/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch b/queue-5.15/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch new file mode 100644 index 00000000000..6dc258031d4 --- /dev/null +++ b/queue-5.15/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch @@ -0,0 +1,126 @@ +From b34490879baa847d16fc529c8ea6e6d34f004b38 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Mon, 25 Mar 2024 10:02:42 +0100 +Subject: gpio: cdev: sanitize the label before requesting the interrupt + +From: Bartosz Golaszewski + +commit b34490879baa847d16fc529c8ea6e6d34f004b38 upstream. + +When an interrupt is requested, a procfs directory is created under +"/proc/irq//