Commit 3697cd9a authored by Amerigo Wang's avatar Amerigo Wang Committed by Linus Torvalds

Doc: update Documentation/exception.txt

Update Documentation/exception.txt.
Remove trailing whitespaces in it.
Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 097041e5
Kernel level exception handling in Linux 2.1.8 Kernel level exception handling in Linux
Commentary by Joerg Pommnitz <joerg@raleigh.ibm.com> Commentary by Joerg Pommnitz <joerg@raleigh.ibm.com>
When a process runs in kernel mode, it often has to access user When a process runs in kernel mode, it often has to access user
...@@ -29,8 +29,8 @@ page fault handler ...@@ -29,8 +29,8 @@ page fault handler
void do_page_fault(struct pt_regs *regs, unsigned long error_code) void do_page_fault(struct pt_regs *regs, unsigned long error_code)
in arch/i386/mm/fault.c. The parameters on the stack are set up by in arch/x86/mm/fault.c. The parameters on the stack are set up by
the low level assembly glue in arch/i386/kernel/entry.S. The parameter the low level assembly glue in arch/x86/kernel/entry_32.S. The parameter
regs is a pointer to the saved registers on the stack, error_code regs is a pointer to the saved registers on the stack, error_code
contains a reason code for the exception. contains a reason code for the exception.
...@@ -52,12 +52,12 @@ Where does fixup point to? ...@@ -52,12 +52,12 @@ Where does fixup point to?
Since we jump to the contents of fixup, fixup obviously points Since we jump to the contents of fixup, fixup obviously points
to executable code. This code is hidden inside the user access macros. to executable code. This code is hidden inside the user access macros.
I have picked the get_user macro defined in include/asm/uaccess.h as an I have picked the get_user macro defined in arch/x86/include/asm/uaccess.h
example. The definition is somewhat hard to follow, so let's peek at as an example. The definition is somewhat hard to follow, so let's peek at
the code generated by the preprocessor and the compiler. I selected the code generated by the preprocessor and the compiler. I selected
the get_user call in drivers/char/console.c for a detailed examination. the get_user call in drivers/char/sysrq.c for a detailed examination.
The original code in console.c line 1405: The original code in sysrq.c line 587:
get_user(c, buf); get_user(c, buf);
The preprocessor output (edited to become somewhat readable): The preprocessor output (edited to become somewhat readable):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment