netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: amwang@redhat.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	eric.dumazet@gmail.com
Subject: Re: [Patch v2] net: export TCP send buffer size via netlink
Date: Mon, 01 Feb 2010 02:00:55 -0800 (PST)	[thread overview]
Message-ID: <20100201.020055.57470143.davem@davemloft.net> (raw)
In-Reply-To: <20100201092153.4194.91507.sendpatchset@localhost.localdomain>

From: Amerigo Wang <amwang@redhat.com>
Date: Mon, 1 Feb 2010 04:18:28 -0500

> V1 -> V2:
> Keep ABI compatiblity of struct tcp_info.
> 
> Currently, we can only get TCP send buffer size by
> getsockopt (SO_SNDBUF or TCP_INFO), this is not enough
> for the tools like netstat or ss to read.
> 
> Show TCP send buffer size via netlink NETLINK_INET_DIAG.
> 
> Signed-off-by: WANG Cong <amwang@redhat.com>

If the user has a "struct tcp_info info" on it's stack,
and it's compiled against the header file before your
changes, guess what the kernel is going to do?

It's going to write past the end of the user's variable
into random stack locations.

You can't change the layout, at all.

  reply	other threads:[~2010-02-01 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01  9:18 [Patch v2] net: export TCP send buffer size via netlink Amerigo Wang
2010-02-01 10:00 ` David Miller [this message]
2010-02-01 10:06   ` David Miller
2010-02-01 10:21     ` Cong Wang

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=20100201.020055.57470143.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=amwang@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.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).