Date: Tue, 11 Jun 2024 16:31:01 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 279684] ctld truncates LUN size to 4GiB on 32-bit platforms Message-ID: <bug-279684-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279684 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 mo= de 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 us= ize. 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. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279684-227>