net: ipa: fix assumptions about DMA address size
stable inclusion from stable-v5.10.146 commit c2cf0613d1ff43623f07c969357083aec4c15637 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0VX Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c2cf0613d1ff43623f07c969357083aec4c15637 -------------------------------- [ Upstream commit d2fd2311 ] Some build time checks in ipa_table_validate_build() assume that a DMA address is 64 bits wide. That is more restrictive than it has to be. A route or filter table is 64 bits wide no matter what the size of a DMA address is on the AP. The code actually uses a pointer to __le64 to access table entries, and a fixed constant IPA_TABLE_ENTRY_SIZE to describe the size of those entries. Loosen up two checks so they still verify some requirements, but such that they do not assume the size of a DMA address is 64 bits. Signed-off-by:Alex Elder <elder@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net> Stable-dep-of: cf412ec3 ("net: ipa: properly limit modem routing table use") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Jialin Zhang <zhangjialin11@huawei.com> Reviewed-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment