CONFIG_COMPAT_32BIT_TIME in the kernel, x86 ABI on x86-64

Andreas K. Huettel dilfridge@gentoo.org
Sun Jul 23 15:16:55 GMT 2023


Dear all, 

one of my Gentoo colleagues (Mike Gilbert, floppym) found this, so I'm forwarding
his notes:

===
Using utimensat as an example, the kernel interface is as follows:

When CONFIG_COMPAT_32BIT_TIME is enabled, the kernel provides both the legact 
32-bit interface (utimensat) and the 64-bit interface (utimensat_time64).
When CONFIG_COMPAT_32BIT_TIME is disabled, only the 64-bit interface 
(utimensat_time64) is provided. utimensat gives ENOSYS.

Behavior of utimensat64 libc function before b286eca5d4117b3e17c939e3df56e132ae623df1:

1. Try utimensat_time64
2. If ENOSYS, fall back to utimensat if the arguments are small enough to fit in 32-bits

Behavior of utimensat64 libc function after b286eca5d4117b3e17c939e3df56e132ae623df1:

1. If the arguments are small enough to fit in 32-bits, use utimensat
2. If the arguments are too large, use utimensat_time64

The new behavior fails when CONFIG_COMPAT_32BIT_TIME is disabled, since utimensat is 
unavailable.

Several other glibc functions were updated with similar behavior changes.
===

What's to do?

Cheers,
Andreas

-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 981 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20230723/808b2937/attachment.sig>


More information about the Libc-alpha mailing list