Page MenuHomeFreeBSD

Check alignment of `fp` in `unwind_frame`
ClosedPublic

Authored by dg612_cam.ac.uk on Mar 23 2022, 6:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 1 2024, 5:13 AM
Unknown Object (File)
Sep 26 2024, 7:24 PM
Unknown Object (File)
Sep 24 2024, 12:36 AM
Unknown Object (File)
Sep 23 2024, 7:25 PM
Unknown Object (File)
Sep 23 2024, 7:25 PM
Unknown Object (File)
Sep 23 2024, 7:25 PM
Unknown Object (File)
Sep 18 2024, 7:26 AM
Unknown Object (File)
Sep 18 2024, 6:40 AM

Details

Summary

A misaligned frame pointer is certainly not a valid frame pointer and can cause panics when it is loaded from later in the code.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Mar 24 2022, 8:57 PM

can cause panics when it is loaded from later in the code.

Not unless you turn on the bit for trapping on unaligned accesses. It's only a problem for downstream CHERI where you don't get unaligned capabilities.

This revision was automatically updated to reflect the committed changes.

Reverted as it breaks the build.

andrew requested changes to this revision.Nov 15 2022, 12:40 PM

I think you either want __is_aligned or to define is_aligned in FreeBSD. I only see is_aligned in CheriBSD.

This revision now requires changes to proceed.Nov 15 2022, 12:40 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Nov 16 2022, 6:31 PM
This revision was automatically updated to reflect the committed changes.