From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3321 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: High-priority library replacements? Date: Thu, 16 May 2013 21:56:29 -0400 Message-ID: <20130517015629.GY20323@brightrain.aerifal.cx> References: <20130509144528.GK20323@brightrain.aerifal.cx> <1368398543.43199.YahooMailClassic@web160405.mail.bf1.yahoo.com> <20130515201700.GV20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1368755802 19941 80.91.229.3 (17 May 2013 01:56:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 May 2013 01:56:42 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3325-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 17 03:56:43 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ud9uV-0000CA-18 for gllmg-musl@plane.gmane.org; Fri, 17 May 2013 03:56:43 +0200 Original-Received: (qmail 27699 invoked by uid 550); 17 May 2013 01:56:42 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27689 invoked from network); 17 May 2013 01:56:41 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3321 Archived-At: On Thu, May 16, 2013 at 05:12:04PM +0100, Justin Cormack wrote: > On Wed, May 15, 2013 at 9:17 PM, Rich Felker wrote: > > On Sun, May 12, 2013 at 03:42:23PM -0700, Brad Conroy wrote: > >> In case I don't get around to fully researching it, the kernel spews > >> out major and minor numbers in /sys that are greater than 255, so > >> the makedev in /sys/sysmacros.h is insufficient (also major() and > >> minor()???) I noticed because I wrote a shell script that populates > >> /dev from /sys in <0.2 seconds but failed for large major/minor > >> numbers when I built busybox with musl. At first glance, it looks > >> like dev_t needs to be uint and have the extra bits from major and > >> minor prepended as in the kernel's dev_t? > > > > Should be fixed in git. Let me know if it doesn't work right. > > mknod/mknodat still does return syscall(SYS_mknod, path, mode, dev & > 0xffff); - I believe it should pass the full 32 bits. > > Also the top 32 bits are only for compatibility with glibc I think, > not sure the macros should touch or use them, as the kernel has 32 bit > dev_t and no plans to change. mknod and mknodat should be fixed now. Anything else? I don't see much harm in having the macros match what glibc does, and it could be useful if the kernel allows 64bit device numbers on 64-bit archs. But if not, there's also an argument to be made for reducing code size by dropping the part of the macros for the high bits. What do you think? Rich