]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop dependent erofs follow-up after dropping 307210c262a2
authorSasha Levin <sashal@kernel.org>
Thu, 21 May 2026 13:06:56 +0000 (09:06 -0400)
committerSasha Levin <sashal@kernel.org>
Thu, 21 May 2026 13:08:29 +0000 (09:08 -0400)
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 <sashal@kernel.org>
queue-6.12/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch [deleted file]
queue-6.12/series
queue-6.18/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch [deleted file]
queue-6.18/series
queue-7.0/erofs-fix-offset-truncation-when-shifting-pgoff-on-3.patch [deleted file]
queue-7.0/series

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 (file)
index 3a40e47..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 387c953cfa5407191c1f7bca3731d349f6284cdb Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 20 Apr 2026 11:46:12 +0800
-Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms
-
-From: Gao Xiang <hsiangkao@linux.alibaba.com>
-
-[ 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 <chao@kernel.org>
-Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index 31cbb3b6c68c591dee63948cf37f7e564567e9b0..f252d3f8c5a80551a226239926e0804c486f6e49 100644 (file)
@@ -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 (file)
index b64dea7..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From bde9bd5168c48a6040f3f57af74fc23dd917ee26 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 20 Apr 2026 11:46:12 +0800
-Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms
-
-From: Gao Xiang <hsiangkao@linux.alibaba.com>
-
-[ 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 <chao@kernel.org>
-Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index e76316679294f15a18158c10004fa694beee82f3..7f84d10927b17af0da1178ea27fb5eb7cbe04b54 100644 (file)
@@ -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 (file)
index 60f2712..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 145e38f862063694f3a0f2903496726af5014411 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 20 Apr 2026 11:46:12 +0800
-Subject: erofs: fix offset truncation when shifting pgoff on 32-bit platforms
-
-From: Gao Xiang <hsiangkao@linux.alibaba.com>
-
-[ 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 <chao@kernel.org>
-Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index a8501e928e4ffbb406e12c80dbe084d91c28b0d1..e190723c5eaa302379213f567b2a0a2a4993be23 100644 (file)
@@ -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