Thread (32 messages) flat view 32 messages, 6 authors, 2018-11-20

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

From: Jann Horn <jannh@google.com>
Date: 2018-10-05 21:11:48
Also in: linux-api

On Fri, Oct 5, 2018 at 9:42 AM Lorenz Bauer [off-list ref] wrote:
On Tue, 2 Oct 2018 at 21:00, Jann Horn [off-list ref] wrote:
quoted
If this is for testing only, you can slap a capable(CAP_SYS_ADMIN)
check in here, right? I doubt it matters, but I don't really like
seeing something like this exposed to unprivileged userspace just
because you need it for kernel testing.
That would mean all tests have to run as root / with CAP_SYS_ADMIN
which isn't ideal.
This patch basically means that it becomes easier for a local user to
construct a BPF hash table that has all of its values stuffed into a
single hash bucket, correct? Which makes it easier to create a BPF
program that generates unusually large RCU stalls by performing ~40000
BPF map lookups, each of which has to walk through the entire linked
list of the hash map bucket? I dislike exposing something like that to
unprivileged userspace.

And if you want to run the whole BPF test suite with all its tests,
don't you already need root privileges? Or is this a different test
suite?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help