projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1071d56
)
dm-integrity: limit MAX_TAG_SIZE to 255
author
Mikulas Patocka
<mpatocka@redhat.com>
Mon, 8 Sep 2025 13:52:02 +0000
(15:52 +0200)
committer
Mikulas Patocka
<mpatocka@redhat.com>
Mon, 8 Sep 2025 13:57:04 +0000
(15:57 +0200)
MAX_TAG_SIZE was 0x1a8 and it may be truncated in the "bi->metadata_size
= ic->tag_size" assignment. We need to limit it to 255.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-integrity.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-integrity.c
b/drivers/md/dm-integrity.c
index efeee0a873c0646235d6f221dfda9242f27b8ada..ab96b692e5a3eb9a52f5051d04fd139984261ba8 100644
(file)
--- a/
drivers/md/dm-integrity.c
+++ b/
drivers/md/dm-integrity.c
@@
-133,7
+133,7
@@
struct journal_sector {
commit_id_t commit_id;
};
-#define MAX_TAG_SIZE
(JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
+#define MAX_TAG_SIZE
255
#define METADATA_PADDING_SECTORS 8