mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
nvme: Annotate struct nvme_dhchap_key with __counted_by
Add the __counted_by() compiler attribute to the flexible array member 'key' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
0375c81eb2
commit
fa655a9ca7
|
|
@ -11,7 +11,7 @@
|
|||
struct nvme_dhchap_key {
|
||||
size_t len;
|
||||
u8 hash;
|
||||
u8 key[];
|
||||
u8 key[] __counted_by(len);
|
||||
};
|
||||
|
||||
u32 nvme_auth_get_seqnum(void);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user