Reputation: 75575
In this question, I learned that attempting to run privileged instructions when not in ring 0 can cause what looks like a segfault
in a user process, and I have two follow-up questions.
Upvotes: 2
Views: 195
Reputation: 58772
Read through the instruction set reference and see where #GP
is listed for a non-memory issue. Incomplete list: CLI
, CLTS
, HLT
, IN
, INT
(with an invalid vector), INVD
, INVLPG
, IRET
(under circumstances), LDMXCSR
(setting reserved bits), LGDT
, LIDT
, LLDT
, LMSW
, LTR
, MONITOR
(with ECX != 0
), MOV
(to CRx
or DRx
), MWAIT
(with invalid ECX
), OUT
, RDMSR
, RDPMC
, SWAPGS
, SYSEXIT
, SYSRET
, WBINVD
, WRMSR
, XGETBV
(invalid ECX
), XRSTOR
, XSETBV
Upvotes: 3