Page MenuHomeFreeBSD

Use uintptr_t instead of uint64_t for pointers in stack frames.
ClosedPublic

Authored by jhb on Aug 7 2020, 4:12 PM.
Tags
None
Referenced Files
F175773792: D25995.id75753.diff
Tue, Oct 13, 6:06 AM
Unknown Object (File)
Mon, Oct 12, 8:38 PM
Unknown Object (File)
Mon, Oct 12, 12:24 PM
Unknown Object (File)
Sat, Sep 26, 1:37 PM
Unknown Object (File)
Tue, Sep 22, 2:07 AM
Unknown Object (File)
Tue, Sep 22, 2:07 AM
Unknown Object (File)
Tue, Sep 22, 2:03 AM
Unknown Object (File)
Sep 6 2026, 5:47 PM
Subscribers

Details

Test Plan
  • used in CheriBSD with a kernel which has CHERI capabilities as pointers (so uintptr_t is 128 bits and pointers in the stack are that size, etc.)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 32849
Build 30258: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Aug 7 2020, 4:12 PM
jhb created this revision.

In theory this would be more RV32 friendly as well, though I don't really think we need a FreeBSD/riscv32.

sys/riscv/riscv/unwind.c
54

Note that we are probably using a compressed instruction (c.jalr) so subtracting 4 rather than 2 is not always correct, but it's probably close enough as the intent is to get the right symbol name for tail calls where the saved RA may in fact point to the start of a different function.

This revision is now accepted and ready to land.Aug 9 2020, 3:09 PM