unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: Accelerating Y2038 glibc fixes
Date: Thu, 18 Jul 2019 13:43:27 -0300	[thread overview]
Message-ID: <e1fb1fcb-c606-7dd3-1c81-17dfc5f5885e@linaro.org> (raw)
In-Reply-To: <20190718154613.GS1506@brightrain.aerifal.cx>



On 18/07/2019 12:46, Rich Felker wrote:
> On Thu, Jul 18, 2019 at 04:49:31PM +0200, Florian Weimer wrote:
>> * Rich Felker:
>>
>>> On Wed, Jul 17, 2019 at 11:57:48PM +0200, Lukasz Majewski wrote:
>>>> Note:
>>>>
>>>> [1] -
>>>> https://github.com/lmajewski/y2038_glibc/commits/Y2038-2.29-glibc-11-03-2019
>>>>
>>>> [2] - https://github.com/lmajewski/y2038-tests
>>>>
>>>> [3] -
>>>> https://sourceware.org/glibc/wiki/Y2038ProofnessDesign?highlight=%28y2038%29
>>>>
>>>> [4] - https://github.com/lmajewski/meta-y2038/tree/master
>>>
>>> Some findings here that need correction:
>>>
>>> [1] is completely missing the sysvipc interfaces affected, and [3]
>>> fails to document them as affected because the structs are variadic
>>> arguments not declared ones. Fortunately, this means we can get away
>>> without actually replacing the functions, and instead define new
>>> command numbers to perform the translation. When doing this, glibc
>>> should follow musl and correct other bugs in these structs: for
>>> example, struct ipc_perm's mode field has the wrong type on some archs
>>> (short instead of mode_t; only makes a difference on big endian).
>>
>> Do the musl types match the kernel types?
> 
> Largely, since the kernel also left padding, but in the wrong order
> for big endian. So instead of short+padding for mode on affected
> archs, we have mode_t mode. On big endian variants of these archs,
> this requires some fixup code to swap the upper/lower 16 bits.
> 
> With time64, if you're bothering to decode the extra time bits (on
> most archs these are in adjacent padding and just need endian swapping
> on big endian; on some archs they're in non-adjacent padding) already
> then it's no big deal to fix the mode_t at the same time.
> 
> Note that on most archs, fixing these structs for time64 is just
> replacing the 32-bit time_t and adjacent padding with a 64-bit time_t.
> But on the exceptions (probably mips, because eew..) the struct needs
> more significant changes.
> 

This is BZ#18231 and I started to work on this some time ago. The main
issue is not really fix it, but consolidate all the implementations to
use a generic header for msg.h, sem.h, and shm.h, while providing 
compat symbol if it were the case.  I will try to check this out again,
since eventually I think we will need to get back to avoid a complicate
support for time64.

  reply	other threads:[~2019-07-18 16:43 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  7:21 Accelerating Y2038 glibc fixes Wolfgang Denk
2019-07-16  9:32 ` Wolfgang Denk
2019-07-16 11:50 ` Siddhesh Poyarekar
2019-07-16 12:40   ` Wolfgang Denk
2019-07-16 12:44 ` Florian Weimer
2019-07-16 14:52   ` Wolfgang Denk
2019-07-16 15:09     ` Florian Weimer
2019-07-16 15:19       ` Andrew Pinski
2019-07-17 14:15     ` Arnd Bergmann
2019-07-17 14:41       ` Florian Weimer
2019-07-17 16:00         ` Wolfgang Denk
2019-07-17 16:04           ` Florian Weimer
2019-07-17 16:18             ` Lukasz Majewski
2019-07-18 18:53               ` Adhemerval Zanella
2019-07-18 19:13                 ` Florian Weimer
2019-07-18 20:31                   ` Adhemerval Zanella
2019-07-18 21:20                     ` Florian Weimer
2019-07-18 22:32                     ` Paul Eggert
2019-07-19  7:21                       ` Andreas Schwab
2019-07-19  3:06                     ` Rich Felker
2019-07-19 17:44                       ` Adhemerval Zanella
2019-07-19 19:03                         ` Alistair Francis
2019-07-25 20:40                 ` Joseph Myers
2019-07-29 17:47                   ` Adhemerval Zanella
2019-07-29 19:58                     ` Joseph Myers
2019-07-29 21:00                       ` Adhemerval Zanella
2019-07-29 21:08                         ` Joseph Myers
2019-07-29 23:12                           ` Paul Eggert
2019-07-29 23:30                             ` Joseph Myers
2019-07-17 17:50       ` Rich Felker
2019-07-17 21:57         ` Lukasz Majewski
2019-07-17 22:37           ` Rich Felker
2019-07-18  7:20             ` Lukasz Majewski
2019-07-18 13:35               ` Rich Felker
2019-07-18 14:47           ` Rich Felker
2019-07-18 14:49             ` Florian Weimer
2019-07-18 15:46               ` Rich Felker
2019-07-18 16:43                 ` Adhemerval Zanella [this message]
2019-07-20  4:43             ` Rich Felker
2019-07-25 19:54 ` Joseph Myers
2019-07-26 10:39   ` Lukasz Majewski
2019-07-29 18:55     ` Zack Weinberg
2019-07-29 20:12       ` Joseph Myers
2019-07-30 11:02         ` Lukasz Majewski
2019-07-30 12:24           ` Joseph Myers
2019-07-30 14:04       ` Lukasz Majewski
2019-08-09  7:25         ` Lukasz Majewski
     [not found]           ` <CAKCAbMhOMQ9yTFpy+OQkDvZPPFf_fFn6oSxjvLTaUwC4jpPRag@mail.gmail.com>
2019-08-09 12:32             ` Fwd: " Zack Weinberg
2019-07-30 19:58       ` Joseph Myers
2019-07-30 20:28         ` Florian Weimer

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1fb1fcb-c606-7dd3-1c81-17dfc5f5885e@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --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).