[Bug 279684] ctld truncates LUN size to 4GiB on 32-bit platforms
Date: Tue, 11 Jun 2024 16:31:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279684 Bug ID: 279684 Summary: ctld truncates LUN size to 4GiB on 32-bit platforms Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org The ctld.conf file allows specifying the size of a LUN. It's required for ramdisk-backed LUNs, and optional for block-backed LUNs. In traditional mode it's parsed as a uin64_t. In UCL mode, it's parsed as an int64_t. That's a little bit inconsistent, but not bad. The bad part is that it then gets truncated by being passed to lun_set_size, which takes its argument as a usize. That's a bug on 32-bit platforms. The solution is to always handle the size as a uint64_t, which is ultimately what the kernel expects. -- You are receiving this mail because: You are the assignee for the bug.