This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/6] linux: Use 32-bit time_t for rusage


Dear community,

> Hi Andreas,
> 
> > On Feb 04 2020, Lukasz Majewski wrote:
> >   
> > > I though that for ARM32 glibc wrappers for syscalls were generated
> > > from sysdeps/unix/syscalls.list.    
> > 
> > But linux/generic/wordsize-32/fstatfs.c would override that, for
> > example.  
> 
> And this is IMHO the issue. Giving ARM32 full access to code located
> in linux/generic/wordsize-32 is fragile as it will override wrappers
> generated automatically.
> 
> In fact for ARM32 one would need either to locate the [sg]etitimer.c
> and getrusage.c in e.g. sysdeps/unix/sysv/linux or allow compiling
> only mentioned above files in linux/generic/wordsize-32.
> 
> The latter option would be possible with hack as:
> 
> introduce in sysdeps/unix/sysv/linux/arm/getitimer.c
> #include <sysdeps/unix/sysv/linux/generic/wordsize-32/getitimer.c>
> 
> 
> When following this idiom for setitimer and getrusage, the arm32 port
> seems to compile with those files.
> 
> Is it the recommended way?

Any thoughts ?


Just a tester's note:
---------------------

I've run tested this approach with the QEMU + Yocto Y2038 setup [*] and
it seems like this approach (recreation of files with only 
#include <linux/generic/wordsize-32/*.c> in
sysdeps/unix/sysv/linux) works seamlessly when/without Y2038
redirection code applied.


(The only problem is with __setitimer() not handling "old_value" as
NULL properly, but I've pointed it out in the other answer for this
patch).

Moreover, as the path sysdeps/unix/sysv/linux/arm is searched earlier
than sysdeps/unix, there is no need to remove [gs]etitimer and
getrusage from sysdeps/unix/syscalls.list.
(But the same approach would be needed if for example ppc32 or mips32
will need the Y2038 safe conversion for this function).




Links:

[*] - https://github.com/lmajewski/meta-y2038

> 
> > 
> > Andreas.
> >   
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Attachment: pgpMjSK2Mmsdb.pgp
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]