lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070314005508.DDC121801C5@magilla.sf.frob.com>
Date:	Tue, 13 Mar 2007 17:55:08 -0700 (PDT)
From:	Roland McGrath <roland@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Benjamin LaHaise <bcrl@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD

> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ