Page MenuHomeFreeBSD

amd64: move efirt trap checks into the helper
ClosedPublic

Authored by kib on Wed, Mar 11, 12:08 PM.
Tags
None
Referenced Files
F147988878: D55808.diff
Sun, Mar 15, 1:30 AM
F147988152: D55808.diff
Sun, Mar 15, 1:22 AM
Unknown Object (File)
Thu, Mar 12, 6:07 AM
Unknown Object (File)
Wed, Mar 11, 2:38 PM

Diff Detail

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

Event Timeline

kib requested review of this revision.Wed, Mar 11, 12:08 PM
This revision is now accepted and ready to land.Wed, Mar 11, 9:33 PM
This revision was automatically updated to reflect the committed changes.

I don't know how or why, but this change makes my test system panic at boot:

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 0b
fault virtual address   = 0x44196a840c00
fault code              = supervisor write data, protection violation
instruction pointer     = 0x20:0xffffffff8112727a
stack pointer           = 0x28:0xfffffe01979d5900
frame pointer           = 0x28:0xfffffe01979d5900
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 529 (sh)
rdi: 000044196a840c00 rsi: fffffe01f61a6400 rdx: 0000000000000400
rcx: 0000000000000080  r8: fffffe01f61a6400  r9: 0000000041810000
rax: 0000000000000000 rbx: fffffe01979d5da8 rbp: fffffe01979d5900
r10: fffff801fc2b1178 r11: fffff80207c6c550 r12: 0000000000000400
r13: fffffe01979d5dd8 r14: 0000000000000400 r15: fffffe01f61a6400
trap number             = 12
panic: page fault
cpuid = 11
time = 1773527404
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01979d5610
vpanic() at vpanic+0x136/frame 0xfffffe01979d5740
panic() at panic+0x43/frame 0xfffffe01979d57a0
trap_fatal() at trap_fatal+0x68/frame 0xfffffe01979d57c0
trap_pfault() at trap_pfault+0x2ac/frame 0xfffffe01979d5830
calltrap() at calltrap+0x8/frame 0xfffffe01979d5830
--- trap 0xc, rip = 0xffffffff8112727a, rsp = 0xfffffe01979d5900, rbp = 0xfffffe01979d5900 ---
copyout_nosmap_std() at copyout_nosmap_std+0x15a/frame 0xfffffe01979d5900
uiomove_faultflag() at uiomove_faultflag+0x12c/frame 0xfffffe01979d5940
dmu_read_uio_dnode() at dmu_read_uio_dnode+0xc0/frame 0xfffffe01979d59a0
zfs_read() at zfs_read+0x310/frame 0xfffffe01979d5a20
zfs_freebsd_read() at zfs_freebsd_read+0x7b/frame 0xfffffe01979d5a60
VOP_READ_APV() at VOP_READ_APV+0x55/frame 0xfffffe01979d5a90
vn_read() at vn_read+0x237/frame 0xfffffe01979d5b10
vn_io_fault_doio() at vn_io_fault_doio+0x45/frame 0xfffffe01979d5b70
vn_io_fault1() at vn_io_fault1+0x15e/frame 0xfffffe01979d5cb0
vn_io_fault() at vn_io_fault+0x19d/frame 0xfffffe01979d5d40
dofileread() at dofileread+0x80/frame 0xfffffe01979d5d90
sys_read() at sys_read+0x127/frame 0xfffffe01979d5e00
amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe01979d5f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01979d5f30
--- syscall (3, FreeBSD ELF64, read), rip = 0x1b2ca1ea432a, rsp = 0x1b2c9e6eb448, rbp = 0x1b2c9e6eb490 ---
KDB: enter: panic
[ thread pid 529 tid 101048 ]
Stopped at      kdb_enter+0x33: movq    $0,0x15ecac2(%rip)
db>