linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD
Date: Tue, 13 Mar 2007 17:55:08 -0700 (PDT)	[thread overview]
Message-ID: <20070314005508.DDC121801C5@magilla.sf.frob.com> (raw)
In-Reply-To: Linus Torvalds's message of  Tuesday, 13 March 2007 14:28:00 -0700 <Pine.LNX.4.64.0703131420230.9690@woody.linux-foundation.org>

> I'd actually prefer this as part of the "remove OPEN_MAX" patch.

Ok.  (But now you're going to argue with me about "remove OPEN_MAX",
and you haven't said you have any problem with changing SCM_MAX_FD,
so why make it wait?)

> That said, it actually worries me that you should call "_SC_OPEN_MAX". 
[...]
> For example, I know perfectly well that I should use _SC_PATH_MAX, but a 
> *lot* of code simply doesn't care. In git, I used PATH_MAX, and the reason 
[...]

Ok, fine.  But PATH_MAX is a real constant that has some meaning in the
kernel.  It's perfectly correct to use PATH_MAX as a constant on a system
like Linux that defines it and means what it says.  Conversely, OPEN_MAX
has no useful relationship with anything the kernel is doing at all.

> So, what's the likelihood that this will break some old programs? I 
> realize that modern distributions don't put the kernel headers in their 
> user-visible includes any more, but the breakage is most likely exactly 
> for old programs and older distributions.

Well, I don't know for sure.  It doesn't seem all that likely to me (not
like PATH_MAX), as there has been getdtablesize() since before there was
OPEN_MAX by that name (not to mention before there was Linux).  If things
use OPEN_MAX as a constant for arrays, they're already broken unless they
call setrlimit to constrain themselves.  Getting things fixed has to start
somewhere.


Thanks,
Roland


  reply	other threads:[~2007-03-14  0:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13  8:39 [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD Roland McGrath
2007-03-13 14:17 ` Benjamin LaHaise
2007-03-13 20:02   ` Roland McGrath
2007-03-13 21:28     ` Linus Torvalds
2007-03-14  0:55       ` Roland McGrath [this message]
2007-03-14  1:15         ` Linus Torvalds
2007-03-14  9:45           ` Jochen Voß
2007-03-14 19:52           ` Olaf Kirch

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=20070314005508.DDC121801C5@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bcrl@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).