netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] bpf: list all loaded ebpf programs in /proc/bpf/programs
@ 2017-04-26 18:24 Hannes Frederic Sowa
  2017-04-26 18:24 ` [PATCH net-next 1/6] bpf: bpf_lock needs only block bottom half Hannes Frederic Sowa
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Hannes Frederic Sowa @ 2017-04-26 18:24 UTC (permalink / raw)
  To: netdev; +Cc: ast, daniel, jbenc, aconole

Right now it seems difficult to list all active ebpf programs in a
system. This new /proc/bpf/programs node should help and print
basically essential information about loaded ebpf programs.

This should help an admin to get a quick look of what is going on in
his system.

Feedback welcome!

Hannes Frederic Sowa (6):
  bpf: bpf_lock needs only block bottom half
  bpf: rename bpf_kallsyms to bpf_progs, ksym_lnode to bpf_progs_head
  bpf: bpf_progs stores all loaded programs
  bpf: track if the bpf program was loaded with SYS_ADMIN capabilities
  bpf: add skeleton for procfs printing of bpf_progs
  bpf: show bpf programs

 include/linux/bpf.h      |   2 +-
 include/linux/filter.h   |  10 ++-
 include/uapi/linux/bpf.h |  32 ++++----
 kernel/bpf/core.c        | 195 +++++++++++++++++++++++++++++++++++++----------
 kernel/bpf/syscall.c     |  11 +--
 kernel/bpf/verifier.c    |   4 +-
 net/core/filter.c        |   6 +-
 7 files changed, 190 insertions(+), 70 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities
@ 2017-04-27 14:49 Alexei Starovoitov
  2017-04-27 14:56 ` Jiri Benc
  0 siblings, 1 reply; 23+ messages in thread
From: Alexei Starovoitov @ 2017-04-27 14:49 UTC (permalink / raw)
  To: Hannes Frederic Sowa
  Cc: netdev@vger.kernel.org, Alexei Starovoitov, Jiri Benc,
	Aaron Conole, Daniel Borkmann

On Thu, Apr 27, 2017 at 6:17 AM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
>
> cap_sys_admin influences the verifier a lot in terms which programs are
> accepted and which are not. So during investigations it might be even
> interesting if the bpf program required those special flags or if the
> same program could be loaded just as underprivileged.

there are bunch of other things that influence verifier.
should we add all of them ?
there is prog->aux->user which is more than enough for
debugging.

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-04-27 16:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26 18:24 [PATCH net-next 0/6] bpf: list all loaded ebpf programs in /proc/bpf/programs Hannes Frederic Sowa
2017-04-26 18:24 ` [PATCH net-next 1/6] bpf: bpf_lock needs only block bottom half Hannes Frederic Sowa
2017-04-26 18:24 ` [PATCH net-next 2/6] bpf: rename bpf_kallsyms to bpf_progs, ksym_lnode to bpf_progs_head Hannes Frederic Sowa
2017-04-26 18:24 ` [PATCH net-next 3/6] bpf: bpf_progs stores all loaded programs Hannes Frederic Sowa
2017-04-26 20:44   ` Daniel Borkmann
2017-04-26 18:24 ` [PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities Hannes Frederic Sowa
2017-04-26 21:04   ` Daniel Borkmann
2017-04-27 11:39     ` Hannes Frederic Sowa
2017-04-26 21:08   ` Alexei Starovoitov
2017-04-27 13:17     ` Hannes Frederic Sowa
2017-04-27  7:27   ` kbuild test robot
2017-04-27 10:09   ` kbuild test robot
2017-04-26 18:24 ` [PATCH net-next 5/6] bpf: add skeleton for procfs printing of bpf_progs Hannes Frederic Sowa
2017-04-26 18:24 ` [PATCH net-next 6/6] bpf: show bpf programs Hannes Frederic Sowa
2017-04-26 21:25   ` Alexei Starovoitov
2017-04-27 13:28     ` Hannes Frederic Sowa
2017-04-26 21:35   ` Daniel Borkmann
2017-04-27 13:22     ` Hannes Frederic Sowa
2017-04-27 16:00       ` David Miller
2017-04-27 16:28         ` Hannes Frederic Sowa
2017-04-27 16:40           ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2017-04-27 14:49 [PATCH net-next 4/6] bpf: track if the bpf program was loaded with SYS_ADMIN capabilities Alexei Starovoitov
2017-04-27 14:56 ` Jiri Benc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).