From: Johannes Berg <johannes@sipsolutions.net>
To: Jan Moskyto Matejka <mq@jmq.cz>, David Ahern <dsahern@gmail.com>
Cc: David Miller <davem@davemloft.net>,
mq@ucw.cz, netdev@vger.kernel.org,
roopa <roopa@cumulusnetworks.com>
Subject: Re: [PATCH] net: ipv6: Truncate single route when it doesn't fit into dump buffer.
Date: Sun, 14 May 2017 23:00:37 +0200 [thread overview]
Message-ID: <1494795637.2803.2.camel@sipsolutions.net> (raw)
In-Reply-To: <20170513172915.5ram3mlsy4ihzwmw@lopatka.joja.cz> (sfid-20170513_192929_901880_287B83AA)
On Sat, 2017-05-13 at 19:29 +0200, Jan Moskyto Matejka wrote:
>
> > When adding a route to the skb, track whether it contains at least
> > 1
> > route. If not, it means the next route in the dump is larger than
> > the
> > given buffer. Detect this condition and error out of the dump -
> > returning an error to the user (-ENOSPC? or EMSGSIZE?)
>
> EMSGSIZE seems OK for me.
If we return an error here, and consequently allow for userspace
changes to pick this up, perhaps we could also consider allowing to
split the dump between nexthops, so that arbitrary such things can be
returned.
We did a similar thing in nl80211 at some point - originally, a dump of
wireless devices present was doing a whole device per message, we later
allowed splitting a single device across multiple messages because
capability information was reaching a reasonable message size limit.
johannes
next prev parent reply other threads:[~2017-05-14 21:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 11:15 [PATCH] net: ipv6: Truncate single route when it doesn't fit into dump buffer Jan Moskyto Matejka
2017-05-12 15:24 ` David Miller
2017-05-12 17:26 ` David Ahern
2017-05-12 17:34 ` David Miller
2017-05-12 21:41 ` Jan Moskyto Matejka
2017-05-13 6:52 ` David Ahern
2017-05-13 10:54 ` Jan Moskyto Matejka
2017-05-13 17:13 ` David Ahern
2017-05-13 17:29 ` Jan Moskyto Matejka
2017-05-14 21:00 ` Johannes Berg [this message]
2017-05-14 22:14 ` David Ahern
2017-05-14 22:20 ` Johannes Berg
2017-05-12 21:34 ` Jan Moskyto Matejka
2017-05-12 21:43 ` Jan Moskyto Matejka
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=1494795637.2803.2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=mq@jmq.cz \
--cc=mq@ucw.cz \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.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 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).