linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Alexei Starovoitov <ast@plumgrid.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Eric Dumazet <edumazet@google.com>,
	Kees Cook <keescook@chromium.org>,
	Linux API <linux-api@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs
Date: Wed, 7 Oct 2015 08:05:29 +0200	[thread overview]
Message-ID: <20151007060529.GA6364@gmail.com> (raw)
In-Reply-To: <CALCETrXwYoVMnsPJZxFtgGaD5YXzKMBYG=EJAQTbwGdKwmdb5g@mail.gmail.com>


* Andy Lutomirski <luto@amacapital.net> wrote:

> On Tue, Oct 6, 2015 at 10:56 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > On Tue, 2015-10-06 at 10:50 -0700, Alexei Starovoitov wrote:
> >
> >> was also thinking that we can do it only in paths that actually
> >> have multiple protocol layers, since today bpf is mainly used with
> >> tcpdump(raw_socket) and new af_packet fanout both have cb cleared
> >> on RX, because it just came out of alloc_skb and no layers were called,
> >> and on TX we can clear 20 bytes in dev_queue_xmit_nit().
> >> af_unix/netlink also have clean skb. Need to analyze tun and sctp...
> >> but it feels overly fragile to save a branch in sk_filter,
> >> so planning to go with
> >> if(unlikely(prog->cb_access)) memset in sk_filter().
> >>
> >
> > This will break TCP use of sk_filter().
> > skb->cb[] contains useful data in TCP layer.
> >
> >
> 
> Since I don't know too much about the networking details:
> 
> 1. Does "skb->cb" *ever* contain anything useful for an unprivileged user?
> 
> 2. Does sbk->cb form a stable ABI?
> 
> Unless both answers are solid yesses, then maybe the right solution is
> to just deny access entirely to unprivileged users.

So this kind of instrumentation data is not an ABI in a similar fashion as tracing 
information is not an ABI either.

I.e. tracepoints can (and sometimes do) change 'semantics' - in that the 
interpretation of the implementational details behind that data changes as the 
implementation changes. That's not something that can ever be an ABI, just like 
the contents of /proc/kcore or /proc/slabinfo can not be an ABI.

Thanks,

	Ingo

  reply	other threads:[~2015-10-07  6:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 20:48 [PATCH net-next 0/2] bpf: unprivileged Alexei Starovoitov
2015-10-05 20:48 ` [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov
2015-10-05 21:00   ` Kees Cook
2015-10-05 21:12     ` Alexei Starovoitov
2015-10-05 21:16       ` Andy Lutomirski
2015-10-05 21:32         ` Alexei Starovoitov
2015-10-05 22:02       ` Kees Cook
2015-10-06  0:28         ` Alexei Starovoitov
2015-10-05 22:14   ` Daniel Borkmann
2015-10-06  0:51     ` Alexei Starovoitov
2015-10-06  7:13       ` Ingo Molnar
2015-10-06  8:05         ` Daniel Borkmann
2015-10-06  8:20           ` Ingo Molnar
2015-10-06  8:39             ` Daniel Borkmann
2015-10-06 17:50               ` Alexei Starovoitov
2015-10-06 17:56                 ` Eric Dumazet
2015-10-06 18:05                   ` Andy Lutomirski
2015-10-07  6:05                     ` Ingo Molnar [this message]
2015-10-06 19:26                   ` Alexei Starovoitov
2015-10-06 18:03                 ` Daniel Borkmann
2015-10-06 12:45       ` Daniel Borkmann
2015-10-07 21:20         ` Alexei Starovoitov
2015-10-07 22:07           ` Daniel Borkmann
2015-10-07 22:22             ` Kees Cook
2015-10-07 23:49               ` Alexei Starovoitov
2015-10-08  6:21                 ` Ingo Molnar
2015-10-08  6:30                   ` Alexei Starovoitov
2015-10-08 17:42                 ` Kees Cook
2015-10-08  2:29   ` Alexei Starovoitov
2015-10-05 20:48 ` [PATCH net-next 2/2] bpf: charge user for creation of BPF maps and programs Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151007060529.GA6364@gmail.com \
    --to=mingo@kernel.org \
    --cc=ast@plumgrid.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).