public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <libc-alpha@sourceware.org>, Albert ARIBAUD <albert.aribaud@3adev.fr>
Subject: Re: Second draft of the Y2038 design document
Date: Fri, 29 Jan 2016 15:40:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.10.1601291534150.29026@digraph.polyomino.org.uk> (raw)
In-Reply-To: <12761061.sGnHL6NOhT@wuerfel>

On Fri, 29 Jan 2016, Arnd Bergmann wrote:

> Should the kernel rely on the glibc-specific "_TIME_BITS" for this,
> or do we define some other macro that the kernel can test for?

Note that _TIME_BITS would not be tested directly in most glibc headers; 
it would be tested in features.h and used there to define __USE_* macros.  
(This is an observation, not an answer to your question.)

> __kernel_time_t, ...) and avoids namespace conflicts. In all the above
> examples, the new structure is identical between 32-bit and 64-bit
> architectures. [background: this lets us have a common syscall
> implementation for 64-bit and new 32-bit interfaces, while the

To reiterate on identical structures: where nanoseconds are involved in 
struct timespec or anything else where POSIX requires "long" to be the 
type, it's a pain for glibc if the kernel treats them as a 64-bit value 
when coming from a 32-bit process, as opposed to a 32-bit value with 32 
bits of padding, because then glibc needs to copy user-provided structures 
and sign-extend the nanoseconds value before passing it to the kernel.  
(But for 64-bit processes, correct error checking requires that the value 
be treated as 64-bit.)  (This doesn't apply to timeval because that uses 
suseconds_t for microseconds.  But I'd also suppose that syscalls 
involving timeval would generally be considered deprecated and the 64-bit 
replacements would be using timespec.)

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2016-01-29 15:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 19:41 Albert ARIBAUD
2016-01-28 21:13 ` Paul Eggert
2016-01-28 23:21   ` Arnd Bergmann
2016-01-29  0:12     ` Paul Eggert
2016-01-29  8:58       ` Arnd Bergmann
2016-03-20  8:07         ` Albert ARIBAUD
2016-03-21 12:15   ` Albert ARIBAUD
2016-03-21 13:07     ` Arnd Bergmann
2016-03-21 18:19     ` Paul Eggert
2016-03-25 12:24       ` Albert ARIBAUD
2016-01-28 21:14 ` Joseph Myers
2016-01-28 23:30   ` Arnd Bergmann
2016-01-28 23:36     ` Joseph Myers
2016-01-28 23:55 ` Arnd Bergmann
2016-01-29 15:40   ` Joseph Myers [this message]
2016-01-29 16:27     ` 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=alpine.DEB.2.10.1601291534150.29026@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=albert.aribaud@3adev.fr \
    --cc=arnd@arndb.de \
    --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).