aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/entry.S
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-08 05:43:49 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-08 05:43:49 -0400
commit1d6ae775d7a948c9575658eb41184fd2e506c0df (patch)
tree8128a28e89d82f13bb8e3a2160382240c66e2816 /arch/i386/kernel/entry.S
parent739cdbf1d8f0739b80035b80d69d871e33749b86 (diff)
parentcaf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r--arch/i386/kernel/entry.S22
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index a991d4e5edd2..3aad03839660 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -203,7 +203,7 @@ sysenter_past_esp:
203 GET_THREAD_INFO(%ebp) 203 GET_THREAD_INFO(%ebp)
204 204
205 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 205 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
206 testw $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp) 206 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
207 jnz syscall_trace_entry 207 jnz syscall_trace_entry
208 cmpl $(nr_syscalls), %eax 208 cmpl $(nr_syscalls), %eax
209 jae syscall_badsys 209 jae syscall_badsys
@@ -226,9 +226,9 @@ ENTRY(system_call)
226 pushl %eax # save orig_eax 226 pushl %eax # save orig_eax
227 SAVE_ALL 227 SAVE_ALL
228 GET_THREAD_INFO(%ebp) 228 GET_THREAD_INFO(%ebp)
229 # system call tracing in operation 229 # system call tracing in operation / emulation
230 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 230 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
231 testw $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp) 231 testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
232 jnz syscall_trace_entry 232 jnz syscall_trace_entry
233 cmpl $(nr_syscalls), %eax 233 cmpl $(nr_syscalls), %eax
234 jae syscall_badsys 234 jae syscall_badsys
@@ -338,6 +338,9 @@ syscall_trace_entry:
338 movl %esp, %eax 338 movl %esp, %eax
339 xorl %edx,%edx 339 xorl %edx,%edx
340 call do_syscall_trace 340 call do_syscall_trace
341 cmpl $0, %eax
342 jne resume_userspace # ret != 0 -> running under PTRACE_SYSEMU,
343 # so must skip actual syscall
341 movl ORIG_EAX(%esp), %eax 344 movl ORIG_EAX(%esp), %eax
342 cmpl $(nr_syscalls), %eax 345 cmpl $(nr_syscalls), %eax
343 jnae syscall_call 346 jnae syscall_call
@@ -504,7 +507,7 @@ label: \
504 pushl $__KERNEL_CS; \ 507 pushl $__KERNEL_CS; \
505 pushl $sysenter_past_esp 508 pushl $sysenter_past_esp
506 509
507ENTRY(debug) 510KPROBE_ENTRY(debug)
508 cmpl $sysenter_entry,(%esp) 511 cmpl $sysenter_entry,(%esp)
509 jne debug_stack_correct 512 jne debug_stack_correct
510 FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn) 513 FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
@@ -515,7 +518,7 @@ debug_stack_correct:
515 movl %esp,%eax # pt_regs pointer 518 movl %esp,%eax # pt_regs pointer
516 call do_debug 519 call do_debug
517 jmp ret_from_exception 520 jmp ret_from_exception
518 521 .previous .text
519/* 522/*
520 * NMI is doubly nasty. It can happen _while_ we're handling 523 * NMI is doubly nasty. It can happen _while_ we're handling
521 * a debug fault, and the debug fault hasn't yet been able to 524 * a debug fault, and the debug fault hasn't yet been able to
@@ -588,13 +591,14 @@ nmi_16bit_stack:
588 .long 1b,iret_exc 591 .long 1b,iret_exc
589.previous 592.previous
590 593
591ENTRY(int3) 594KPROBE_ENTRY(int3)
592 pushl $-1 # mark this as an int 595 pushl $-1 # mark this as an int
593 SAVE_ALL 596 SAVE_ALL
594 xorl %edx,%edx # zero error code 597 xorl %edx,%edx # zero error code
595 movl %esp,%eax # pt_regs pointer 598 movl %esp,%eax # pt_regs pointer
596 call do_int3 599 call do_int3
597 jmp ret_from_exception 600 jmp ret_from_exception
601 .previous .text
598 602
599ENTRY(overflow) 603ENTRY(overflow)
600 pushl $0 604 pushl $0
@@ -628,17 +632,19 @@ ENTRY(stack_segment)
628 pushl $do_stack_segment 632 pushl $do_stack_segment
629 jmp error_code 633 jmp error_code
630 634
631ENTRY(general_protection) 635KPROBE_ENTRY(general_protection)
632 pushl $do_general_protection 636 pushl $do_general_protection
633 jmp error_code 637 jmp error_code
638 .previous .text
634 639
635ENTRY(alignment_check) 640ENTRY(alignment_check)
636 pushl $do_alignment_check 641 pushl $do_alignment_check
637 jmp error_code 642 jmp error_code
638 643
639ENTRY(page_fault) 644KPROBE_ENTRY(page_fault)
640 pushl $do_page_fault 645 pushl $do_page_fault
641 jmp error_code 646 jmp error_code
647 .previous .text
642 648
643#ifdef CONFIG_X86_MCE 649#ifdef CONFIG_X86_MCE
644ENTRY(machine_check) 650ENTRY(machine_check)