Re: [PATCH] hw/cxl: fix uint32 overflow cxl-mailbox-utils.c

2024-09-17 Thread Jonathan Cameron via
On Tue, 17 Sep 2024 11:09:16 +0300 Dmitry Frolov wrote: > The sum offset + length may overflow uint32. Since this sum is > compared with uint64_t return value of get_lsa_size(), it makes > sense to choose uint64_t type for offset and length. > > Found by Linux Verification Center (linuxtesting.o

[PATCH] hw/cxl: fix uint32 overflow cxl-mailbox-utils.c

2024-09-17 Thread Dmitry Frolov
The sum offset + length may overflow uint32. Since this sum is compared with uint64_t return value of get_lsa_size(), it makes sense to choose uint64_t type for offset and length. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Frolov --- hw/cxl/cxl-mailb