From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: santosh shilimkar <santosh.shilimkar@oracle.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH v2 net-next] rds-tcp: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket
Date: Tue, 15 Mar 2016 12:58:00 -0400 [thread overview]
Message-ID: <20160315165800.GL11063@oracle.com> (raw)
In-Reply-To: <56E83A6D.6060904@oracle.com>
On (03/15/16 09:38), santosh shilimkar wrote:
> >+ if (rtn->sndbuf_size > 0) {
> So value of 1 is allowed as well. There should be some
> minimum default or multiple of it. Of course above check
> can remain as is as long as you validate the user input
> in handlers.
yes, just as user-space SO_SNDBUF allows ridiculous values
for buffer size..
> >@@ -309,6 +352,7 @@ static void __net_exit rds_tcp_exit_net(struct net *net)
> > {
> > struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
> >
> >+ unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
> > /* If rds_tcp_exit_net() is called as a result of netns deletion,
> > * the rds_tcp_kill_sock() device notifier would already have cleaned
> > * up the listen socket, thus there is no work to do in this function.
> You need to unregister it on rds_tcp_listen_init() failure.
Ok, good point.
> >+ rtn->sndbuf_size = user_atoi(buffer, *lenp);
> As mentioned above, you should make sure the buffer lengths are
> legitimate.
As above. We allow any values that the TCP socket itself allows.
If the user wants to shoot themself in the foot, we dont stop them.
I'll fix the nits and send out another patchset in a bit.
next prev parent reply other threads:[~2016-03-15 16:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 15:12 [PATCH v2 net-next] rds-tcp: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket Sowmini Varadhan
2016-03-15 16:38 ` santosh shilimkar
2016-03-15 16:58 ` Sowmini Varadhan [this message]
2016-03-15 17:18 ` Eric Dumazet
2016-03-15 17:30 ` Sowmini Varadhan
2016-03-15 18:09 ` Eric Dumazet
2016-03-15 18:16 ` Sowmini Varadhan
2016-03-15 17:30 ` Tom Herbert
2016-03-15 17:34 ` Sowmini Varadhan
2016-03-15 17:47 ` Tom Herbert
2016-03-15 19:57 ` Sowmini Varadhan
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=20160315165800.GL11063@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=santosh.shilimkar@oracle.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).