From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14887 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] remaining steps for time64 switchover Date: Tue, 29 Oct 2019 15:53:57 -0400 Message-ID: <20191029195357.GH16318@brightrain.aerifal.cx> References: <20191021024643.GA6192@brightrain.aerifal.cx> <20191029195245.GG16318@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="F55Y67F01HNW3AgB" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="88132"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14903-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 29 20:54:14 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iPXZE-000Mmy-96 for gllmg-musl@m.gmane.org; Tue, 29 Oct 2019 20:54:12 +0100 Original-Received: (qmail 5720 invoked by uid 550); 29 Oct 2019 19:54:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5702 invoked from network); 29 Oct 2019 19:54:09 -0000 Content-Disposition: inline In-Reply-To: <20191029195245.GG16318@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14887 Archived-At: --F55Y67F01HNW3AgB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 29, 2019 at 03:52:45PM -0400, Rich Felker wrote: > On Sun, Oct 20, 2019 at 10:46:43PM -0400, Rich Felker wrote: > > The attached patch series on top of present git master (commit > > 9b2921bea1d5017832e1b45d1fd64220047a9802) should contain all changes > > needed for fully working time64 on 32-bit archs, in a form that's > > plausibly ready for commit (no makeshift hacks just to get things > > demonstrably working). The one omission I'm aware of is what to do > > with struct utmpx, which is not actually used at present in any libc > > interfaces and thus not part of the ABI surface of libc. That will be > > addressed in a separate thread. > > > > Comments and basic testing are welcome at this point. It should be > > possible to build for any of the 32-bit archs, but I have only tested > > build for a few and only tested execution on i386 and sh. > > > > Some useful checks for anyone wanting to help test, especially on the > > more obscure archs: > > > > [...] > > > > - Anything look odd about time-related types? timeval/timespec members > > at positions that aren't naturally aligned? > > I tested this on i386 (with low alignment requirement, only 4 bytes) > with the attached program and it seems like I indeed got the padding > slots as-intended on the ipc types. This should mean the adjacent > explicit-padding members have no effect on other archs using the same > changes but with natural alignment, which matches the intent. As usual > mips and ppc are gratuitously different and seemed right to me but > should perhaps be double-checked at some point. However since they > have natural alignment the worst that could happen is leaving extra > padding slots we don't need. Attachment forgotten, here. Usage is to build against the appropriate libc/headers and save output, then diff outputs as desired. Rich --F55Y67F01HNW3AgB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="offsets.c" #include #include #include #include #include #include #define O(s,m) printf("offsetof(%s, %s)==%zd\n", #s, #m, offsetof(s,m)) int main() { O(struct semid_ds, sem_perm); O(struct semid_ds, sem_otime); O(struct semid_ds, sem_ctime); O(struct semid_ds, sem_nsems); O(struct shmid_ds, shm_perm); O(struct shmid_ds, shm_segsz); O(struct shmid_ds, shm_atime); O(struct shmid_ds, shm_dtime); O(struct shmid_ds, shm_ctime); O(struct shmid_ds, shm_cpid); O(struct shmid_ds, shm_lpid); O(struct shmid_ds, shm_nattch); O(struct msqid_ds, msg_perm); O(struct msqid_ds, msg_stime); O(struct msqid_ds, msg_rtime); O(struct msqid_ds, msg_ctime); O(struct msqid_ds, msg_cbytes); O(struct msqid_ds, msg_qnum); O(struct msqid_ds, msg_qbytes); O(struct msqid_ds, msg_lspid); O(struct msqid_ds, msg_lrpid); O(struct stat, st_dev); O(struct stat, st_ino); O(struct stat, st_mode); O(struct stat, st_nlink); O(struct stat, st_uid); O(struct stat, st_gid); O(struct stat, st_rdev); O(struct stat, st_size); O(struct stat, st_blksize); O(struct stat, st_blocks); O(struct stat, st_atim); O(struct stat, st_mtim); O(struct stat, st_ctim); } --F55Y67F01HNW3AgB--