Netdev List
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Cc: Daniel Borkmann <borkmann@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	Jesper Dangaard Brouer <brouer@redhat.com>
Subject: [V2 PATCH net-next 0/2] Fixes for XDP_REDIRECT map
Date: Thu, 07 Sep 2017 14:33:08 +0200	[thread overview]
Message-ID: <150478756604.28665.6915020425359475729.stgit@firesoul> (raw)

This my V2 of catching XDP_REDIRECT and bpf_redirect_map() API usage
that can potentially crash the kernel.  Addressed Daniels feedback in
patch01, and added patch02 which catch and cleanup dangling map
pointers.

I know John and Daniel are working on a more long-term solution, of
recording the bpf_prog pointer together with the map pointer.  I just
wanted to propose these fixes as a stop-gap to the potential crashes.

---

Jesper Dangaard Brouer (2):
      xdp: implement xdp_redirect_map for generic XDP
      xdp: catch invalid XDP_REDIRECT API usage


 include/linux/filter.h     |    1 +
 include/trace/events/xdp.h |    4 ++--
 net/core/dev.c             |    3 +++
 net/core/filter.c          |   39 ++++++++++++++++++++++++++++++++++++---
 4 files changed, 42 insertions(+), 5 deletions(-)

             reply	other threads:[~2017-09-07 12:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 12:33 Jesper Dangaard Brouer [this message]
2017-09-07 12:33 ` [V2 PATCH net-next 1/2] xdp: implement xdp_redirect_map for generic XDP Jesper Dangaard Brouer
2017-09-07 14:09   ` Daniel Borkmann
2017-09-08  8:36     ` Jesper Dangaard Brouer
2017-09-08 10:41       ` Daniel Borkmann
2017-09-07 12:33 ` [V2 PATCH net-next 2/2] xdp: catch invalid XDP_REDIRECT API usage Jesper Dangaard Brouer
2017-09-07 14:13   ` Daniel Borkmann
2017-09-07 14:32     ` Daniel Borkmann
2017-09-09  3:54 ` [V2 PATCH net-next 0/2] Fixes for XDP_REDIRECT map David Miller
2017-09-10  7:47   ` [V3 PATCH net] xdp: implement xdp_redirect_map for generic XDP Jesper Dangaard Brouer
2017-09-11 21:33     ` 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=150478756604.28665.6915020425359475729.stgit@firesoul \
    --to=brouer@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=borkmann@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --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