# 1 "trap.S" # 1 "" # 1 "" # 31 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "" 2 # 1 "trap.S" # 59 "trap.S" restore_all: popq %rax movq %rax, %ss popq %rax movq %rax, %gs popq %rax movq %rax, %fs popq %rax movq %rax, %es popq %rax movq %rax, %ds popq %r15 popq %r14 popq %r13 popq %r12 popq %r11 popq %r10 popq %r9 popq %r8 popq %rdi popq %rsi popq %rbp popq %rsp popq %rbx popq %rdx popq %rcx popq %rax addq $0x10, %rsp iretq .globl __stack_chk_fail __stack_chk_fail: movq schkfail_msg(%rip), %rdi scf_die: hlt jmp scf_die .globl divide_error divide_error: cli pushq $0 pushq %rax pushq %rax; pushq %rcx; pushq %rdx; pushq %rbx; pushq %rsp; pushq %rbp; pushq %rsi; pushq %rdi; pushq %r8; pushq %r9; pushq %r10; pushq %r11; pushq %r12; pushq %r13; pushq %r14; pushq %r15; movq %ds, %rax; pushq %rax; movq %es, %rax; pushq %rax; movq %fs, %rax; pushq %rax; movq %gs, %rax; pushq %rax; movq %ss, %rax; pushq %rax; movq %rsp, %rdi leaq do_divide_error(%rip), %rcx callq *%rcx sti jmp restore_all .section .rodata schkfail_msg: .asciz "kernel panic: stack check fail. \n"