[strace/strace] sysvipc handling is time64-incompatible (#116)

Dmitry V. Levin notifications at github.com
Tue Jan 14 02:18:03 UTC 2020

On Mon, Dec 23, 2019 at 11:12:04PM -0800, Rich Felker wrote:
> (Apologies if this is a duplicate of something already reported here or elsewhere. I could have sworn I already reported and had communication about it, but I can't find record of that anywhere.)

Yes, you've commented on this subject already, see

> strace gets the structure definitions and command macro values from `sys/ipc.h`, `sys/sem.h`, etc. only falling back to the kernel uapi headers if these are missing. However, for moving 32-bit archs to 64-bit `time_t`, the application-facing/libc types for `semid_ds`, etc. must necessarily mismatch the kernel types since the existing time fields lack correct alignment (and on some archs, even lack padding) to be expanded/used in-place.
> Since strace wants to be working with the structures and command numbers present in the tracee's interface with the kernel, not its own interface with libc, it should be including the kernel uapi headers for these definitions.

According to strace testsuite, this change, unfortunately, causes
regressions: the structures returned by msgctl and shmctl syscalls are
no longer printed correctly for some architectures.  For example, this
happens with x32 tracee on x86_64 and with 32-bit tracee on sparc64.
Compared with glibc headers, kernel UAPI headers are apparently not good
enough for this job and have to be fixed first.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20200114/742d51a1/attachment.html>

More information about the Strace-devel mailing list