mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] remaining steps for time64 switchover
Date: Tue, 29 Oct 2019 19:08:41 -0400	[thread overview]
Message-ID: <20191029230841.GI16318@brightrain.aerifal.cx> (raw)
In-Reply-To: <20191021024643.GA6192@brightrain.aerifal.cx>

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:
> 
> [...]
> 
> - Does software built against new libc headers basically work?

strace breaks at build time with static_assert that IPC_STAT==2. This
had me momentarily doubting the whole approach of redefining it rather
than making __semctl_time64, etc., but it turns out strace also
depends on struct semid_ds, shmid_ds, and msqid_ds matching the kernel
layouts, which is impossible with time64, so there's really a
fundamental problem here.

Fortunately, strace already had the right code and just wasn't using
it: if HAVE_SYS_SEM_H, etc. aren't defined in config.h (from
autoconf), it falls back to using linux/sem.h, etc., which are exactly
what it should have been using all along: the kernel struct layouts
and command macro definitions.

I think the right patch to strace will be simply removing use of libc
sysvipc headers (always using the kernel ones); it doesn't seem
practical to write a configure test to determine that the libc ones
are usable for parsing the kernel struct.

So, first "oh no!" averted! But this may be a preview of what's to
come. (And I might have chosen strace as an early test case because I
expected things like this.)

Rich


      parent reply	other threads:[~2019-10-29 23:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  2:46 Rich Felker
2019-10-21 12:43 ` Rich Felker
2019-10-27  4:15   ` Rich Felker
2019-10-27  4:26 ` Rich Felker
2019-10-27  8:32   ` Laurent Bercot
2019-10-27 14:53     ` Rich Felker
2019-10-27 20:12     ` Matias Fonzo
2019-10-27 21:14       ` Rich Felker
2019-10-27 21:53         ` Matias Fonzo
2019-10-27 23:27           ` Laurent Bercot
2019-10-28 21:31             ` Matias Fonzo
2019-10-28 22:22   ` Rich Felker
2019-10-29 19:52 ` Rich Felker
2019-10-29 19:53   ` Rich Felker
2019-10-29 23:08 ` Rich Felker [this message]

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=20191029230841.GI16318@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).