Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190809170055.GK9017@brightrain.aerifal.cx>
Date: Fri, 9 Aug 2019 13:00:55 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [RFC] final time64 switch-over patch series

On Fri, Aug 09, 2019 at 12:30:21PM -0400, Rich Felker wrote:
> On Sun, Aug 04, 2019 at 12:31:09AM -0400, Rich Felker wrote:
> > On Fri, Aug 02, 2019 at 05:44:33PM -0400, Rich Felker wrote:
> > > >From 3c6bde03ecf2aa7dac605f0a55a1be201f3d4c5f Mon Sep 17 00:00:00 2001
> > > From: Rich Felker <dalias@...ifal.cx>
> > > Date: Fri, 2 Aug 2019 15:41:27 -0400
> > > Subject: [PATCH 5/5] [RFC] [POC] switch i386 to 64-bit time_t
> > > 
> > > this is a proof of concept for converting one 32-bit arch, i386, to
> > > 64-bit time_t. known issues:
> > > 
> > > 1. the switchover of timespec padding is a hack, and needs to be done
> > > right, but that involves making alltypes.h aware of endianness, which
> > > probably should have been done a long time ago anyway and would get
> > > rid of inappropriate inclusion of <endian.h> in some places.
> > > 
> > > 2. the rusage, utmpx, and timex structs are not correct with regard to
> > > ABI or functionality. they need to be fixed before this is safe to
> > > use.
> > > 
> > > 3. Makefile change should be its own thing.
> > > 
> > > there are likely a lot more problems.
> > 
> > Add a significant incomplete prerequisite I forgot about: dlsym. There
> > needs to be a redirection for dlsym, and 32-bit archs need a second
> > asm entry point for __dlsym_time64 which first checks the symbol name
> > against the list of time64 redirections and rewrites the request if
> > it's a match.
> 
> For reference, here's the first draft of the redirection. The worst
> part of it is the large relro string table.

Here's a v2, also for historical reference, using arrays without
pointers to trade ~2k of additional pure-rodata space for ~500 bytes
of per-task dirty relro space.

I have a better design in mind already so this probably won't be used.

Rich

View attachment "dlsym_redir_time64.c" of type "text/plain" (3009 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.