Re: [PATCH v2 bpf-next 00/20] bpf: Introduce BPF arena.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12.02.24 19:14, Alexei Starovoitov wrote:
On Mon, Feb 12, 2024 at 6:14 AM David Hildenbrand <david@xxxxxxxxxx> wrote:

How easy is this to access+use by unprivileged userspace?

not possible. bpf arena requires cap_bpf + cap_perfmon.

arena_vm_fault() seems to allocate new pages simply via
alloc_page(GFP_KERNEL | __GFP_ZERO); No memory accounting, mlock limit
checks etc.

Right. That's a bug. As Kumar commented on the patch 5 that it needs to
move to memcg accounting the way we do for all other maps.
It will be very similar to bpf_map_kmalloc_node().


Great, thanks!

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux