mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
dm-integrity: limit MAX_TAG_SIZE to 255
[ Upstream commit 77b8e6fbf9848d651f5cb7508f18ad0971f3ffdb ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
49bc40a559
commit
9eb265e5aa
|
@ -128,7 +128,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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user