#13930 closed bug (fixed)

vm_page_fault: unhandled page fault in kernel space when executing "iret"

Reported by: i80and Owned by: mmlr
Priority: normal Milestone: Unscheduled
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

While fuzzing Haiku hrev51728 x86-64, I found that the iret instruction sometimes triggers a kernel panic:

echo 'int main(void) { asm("iret;"); }' > panic.c
gcc panic.c -o panic
while true; do ./panic; done

Within a few executions, I get kicked into the KDL:

PANIC: vm_page_fault: unhandled page fault in kernel space at 0x200, ip 0x48694000

I observe this both in VirtualBox as well as on an actual x86-64 machine.

Attachments (2)

Screen Shot 2018-01-02 at 11.13.20 AM.png (124.0 KB ) - added by i80and 21 months ago.
Backtrace
syslog (275.9 KB ) - added by i80and 21 months ago.

Download all attachments as: .zip

Change History (6)

by i80and, 21 months ago

Backtrace

by i80and, 21 months ago

Attachment: syslog added

comment:1 by diver, 21 months ago

Component: SystemSystem/Kernel

comment:2 by mmlr, 20 months ago

Owner: changed from nobody to mmlr
Status: newin-progress

I have investigated this and found the reason for the panic as well as a possible fix. But I don't yet fully understand why exactly it happens and need to investigate some more to be sure that the fix is proper.

comment:3 by waddlesplash, 19 months ago

Platform: x86-64All

Confirmed this happens on x86_gcc2h as well.

comment:4 by waddlesplash, 12 months ago

Resolution: fixed
Status: in-progressclosed

Was fixed in hrev52345.

Note: See TracTickets for help on using tickets.