From: Sasha Levin Date: Thu, 21 May 2026 13:06:56 +0000 (-0400) Subject: drop dependent erofs follow-up after dropping 307210c262a2 X-Git-Tag: v6.6.141~21^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=63b993ff88214ab8b416227a6903bb4c8c4d13d6;p=thirdparty%2Fkernel%2Fstable-queue.git drop dependent erofs follow-up after dropping 307210c262a2 In d3dd531213 we dropped "erofs: verify metadata accesses for file-backed mounts" (upstream 307210c262a2) per Gao Xiang's request (Android SELinux regression). The follow-up: "erofs: fix offset truncation when shifting pgoff on 32-bit platforms" (upstream c99493ce409c) is queued in 7.0/6.18/6.12 and carries Fixes: 307210c262a2 ("erofs: verify metadata accesses for file-backed mounts") Its data.c hunk converts fpos = index << PAGE_SHIFT; err = rw_verify_area(READ, buf->file, &fpos, PAGE_SIZE); to use a (loff_t) cast on the shift. That entire rw_verify_area() block was introduced by 307210c262a2, which is no longer in the queue or in the corresponding stable bases (stable/linux-{7.0,6.18,6.12}.y do not contain rw_verify_area in fs/erofs/data.c). The hunk cannot apply. Drop the follow-up from queue-7.0, queue-6.18, and queue-6.12. Signed-off-by: Sasha Levin --- diff --git a/queue-6.12/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch b/queue-6.12/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch deleted file mode 100644 index 3a40e479aa..0000000000 --- a/queue-6.12/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 387c953cfa5407191c1f7bca3731d349f6284cdb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 20 Apr 2026 11:46:12 +0800 -Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms - -From: Gao Xiang - -[ Upstream commit c99493ce409c3b98fec1616dbcf24c102e006deb ] - -On 32-bit platforms, pgoff_t is 32 bits wide, so left-shifting -large arbitrary pgoff_t values by PAGE_SHIFT performs 32-bit arithmetic -and silently truncates the result for pages beyond the 4 GiB boundary. - -Cast the page index to loff_t before shifting to produce a correct -64-bit byte offset. - -Fixes: 386292919c25 ("erofs: introduce readmore decompression strategy") -Fixes: 307210c262a2 ("erofs: verify metadata accesses for file-backed mounts") -Reviewed-by: Chao Yu -Signed-off-by: Gao Xiang -Signed-off-by: Sasha Levin ---- - fs/erofs/data.c | 2 +- - fs/erofs/zdata.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fs/erofs/data.c b/fs/erofs/data.c -index 192c7ed885acd..21476bd6ae9de 100644 ---- a/fs/erofs/data.c -+++ b/fs/erofs/data.c -@@ -39,7 +39,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, - * However, the data access range must be verified here in advance. - */ - if (buf->file) { -- fpos = index << PAGE_SHIFT; -+ fpos = (loff_t)index << PAGE_SHIFT; - err = rw_verify_area(READ, buf->file, &fpos, PAGE_SIZE); - if (err < 0) - return ERR_PTR(err); -diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c -index a81b6e6aee59a..e438b8c9bf03b 100644 ---- a/fs/erofs/zdata.c -+++ b/fs/erofs/zdata.c -@@ -1853,7 +1853,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_frontend *f, - - if (cur < PAGE_SIZE) - break; -- cur = (index << PAGE_SHIFT) - 1; -+ cur = ((loff_t)index << PAGE_SHIFT) - 1; - } - } - --- -2.53.0 - diff --git a/queue-6.12/series b/queue-6.12/series index 31cbb3b6c6..f252d3f8c5 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -593,7 +593,6 @@ smb-client-fix-oob-reads-parsing-symlink-error-respo.patch loongarch-kvm-compile-switch.s-directly-into-the-ker.patch ntfs-d_compare-must-not-block.patch pci-initialize-temporary-device-in-new_id_store.patch -erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch net-bcmgenet-initialize-u64-stats-seq-counter.patch net-bcmgenet-fix-leaking-free_bds.patch iommu-amd-reorder-attach-device-code.patch diff --git a/queue-6.18/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch b/queue-6.18/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch deleted file mode 100644 index b64dea7fee..0000000000 --- a/queue-6.18/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch +++ /dev/null @@ -1,55 +0,0 @@ -From bde9bd5168c48a6040f3f57af74fc23dd917ee26 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 20 Apr 2026 11:46:12 +0800 -Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms - -From: Gao Xiang - -[ Upstream commit c99493ce409c3b98fec1616dbcf24c102e006deb ] - -On 32-bit platforms, pgoff_t is 32 bits wide, so left-shifting -large arbitrary pgoff_t values by PAGE_SHIFT performs 32-bit arithmetic -and silently truncates the result for pages beyond the 4 GiB boundary. - -Cast the page index to loff_t before shifting to produce a correct -64-bit byte offset. - -Fixes: 386292919c25 ("erofs: introduce readmore decompression strategy") -Fixes: 307210c262a2 ("erofs: verify metadata accesses for file-backed mounts") -Reviewed-by: Chao Yu -Signed-off-by: Gao Xiang -Signed-off-by: Sasha Levin ---- - fs/erofs/data.c | 2 +- - fs/erofs/zdata.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fs/erofs/data.c b/fs/erofs/data.c -index 58aea2b48580c..d685ee1d9c554 100644 ---- a/fs/erofs/data.c -+++ b/fs/erofs/data.c -@@ -38,7 +38,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, bool need_kmap) - * However, the data access range must be verified here in advance. - */ - if (buf->file) { -- fpos = index << PAGE_SHIFT; -+ fpos = (loff_t)index << PAGE_SHIFT; - err = rw_verify_area(READ, buf->file, &fpos, PAGE_SIZE); - if (err < 0) - return ERR_PTR(err); -diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c -index 71f01f0a07435..0f09f3ba32149 100644 ---- a/fs/erofs/zdata.c -+++ b/fs/erofs/zdata.c -@@ -1869,7 +1869,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_frontend *f, - - if (cur < PAGE_SIZE) - break; -- cur = (index << PAGE_SHIFT) - 1; -+ cur = ((loff_t)index << PAGE_SHIFT) - 1; - } - } - --- -2.53.0 - diff --git a/queue-6.18/series b/queue-6.18/series index e763166792..7f84d10927 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -858,7 +858,6 @@ futex-drop-clone_thread-requirement-for-private-defa.patch revert-pseries-papr-hvpipe-fix-race-with-interrupt-h.patch revert-papr-hvpipe-convert-papr_hvpipe_dev_create_ha.patch pci-initialize-temporary-device-in-new_id_store.patch -erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch bpf-fix-sync_linked_regs-regarding-bpf_add_const32-z.patch net-airoha-fix-a-copy-and-paste-bug-in-probe.patch fuse-fix-race-when-disposing-stale-dentries.patch diff --git a/queue-7.0/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch b/queue-7.0/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch deleted file mode 100644 index 60f2712f10..0000000000 --- a/queue-7.0/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 145e38f862063694f3a0f2903496726af5014411 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 20 Apr 2026 11:46:12 +0800 -Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms - -From: Gao Xiang - -[ Upstream commit c99493ce409c3b98fec1616dbcf24c102e006deb ] - -On 32-bit platforms, pgoff_t is 32 bits wide, so left-shifting -large arbitrary pgoff_t values by PAGE_SHIFT performs 32-bit arithmetic -and silently truncates the result for pages beyond the 4 GiB boundary. - -Cast the page index to loff_t before shifting to produce a correct -64-bit byte offset. - -Fixes: 386292919c25 ("erofs: introduce readmore decompression strategy") -Fixes: 307210c262a2 ("erofs: verify metadata accesses for file-backed mounts") -Reviewed-by: Chao Yu -Signed-off-by: Gao Xiang -Signed-off-by: Sasha Levin ---- - fs/erofs/data.c | 2 +- - fs/erofs/zdata.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fs/erofs/data.c b/fs/erofs/data.c -index 132a27deb2f3b..b2c12c5856acc 100644 ---- a/fs/erofs/data.c -+++ b/fs/erofs/data.c -@@ -39,7 +39,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, bool need_kmap) - * However, the data access range must be verified here in advance. - */ - if (buf->file) { -- fpos = index << PAGE_SHIFT; -+ fpos = (loff_t)index << PAGE_SHIFT; - err = rw_verify_area(READ, buf->file, &fpos, PAGE_SIZE); - if (err < 0) - return ERR_PTR(err); -diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c -index fe8121df9ef2f..624b83ff4ecb7 100644 ---- a/fs/erofs/zdata.c -+++ b/fs/erofs/zdata.c -@@ -1874,7 +1874,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_frontend *f, - - if (cur < PAGE_SIZE) - break; -- cur = (index << PAGE_SHIFT) - 1; -+ cur = ((loff_t)index << PAGE_SHIFT) - 1; - } - } - --- -2.53.0 - diff --git a/queue-7.0/series b/queue-7.0/series index a8501e928e..e190723c5e 100644 --- a/queue-7.0/series +++ b/queue-7.0/series @@ -739,7 +739,6 @@ crypto-eip93-fix-hmac-setkey-algo-selection.patch crypto-sa2ul-fix-aead-fallback-algorithm-names.patch crypto-ccp-copy-iv-using-skcipher-ivsize.patch sh-include-linux-io.h-in-dac.h.patch -erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch erofs-unify-lcn-as-u64-for-32-bit-platforms.patch tools-hv-fix-cross-compilation.patch drivers-hv-vmbus-fix-hyperv_cpuhp_online-variable-sh.patch