]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm: restrict dm device size to 2^63-512 bytes
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 14 Mar 2025 12:51:32 +0000 (13:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:06 +0000 (14:40 +0200)
commit6d974bd69249d74899a62f9143f51468a0d18683
tree93924b736adbb200705f5fdbe4c35e566558fe2a
parent3b5cc6e49c69d8e4dfc19ebc6386a1310ff19eb2
dm: restrict dm device size to 2^63-512 bytes

[ Upstream commit 45fc728515c14f53f6205789de5bfd72a95af3b8 ]

The devices with size >= 2^63 bytes can't be used reliably by userspace
because the type off_t is a signed 64-bit integer.

Therefore, we limit the maximum size of a device mapper device to
2^63-512 bytes.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-table.c