Page MenuHomeFreeBSD

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

Authored by arichardson on Dec 16 2020, 6:52 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

usr.bin/truss/syscalls.c
1916

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