netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: den@openvz.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/4 net-2.6.26] [IPV4]: Cleanup ip_options_compile.
Date: Mon, 03 Mar 2008 13:24:22 -0800 (PST)	[thread overview]
Message-ID: <20080303.132422.64941146.davem@davemloft.net> (raw)
In-Reply-To: <1204577698.23504.13.camel@iris.sw.ru>

From: "Denis V. Lunev" <den@openvz.org>
Date: Mon, 03 Mar 2008 23:54:58 +0300

> Though, it seems to me, that this structure does not came from
> userspace. At least I do not see a way for this. Could you show me how
> this can happen?

Sorry, I meant to talk about cases where the options have
been munged by the input or packet processing path, and
as a result the kernel intends opt->__data to be used.

For example, we might parse the options of an incoming
packet, edit out some things we wish to ignore, and leave
the result in opt->__data for ip_options_compile() to
process.

cipso_v4_sock_setattr() is a similar case.

Look at how ip_options_get_from_user() works, it copies in the
user provided IP options into opt->__data and sets
opt->is_data.  This gets passed down to ip_options_get_finish()
which passes that down to ip_options_compile().

Next, look at ip_cmsg_send(), it calls ip_options_get() which
copies the data into opt->__data and passes this down to
ip_options_get_finish() and thus ip_options_compile.

I guess your ip_options_get_finish() changes handle these
cases, but I cannot prove that the CIPSO is_data setting
ends up being unused.

I suppose it gets used by ip_options_build() for outgoing
packets, which assumes that is_data is always set?

  reply	other threads:[~2008-03-03 21:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 15:48 [PATCH 1/4 net-2.6.26] [IPV4]: skb->dst can't be NULL in ip_options_echo Denis V. Lunev
2008-03-03 15:48 ` [PATCH 2/4 net-2.6.26] [IPV4]: Cleanup ip_options_compile Denis V. Lunev
2008-03-03 19:55   ` David Miller
2008-03-03 20:54     ` Denis V. Lunev
2008-03-03 21:24       ` David Miller [this message]
2008-03-03 22:57         ` Denis V. Lunev
2008-03-03 23:02           ` David Miller
2008-03-03 15:48 ` [PATCH 3/4 net-2.6.26] [SCTP]: seq_printf format warning Denis V. Lunev
2008-03-03 17:39   ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-03 17:53     ` [PATCH 3/4 net-2.6.26] [SCTP]: seq_printf format warning. (fixed) Denis V. Lunev
2008-03-03 19:56       ` David Miller
2008-03-03 18:41     ` [PATCH 3/4 net-2.6.26] [SCTP]: seq_printf format warning Vlad Yasevich
2008-03-03 15:48 ` [PATCH 4/4 net-2.6.26] [TCP]: Merge exit paths in tcp_v4_conn_request Denis V. Lunev
2008-03-03 19:59   ` David Miller
2008-03-03 19:50 ` [PATCH 1/4 net-2.6.26] [IPV4]: skb->dst can't be NULL in ip_options_echo 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=20080303.132422.64941146.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=den@openvz.org \
    --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).