All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jamal Hadi Salim <jhs@mojatatu.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, xiyou.wangcong@gmail.com,
	Jamal Hadi Salim <hadi@mojatatu.com>
Subject: Re: [net-next PATCH v2 1/1] net sched actions: skbedit add support for mod-ing skb pkt_type
Date: Mon, 13 Jun 2016 10:00:27 +0200	[thread overview]
Message-ID: <575E681B.8080500@iogearbox.net> (raw)
In-Reply-To: <1465766693-2336-1-git-send-email-jhs@emojatatu.com>

Hi Jamal,

On 06/12/2016 11:24 PM, Jamal Hadi Salim wrote:
> From: Jamal Hadi Salim <hadi@mojatatu.com>
>
> Extremely useful for setting packet type to host so i dont
> have to modify the dst mac address using pedit (which requires
> that i know the mac address)
>
> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>

I'm wondering if this is a good idea, I was thinking about something
like this as well some time ago. So far pkt_type is just exposed as
read-only to user space right now and I'm a bit worried that when we
allow to set it arbitrarily, then this could lead to hard to debug
issues since skb->pkt_type is used in a lot of places with possibly
different assumptions and applications now need to mistrust the kernel
whether skb->pkt_type was actually what the kernel itself set in the
first place or skbedit with possibly some nonsense value (like rewriting
PACKET_OUTGOING into PACKET_LOOPBACK, etc). Did you audit that this
is safe?

Thanks,
Daniel

  reply	other threads:[~2016-06-13  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12 21:24 [net-next PATCH v2 1/1] net sched actions: skbedit add support for mod-ing skb pkt_type Jamal Hadi Salim
2016-06-13  8:00 ` Daniel Borkmann [this message]
2016-06-13 11:52   ` Jamal Hadi Salim
2016-06-13 12:21     ` Daniel Borkmann
2016-06-13 21:52       ` Jamal Hadi Salim

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=575E681B.8080500@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hadi@mojatatu.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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.