Lines Matching +full:fault +full:- +full:q

1 .. SPDX-License-Identifier: GPL-2.0
27 hardware present in every Linux-capable CPU handle this test.
32 accessible, the CPU generates a page fault exception and calls the
33 page fault handler::
37 in arch/x86/mm/fault.c. The parameters on the stack are set up by
44 space of the process, the fault probably occurred, because the page
51 (i.e. regs->eip) to find an address where the execution can continue
52 (fixup). If this search is successful, the fault handler modifies the
53 return address (again regs->eip) and returns. The execution will
73 long __gu_err = - 14 , __gu_val = 0;
75 if (((((0 + current_set[0])->tss.segment) == 0x18 ) ||
77 ((unsigned long)(__gu_addr ) <= 0xC0000000UL - (sizeof(*(buf)))))))
92 ".text" : "=r"(__gu_err), "=q" (__gu_val): "m"((*(struct __large_struct *)
93 ( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err )) ;
107 ( __gu_addr )) ), "i"(- 14 ), "0"( __gu_err ));
120 ( __gu_addr )) ), "i"(- 14 ), "0"(__gu_err));
138 > cmpl $-1073741825,64(%esp)
147 > 3: movl $-14,%eax
165 > objdump --section-headers vmlinux
167 > vmlinux: file format elf32-i386
192 > objdump --disassemble --section=.text vmlinux
210 > objdump --disassemble --section=.fixup vmlinux
218 > objdump --full-contents --section=__ex_table vmlinux
240 3: movl $-14,%eax
250 backward) is the address of the instruction that might fault, i.e.
256 the fault, in our case the actual value is c0199ff5:
257 the original assembly code: > 3: movl $-14,%eax
261 to the instruction after the one that triggered the fault, ie. local label 2b.
277 So, what actually happens if a fault from kernel mode with no suitable
287 #. kernelmode_fixup_or_oops() calls fixup_exception() (regs->eip == c017e7a5);
291 and returns the address of the associated fault handle code c0199ff5.
292 #. fixup_exception() modifies its own return address to point to the fault
294 #. execution continues in the fault handling code.
295 #. a) EAX becomes -EFAULT (== -14)
303 we set EAX to -EFAULT in the exception handler code. Well, the
305 successful, -EFAULT on failure. Our original code did not test this
307 return -EFAULT. GCC selected EAX to return this value.
315 Things changed when 64-bit support was added to x86 Linux. Rather than
317 from 32-bits to 64 bits, a clever trick was used to store addresses
323 .long (from) - .
324 .long (to) - .
326 and the C-code that uses these values converts back to absolute addresses
331 return (unsigned long)&x->insn + x->insn;
335 This is also 32-bits wide and contains a third relative function
342 This case provides the fault number of the trap that occurred at
343 entry->insn. It is used to distinguish page faults from machine