Lines Matching refs:in
1 Kernel level exception handling in Linux
4 When a process runs in kernel mode, it often has to access user
14 in type (read or write). To do this, verify_read had to look up the
22 hardware present in every Linux-capable CPU handle this test.
32 in arch/x86/mm/fault.c. The parameters on the stack are set up by
33 the low level assembly glue in arch/x86/kernel/entry_32.S. The parameter
40 was not swapped in, write protected or something similar. However,
41 we are interested in the other case: the address is not valid, there
49 continue at the address in fixup.
55 I have picked the get_user macro defined in arch/x86/include/asm/uaccess.h
58 the get_user call in drivers/char/sysrq.c for a detailed examination.
60 The original code in sysrq.c line 587:
154 to the unified address space we can just access the address in user
182 There are obviously 2 non standard ELF sections in the generated object
183 file. But first we want to find out what happened to our code in the
200 The instructions bracketed in the .section directives are no longer
201 in the normal execution path. They are located in a different section
217 or in human readable byte order:
231 sections in the ELF object file. So the instructions
235 ended up in the .fixup section of the object file and the addresses
237 ended up in the __ex_table section of the object file. 1b and 3b
240 in our case the address of the label 1 is c017e7a5:
242 and linked in vmlinux : > c017e7a5 <do_con_write+e1> movb (%ebx),%dl
245 the fault, in our case the actual value is c0199ff5:
247 and linked in vmlinux : > c0199ff5 <.fixup+10b5> movl $0xfffffff2,%eax
258 c017e7a5,c0199ff5 in the exception table of the kernel.
268 5.) search_exception_table looks up the address c017e7a5 in the
273 7.) execution continues in the fault handling code.
279 The steps 8a to 8c in a certain way emulate the faulting instruction.
282 we set EAX to -EFAULT in the exception handler code. Well, the
285 return value, however the inline assembly code in get_user tries to
290 only use exceptions for code in the .text section. Any other section