HomeFreeBSD

Use SPP (Supervisor Previous Privilege) bit in the sstatus

Description

Use SPP (Supervisor Previous Privilege) bit in the 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".

Reviewed by: markj@
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D16469

Details

Provenance
brAuthored on
Differential Revision
D16469: fix TRAPF_USERMODE macro
Parents
rS336765: MFC r336556:
Branches
Unknown
Tags
Unknown