On Fri, Sep 27, 2024 at 04:03:36PM +0800, Pu Lehui wrote:
On 2024/9/27 15:56, Greg Kroah-Hartman wrote:
On Fri, Sep 20, 2024 at 10:39:50AM +0000, Pu Lehui wrote:
From: Pu Lehui pulehui@huawei.com
Commit 70294d8bc31f ("bpf: Eliminate rlimit-based memory accounting for devmap maps") relies on the v5.11+ basic mechanism of memcg-based memory accounting [0]. The commit cannot be independently backported to the 5.10 stable branch, otherwise the related memory when creating devmap will be unrestricted and the associated bpf selftest map_ptr will fail. Let's roll back to rlimit-based memory accounting mode for devmap and re-adapt the commit 225da02acdc9 ("bpf: Fix DEVMAP_HASH overflow check on 32-bit arches") to the 5.10 stable branch.
Link: https://lore.kernel.org/bpf/20201201215900.3569844-1-guro@fb.com [0] Fixes: 225da02acdc9 ("bpf: Fix DEVMAP_HASH overflow check on 32-bit arches") Fixes: 70294d8bc31f ("bpf: Eliminate rlimit-based memory accounting for devmap maps")
Should we just revert these changes instead?
Yes, Greg. My patch is to revert these two commits and re-adapt commit 225da02acdc9 ("bpf: Fix DEVMAP_HASH overflow check on 32-bit arches").
Shall we need to split this patch into multiple patches?
Yes, please do so.