All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: Daniel Borkmann <daniel@iogearbox.net>, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] cls_bpf: do eBPF invocation under non-bh RCU lock variant for maps
Date: Thu, 12 Mar 2015 14:26:07 -0700	[thread overview]
Message-ID: <5502046F.4030409@plumgrid.com> (raw)
In-Reply-To: <91a3d08794f55f1f7a86a45f5d00ee72c8106061.1426185074.git.daniel@iogearbox.net>

On 3/12/15 12:03 PM, Daniel Borkmann wrote:
> Currently, it is possible in cls_bpf to access eBPF maps only under
> rcu_read_lock_bh() variants: while on ingress side, that is, handle_ing(),
> the classifier would be called from __netif_receive_skb_core() under
> rcu_read_lock(); on egress side, however, it's rcu_read_lock_bh() via
> __dev_queue_xmit().
>
> This rcu/rcu_bh mix doesn't work together with eBPF maps as they require
> soley to be called under rcu_read_lock(). eBPF maps could also be shared
> among various other eBPF programs (possibly even with other eBPF program
> types, f.e. tracing) and user space processes, so any context is assumed.
>
> Therefore, a possible fix for cls_bpf is to wrap/nest eBPF program
> invocation under non-bh RCU lock variant.
>
> Fixes: e2e9b6541dd4 ("cls_bpf: add initial eBPF support for programmable classifiers")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

Acked-by: Alexei Starovoitov <ast@plumgrid.com>

thanks!

  reply	other threads:[~2015-03-12 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 19:03 [PATCH net-next] cls_bpf: do eBPF invocation under non-bh RCU lock variant for maps Daniel Borkmann
2015-03-12 21:26 ` Alexei Starovoitov [this message]
2015-03-12 22:34 ` David Miller

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=5502046F.4030409@plumgrid.com \
    --to=ast@plumgrid.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.