Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thorsten Blum and committed by
Keith Busch
fa655a9c 0375c81e

+1 -1
+1 -1
include/linux/nvme-auth.h
··· 11 11 struct nvme_dhchap_key { 12 12 size_t len; 13 13 u8 hash; 14 - u8 key[]; 14 + u8 key[] __counted_by(len); 15 15 }; 16 16 17 17 u32 nvme_auth_get_seqnum(void);