diff options
author | Eric Biggers <[email protected]> | 2022-12-23 12:36:28 -0800 |
---|---|---|
committer | Eric Biggers <[email protected]> | 2023-01-09 19:05:47 -0800 |
commit | 284d5db5f99efa9e3549eb3cba39379d48879db1 (patch) | |
tree | 992acc4d74a9accc0bdbb1f73b0b4ac2d311346e /scripts/gdb/linux/modules.py | |
parent | 86f66569baca98478b7ff2f49c8ee54cf3b108cd (diff) |
fsverity: use unsigned long for level_start
fs/verity/ isn't consistent with whether Merkle tree block indices are
'unsigned long' or 'u64'. There's no real point to using u64 for them,
though, since (a) a Merkle tree with over ULONG_MAX blocks would only be
needed for a file larger than MAX_LFS_FILESIZE, and (b) for reads, the
status of all Merkle tree blocks has to be tracked in memory.
Therefore, let's make things a bit more efficient on 32-bit systems by
using 'unsigned long[]' for merkle_tree_params::level_start, instead of
'u64[]'. Also, to be extra safe, explicitly check that there aren't
more than ULONG_MAX Merkle tree blocks.
Signed-off-by: Eric Biggers <[email protected]>
Reviewed-by: Andrey Albershteyn <[email protected]>
Tested-by: Ojaswin Mujoo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions