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)
Mar 18 2024, 2:20 PM
Unknown Object (File)
Feb 15 2024, 2:17 PM
Unknown Object (File)
Jan 28 2024, 6:22 PM
Unknown Object (File)
Dec 20 2023, 7:43 AM
Unknown Object (File)
Dec 11 2023, 6:31 AM
Unknown Object (File)
Sep 6 2023, 6:20 AM
Unknown Object (File)
Aug 14 2023, 9:33 PM
Unknown Object (File)
Aug 14 2023, 10: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.