Page MenuHomeFreeBSD

syscallarg_t: Add a type for system call arguments
ClosedPublic

Authored by brooks on Jan 7 2022, 4:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 14 2024, 8:41 AM
Unknown Object (File)
Mar 14 2024, 8:32 AM
Unknown Object (File)
Mar 14 2024, 8:32 AM
Unknown Object (File)
Mar 14 2024, 8:31 AM
Unknown Object (File)
Mar 14 2024, 8:31 AM
Unknown Object (File)
Mar 14 2024, 8:22 AM
Unknown Object (File)
Feb 16 2024, 7:51 PM
Unknown Object (File)
Jan 2 2024, 12:38 PM
Subscribers

Details

Summary

This more clearly differentiates system call arguments from integer
registers and return values. On current architectures it has no effect,
but on architectures where pointers are not integers (CHERI) and may
not even share registers (CHERI-MIPS) it is necessiary to differentiate
between system call arguments (syscallarg_t) and integer register values
(register_t).

Obtained from: CheriBSD

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43856
Build 40744: arc lint + arc unit

Event Timeline

brooks requested review of this revision.Jan 7 2022, 4:44 PM
This revision is now accepted and ready to land.Jan 7 2022, 4:46 PM

Do you plan to also update other architectures and ABIs?

This revision now requires review to proceed.Jan 7 2022, 10:25 PM

Do you plan to also update other architectures and ABIs?

I've done arm and amd64. I've not touched powerpc because it follows a unique model.

sys/sys/types.h
273

Can we have it named less verbose, e.g. scarg_t ?

sys/vm/vm_mmap.c
423

Is this cast needed at all?

brooks added inline comments.
sys/vm/vm_mmap.c
423

It doesn't appear to be. I've removed it.

brooks added inline comments.
sys/sys/types.h
273

I don't see the value in trading a more obfuscated name for 5 bytes per use of a rarely used type.

kib added inline comments.
sys/sys/types.h
273

The lines where syscallarg_t needs to be spelled, get too long. Typically if you need to cast, you need to repeat the type name in the same expression one more time, so it is 5-10 chars lost out of 72.

This revision is now accepted and ready to land.Jan 12 2022, 4:53 AM