From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Chris Friesen <cfriesen@nortel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
netdev@vger.kernel.org,
Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: sunrpc port allocation and IANA reserved list
Date: Wed, 11 Nov 2009 06:17:24 +0900 [thread overview]
Message-ID: <1257887844.3044.24.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <4AF9D5D1.9040501@nortel.com>
On Tue, 2009-11-10 at 15:06 -0600, Chris Friesen wrote:
> On 11/10/2009 02:26 PM, Trond Myklebust wrote:
> > On Tue, 2009-11-10 at 12:37 -0600, Chris Friesen wrote:
> >> On 11/10/2009 11:53 AM, Ben Hutchings wrote:
> >>> On Tue, 2009-11-10 at 11:43 -0600, Chris Friesen wrote:
> >>
> >>>> Given that a userspace application can be stopped and restarted at any
> >>>> time, and a sunrpc registration can happen at any time, what is the
> >>>> expected mechanism to prevent the kernel from allocating a port for use
> >>>> by sunrpc that reserved or well-known?
> >>>>
> >>>> Apparently Redhat and Debian have distro-specific ways of dealing with
> >>>> this, but is there a standard solution? Should there be?
> >>>>
> >>>> The current setup seems suboptimal.
> >>>
> >>> I believe both RH and Debian are using the same implementation:
> >>> <http://cyberelk.net/tim/software/portreserve/>.
> >>
> >> That helps with the startup case, but still leaves a possible hole if an
> >> app using a fixed port number is restarted at runtime. During the
> >> window where nobody is bound to the port, the kernel could randomly
> >> assign it to someone else.
> >
> > Just use /proc/sys/sunrpc/{max,min}_resvport interface to restrict the
> > range used to a safer one. That's what it is for...
>
> What constitutes a "safer range"? IANA has ports assigned
> intermittently all the way through the default RPC range. The largest
> unassigned range is 922-988 (since 921 is used by lwresd). If someone
> needs more than 66 ports, how are they supposed to handle it?
Distributions can, and should, set the default to whatever range that
constitutes a broad percentile of their customers, and then leave
instructions on how to change that default for the people who run the
funky setups.
The people who are trying to run absolutely all IANA registered services
on a single Linux machine that is also trying to run as an NFS client
may have a problem, but then again, how many setups do you know who are
trying to do that?
Trond
next prev parent reply other threads:[~2009-11-10 21:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 17:43 Chris Friesen
2009-11-10 17:53 ` Ben Hutchings
2009-11-10 18:37 ` Chris Friesen
2009-11-10 18:48 ` Chris Friesen
2009-11-10 20:26 ` Trond Myklebust
2009-11-10 21:06 ` Chris Friesen
2009-11-10 21:17 ` Trond Myklebust [this message]
2009-11-10 21:58 ` Trond Myklebust
2009-11-10 21:32 ` Ben Hutchings
2009-11-10 21:34 ` Chuck Lever
2009-11-10 21:42 ` Ben Hutchings
2009-11-10 21:54 ` Chris Friesen
2009-11-10 22:14 ` Trond Myklebust
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=1257887844.3044.24.camel@heimdal.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=bhutchings@solarflare.com \
--cc=cfriesen@nortel.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
all inboxes | Powered by JetHome®