PCI: Bounds-check command-line resource alignment requests
stable inclusion from stable-5.10.4 commit 3ce25814038050fa21b81d6ec55d1d4d59175b1a bugzilla: 46903 -------------------------------- [ Upstream commit 6534aac1 ] 32-bit BARs are limited to 2GB size (2^31). By extension, I assume 64-bit BARs are limited to 2^63 bytes. Limit the alignment requested by the "pci=resource_alignment=" command-line parameter to 2^63. Link: https://lore.kernel.org/r/20201007123045.GS4282@kadamReported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录