From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4434 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: stat64 on mips Date: Mon, 30 Dec 2013 22:02:19 +0000 Message-ID: References: <20131230212953.GL24286@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1388440946 5792 80.91.229.3 (30 Dec 2013 22:02:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2013 22:02:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4438-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 30 23:02:34 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 1Vxkuu-0002up-SQ for gllmg-musl@plane.gmane.org; Mon, 30 Dec 2013 23:02:32 +0100 Original-Received: (qmail 31988 invoked by uid 550); 30 Dec 2013 22:02:32 -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 31974 invoked from network); 30 Dec 2013 22:02:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rApRX5Fmym7F4ynZtelUhxcoaTo7bLBB1lSNgOr6wSg=; b=QHLwluSBrLunwvto0xYJomi2wK53b6Vn4vRzLFxP2JX9oeQaZQb1B7A9yWxorp74m0 mU7orA9VKYKpv+BPzZsfoeDYbLi525ylNi+mHe2pCpi34Nmqbq4/oLbZsUAX3I3g/4HK aTVrg43sxWdCavnFmnAgMiYKMykw3raC/68qk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rApRX5Fmym7F4ynZtelUhxcoaTo7bLBB1lSNgOr6wSg=; b=HPX7UlfrV/E7Z7+pYiOBY1WJk7ri8G7p3RHDOkcEy4e6cbQDDXLDJKLrFO804ZZtAq 5GcUczr2SzHkxOv2UCrpQj4eku14y+v5X1kAOAkO+QyuwMB9+vyzJ4zmyeZ0S79f7n0u ulux4qz1nsMtXRzp5sYU+lQf0v81WZkS0+zmgLksulAw62BMM2C8AS6uiN2sTUGY2xEv 883IR/GGweVqIss2H3Vvs50XS7nKSDw+fVqE8TSvKQ29WyLfswxvrVVBjBA+0sxsSMVW a+aGVDtQT0SxivanhhXRcu5Hs79olX4zkGrMxBOhE7rlyFvAjcJU8rn7oMayjNDydnaU aSZw== X-Gm-Message-State: ALoCoQkhjBIVGo0ytP4VVtJmJn6DwMOb8zd8Z3OjjK7KErtJOjzShK34UR9ajrkbdKeSAYM36Z8n X-Received: by 10.68.252.5 with SMTP id zo5mr71993378pbc.10.1388440939336; Mon, 30 Dec 2013 14:02:19 -0800 (PST) In-Reply-To: <20131230212953.GL24286@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:4434 Archived-At: On Mon, Dec 30, 2013 at 9:29 PM, Rich Felker wrote: > On Mon, Dec 30, 2013 at 06:20:46PM +0000, Justin Cormack wrote: >> MIPS is the most confusing architecture, but as far as I can make out, >> the definition of struct stat64 that Musl has is probably the right >> one for mips n32 but wrong for mips o32 which should be >> >> struct stat { >> unsigned long st_dev; >> unsigned long __st_pad0[3]; >> unsigned long long st_ino; >> mode_t st_mode; >> nlink_t st_nlink; >> uid_t st_uid; >> gid_t st_gid; >> unsigned long st_rdev; >> unsigned long __st_pad1[3]; >> long long st_size; >> time_t st_atime; >> unsigned long st_atime_nsec; >> time_t st_mtime; >> unsigned long st_mtime_nsec; >> time_t st_ctime; >> unsigned long st_ctime_nsec; >> unsigned long st_blksize; >> unsigned long __st_pad2; >> long long st_blocks; >> }; >> >> It does appear that the syscalls for the two ABIs differ in this... > > This structure is identical to the one in musl except that it has > 32-bit dev_t plus padding in place of 64-bit dev_t, and the musl > version has reserved space at the end. Can you check whether the dev_t > issue is actually a problem (it might be, based on endianness, and if > so I think it would require ugly fixups in userspace)? Ah no, my mistake, you are right, the padding seems correct and I was getting confused as usual by dev_t. However the 64 bit dev_t is a problem on bigendian mips. (Whats the reason for Musl using 64 bit dev_t? glibc compatibility?) justin