Index: amd64/amd64_trap.S =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/amd64/amd64_trap.S,v retrieving revision 1.45 diff -p -u -r1.45 amd64_trap.S --- amd64/amd64_trap.S 12 Aug 2018 06:11:47 -0000 1.45 +++ amd64/amd64_trap.S 6 Nov 2018 00:03:08 -0000 @@ -673,15 +673,20 @@ calltrap: #ifdef DIAGNOSTIC .Lspl_error: STI(si) - movabsq $4f,%rdi movl CPUVAR(ILEVEL),%esi movl %ebx,%edx - xorq %rax,%rax + cmpl $0,_C_LABEL(panicstr) + jne 5f /* avoid crazy logging issues */ + /*xorq %rax,%rax*/ + movabsq $4f,%rdi call _C_LABEL(printf) movl %ebx,%edi call _C_LABEL(spllower) jmp .Lalltraps_checkast +5: movabsq $7f,%rdi + call _C_LABEL(panic) 4: .asciz "WARNING: SPL NOT LOWERED ON TRAP EXIT %x %x\n" +7: .asciz "spl not lowered on trap exit while panicking %x %x\n" #endif END(alltraps) Index: amd64/locore.S =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v retrieving revision 1.174 diff -p -u -r1.174 locore.S --- amd64/locore.S 12 Aug 2018 15:31:01 -0000 1.174 +++ amd64/locore.S 6 Nov 2018 00:03:08 -0000 @@ -1320,17 +1320,22 @@ ENTRY(handle_syscall) #ifdef DIAGNOSTIC /* Report SPL error */ .Lspl_error: - movabsq $4f,%rdi movl TF_RAX(%rsp),%esi movl TF_RDI(%rsp),%edx movl %ebx,%ecx movl CPUVAR(ILEVEL),%r8d - xorq %rax,%rax + cmpl $0,_C_LABEL(panicstr) + jne 5f + movabsq $4f,%rdi + /*xorq %rax,%rax */ call _C_LABEL(printf) movl $IPL_NONE,%edi call _C_LABEL(spllower) jmp .Lsyscall_checkast +5: movabsq $7f,%rdi + call _C_LABEL(panic) 4: .asciz "WARNING: SPL NOT LOWERED ON SYSCALL %d %d EXIT %x %x\n" +7: .asciz "spl not lowered on syscall %d %d exit %x %x\n" #endif /* AST pending or pmap load needed */