]> dgit.raspbian.org Git - grub2.git/commit
fs/jfs: Use full 40 bits offset and address for a data extent
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:39 +0000 (20:22 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 30 Apr 2026 19:02:01 +0000 (21:02 +0200)
commitc81623665b31a6697eb319b2e325ea97300a6e7c
treee8ba793f88f6bd4e2ec0afb238abc6021fc97dff
parent9622cb3420a9f065a47d1cdc32269cd04fb5ed2c
fs/jfs: Use full 40 bits offset and address for a data extent

An extent's logical offset and address are represented as a 40-bit value
split into two parts: the most significant 8 bits and the least
significant 32 bits. Currently the JFS code uses only the least
significant 32 bits value for offsets and addresses assuming the data
size will never exceed the 32-bit range. This approach ignores the most
significant 8 bits potentially leading to incorrect offsets and
addresses for larger values. The patch fixes it by incorporating the
most significant 8 bits into the calculation to get the full 40-bits
value for offsets and addresses.

https://jfs.sourceforge.net/project/pub/jfslayout.pdf

  "off1,off2 is a 40-bit field, containing the logical offset of the first
   block in the extent.
   ...
   addr1,addr2 is a 40-bit field, containing the address of the extent."

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-jfs-Use-full-40-bits-offset-and-address-for-a-data-ext.patch
grub-core/fs/jfs.c