mbox series

[5.10,v2,0/3] Re-adapt "bpf: Fix DEVMAP_HASH overflow check on 32-bit arches"

Message ID 20240927135118.1432057-1-pulehui@huaweicloud.com (mailing list archive)
Headers show
Series Re-adapt "bpf: Fix DEVMAP_HASH overflow check on 32-bit arches" | expand

Message

Pu Lehui Sept. 27, 2024, 1:51 p.m. UTC
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]

Pu Lehui (2):
  Revert "bpf: Fix DEVMAP_HASH overflow check on 32-bit arches"
  Revert "bpf: Eliminate rlimit-based memory accounting for devmap maps"

Toke Høiland-Jørgensen (1):
  bpf: Fix DEVMAP_HASH overflow check on 32-bit arches

 kernel/bpf/devmap.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

Comments

Greg KH Oct. 1, 2024, 8:09 a.m. UTC | #1
On Fri, Sep 27, 2024 at 01:51:15PM +0000, Pu Lehui wrote:
> 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]
> 
> Pu Lehui (2):
>   Revert "bpf: Fix DEVMAP_HASH overflow check on 32-bit arches"
>   Revert "bpf: Eliminate rlimit-based memory accounting for devmap maps"
> 
> Toke Høiland-Jørgensen (1):
>   bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
> 
>  kernel/bpf/devmap.c | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

Now queud up, thanks.

greg k-h