Page MenuHomeFreeBSD

truss: fix handling of 64-bit arguments/return values for compat32
ClosedPublic

Authored by arichardson on Dec 16 2020, 6:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 5:24 PM
Unknown Object (File)
Oct 12 2024, 10:50 AM
Unknown Object (File)
Oct 2 2024, 12:54 PM
Unknown Object (File)
Sep 29 2024, 10:37 PM
Unknown Object (File)
Sep 24 2024, 5:29 PM
Unknown Object (File)
Sep 16 2024, 6:54 AM
Unknown Object (File)
Sep 8 2024, 2:36 PM
Unknown Object (File)
Sep 8 2024, 1:19 AM
Subscribers

Details

Summary

Deciding whether to combine two values to a 64-bit one should be based on
the process ABI, and not dependent on whether truss is compiled for an
LP64 ABI. This is a follow-up cleanup for D27625. I found this while
looking for uses of the __LP64__ macro (since using this is wrong for
CHERI systems).

Test Plan

still works. Since I tested on AMD64 and all syscalls in the trace have their quad argument last there was no difference in the output. Should fix output for compat32 on MIPS64 though.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

usr.bin/truss/syscalls.c
1917

I think you can safely axe this comment.

1929

We don't use the PRI macros in FreeBSD. Typically we use '%j' and cast to uintmax_t instead.

arichardson marked 2 inline comments as done.

address feedback

This revision is now accepted and ready to land.Jun 14 2021, 11:30 PM