public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Florian Weimer <fweimer@redhat.com>,
	 Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>,
	Zack Weinberg <zack@owlfolio.org>
Subject: Re: [PATCH] linux: Use 'long int' for timespec tv_nsec on x32 (BZ #16437)
Date: Fri, 10 Dec 2021 12:23:21 +0100	[thread overview]
Message-ID: <CAK8P3a113BE-Dv+vF_1GVPC9HZ8eHFXeCD95Dng8x00pn02WtQ@mail.gmail.com> (raw)
In-Reply-To: <6ab62b15-6982-0786-3b61-b27c058c4475@linaro.org>

On Thu, Dec 9, 2021 at 8:35 PM Adhemerval Zanella via Libc-alpha
<libc-alpha@sourceware.org> wrote:
> On 09/12/2021 16:19, Florian Weimer wrote: * Adhemerval Zanella via Libc-alpha:

> > The change is also not entirely ABI-compatible because existing code on
> > x32 depends on the implementation clearing the upper 32 bits, and if new
> > code copies around structs, it won't necessary copy the zero bits.
>
> Afaiu the high-bits clearing is strictly necessary on kABI boundary for
> set functions.  Some issues indeed might arise if user use timespec
> embedded in some function and mix objects built with different glibc
> version, but it is similar to 32-bit architectures with mixing time_t
> objects.

The kernel's 32-bit ABI ignores the upper 32 bits of tv_nsec for structures
passed from user space, but zeroes them when returning a timespec to user
space.

Only x32 is weird here, as it traditionally uses a mix of hte 32-bit user
space ABI and the 64-bit user space ABI.

        Arnd

  reply	other threads:[~2021-12-10 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 19:10 Adhemerval Zanella
2021-12-09 19:19 ` Florian Weimer
2021-12-09 19:35   ` Adhemerval Zanella
2021-12-10 11:23     ` Arnd Bergmann [this message]
2021-12-10 11:29       ` Florian Weimer
2021-12-10 12:48         ` Arnd Bergmann
2021-12-10 12:51           ` Florian Weimer
2021-12-10 13:11             ` Arnd Bergmann

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=CAK8P3a113BE-Dv+vF_1GVPC9HZ8eHFXeCD95Dng8x00pn02WtQ@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=zack@owlfolio.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).