Page MenuHomeFreeBSD

fix TRAPF_USERMODE macro
ClosedPublic

Authored by br on Jul 27 2018, 3:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 2:28 AM
Unknown Object (File)
Nov 25 2023, 7:32 AM
Unknown Object (File)
May 22 2023, 4:47 PM
Unknown Object (File)
Dec 20 2022, 4:10 AM
Subscribers

Details

Summary

Use SPP (supervisor previous privilege) bit in sstatus register to determine if trap is from userspace.

Otherwise if we jump to kernel address from userspace, then TRAPF_USERMODE failed to detect usermode and then do_ast triggers a panic "ast in kernel mode"

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Jul 27 2018, 3:50 PM
This revision was automatically updated to reflect the committed changes.