public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Rich Felker <dalias@libc.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] linux: Use 'long int' for timespec tv_nsec on x32 (BZ #16437)
Date: Fri, 10 Dec 2021 19:08:45 -0500	[thread overview]
Message-ID: <20211211000844.GB7074@brightrain.aerifal.cx> (raw)
In-Reply-To: <87mtl879ch.fsf@oldenburg.str.redhat.com>

On Fri, Dec 10, 2021 at 04:44:46PM +0100, Florian Weimer via Libc-alpha wrote:
> * H. J. Lu via Libc-alpha:
> 
> > On Fri, Dec 10, 2021 at 3:03 AM Adhemerval Zanella via Libc-alpha
> > <libc-alpha@sourceware.org> wrote:
> >>
> >> Although the kernel ABI uses 64-bit (so it can re-use the syscall
> >> logic from x86_64), POSIX states the type to be 'long int'.  It
> >> requires to explicit signal extend the value on syscalls that
> >> take the value to avoid requiring bumping the minimum kernel version
> >> (ea2ce8f3514e ("time: Fix get_timespec64() for y2038 safe compat
> >> interfaces") got merged into v4.18, futex and recvmsg followed in v5.1,
> >> but v5.6 is considered 'complete').
> >>
> >> The fix uses 'long long int' array to represent 'struct timespec',
> >> since it allows a simpler code than define a kernel specific timespec.
> >>
> >> There is no need to compat symbol, the now high-bits are not used
> >> to represent the nanoseconds and for some syscalls it only issues
> >> an error (which hardly indicates the need of compat symbol).
> >>
> >> Checked on x86_64-linux-gnu-x32 with kernel 4.4.0 and 5.13.
> >
> > Isn't it an ABI change for x32?
> 
> I agree.  I said so repeatedly.

Can you clarify the sense in which it's an "ABI change"? I don't think
it's a change at all in the "mechanical" ABI linkage between libc and
the libc consumer. Of course it is a change in the types at the high
level language level.

If this were just an enhancement request, I'd be inclined to say just
drop it, but this is a bug fix for a serious conformance problem
that's going to have people writing wacky code to work around x32 (if
anyone even actually cares about x32) and that keeps coming up in
messy ways like the request to change tv_nsec to snseconds_t. From my
perspective there is very high value in getting rid of this exception
to the specification so that stuff doesn't get built around it. On top
of that, to my knowledge there are no binary distros for x32, and very
few users at all (so few that "remove x32" has been proposed multiple
times). I don't think any minor "ABI change" is going to have an
impact on them; glibc has probably made more-breaking changes of this
class before, even.

Rich

  parent reply	other threads:[~2021-12-11  0:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 11:02 Adhemerval Zanella
2021-12-10 15:36 ` H.J. Lu
2021-12-10 15:44   ` Florian Weimer
2021-12-10 19:28     ` Adhemerval Zanella
2021-12-11  0:08     ` Rich Felker [this message]
2021-12-11  0:47       ` Paul Eggert
2021-12-11 11:26         ` Arnd Bergmann
2021-12-11 12:51           ` Florian Weimer
2021-12-11 16:32             ` Arnd Bergmann
2021-12-11 14:49           ` Rich Felker
2021-12-11 22:30             ` Arnd Bergmann
2021-12-11 18:50       ` Florian Weimer
2021-12-11 19:22         ` Andreas Schwab
2021-12-11 20:33           ` Rich Felker
2021-12-11 20:57             ` Andreas Schwab
2021-12-10 15:47   ` Adhemerval Zanella

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=20211211000844.GB7074@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).