Page MenuHomeFreeBSD

vm_fault: move FAULT_* return codes out of range for Mach errors
ClosedPublic

Authored by kib on Jun 27 2023, 11:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 6, 4:38 PM
Unknown Object (File)
Thu, Sep 18, 4:16 PM
Unknown Object (File)
Aug 14 2025, 8:57 AM
Unknown Object (File)
Aug 8 2025, 8:41 PM
Unknown Object (File)
Aug 5 2025, 1:14 PM
Unknown Object (File)
Aug 3 2025, 11:29 PM
Unknown Object (File)
Aug 1 2025, 10:27 PM
Unknown Object (File)
Jul 24 2025, 2:14 PM
Subscribers

Details

Summary
This way a possible clash between FAULT_* and KERN_* numbering is
avoided, and panics checks for fault_status confusion become more
efficient.

Diff Detail

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

Event Timeline

kib requested review of this revision.Jun 27 2023, 11:45 AM

and panics checks for fault_status confusion become more efficient.

I'm not sure what you mean here?

This revision is now accepted and ready to land.Jun 27 2023, 1:56 PM

and panics checks for fault_status confusion become more efficient.

I'm not sure what you mean here?

switches with the key by fault_status enum or Mach error have the default: case with panic. If code confuses the enum with Mach error, now it should reliably hit the panic case instead of randomly interpret the value from different namespace.