forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commitc07a8f8
x86/kprobes: Fix kernel crash when probing .entry_trampoline code
Disable the kprobe probing of the entry trampoline:.entry_trampoline is a code area that is used to ensure page tableisolation between userspace and kernelspace.At the beginning of the execution of the trampoline, we load thekernel's CR3 register. This has the effect of enabling the translationof the kernel virtual addresses to physical addresses. Before thishappens most kernel addresses can not be translated because the runningprocess' CR3 is still used.If a kprobe is placed on the trampoline code before that change of theCR3 register happens the kernel crashes because int3 handling pages arenot accessible.To fix this, add the .entry_trampoline section to the kprobe blacklistto prohibit the probing of code before all the kernel pages areaccessible.Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>Reviewed-by: Thomas Gleixner <tglx@linutronix.de>Cc: Andy Lutomirski <luto@kernel.org>Cc: Borislav Petkov <bp@alien8.de>Cc: Brian Gerst <brgerst@gmail.com>Cc: Denys Vlasenko <dvlasenk@redhat.com>Cc: H. Peter Anvin <hpa@zytor.com>Cc: Josh Poimboeuf <jpoimboe@redhat.com>Cc: Linus Torvalds <torvalds@linux-foundation.org>Cc: Peter Zijlstra <peterz@infradead.org>Cc: mathieu.desnoyers@efficios.comCc: mhiramat@kernel.orgLink:http://lkml.kernel.org/r/1520565492-4637-2-git-send-email-francis.deslauriers@efficios.comSigned-off-by: Ingo Molnar <mingo@kernel.org>1 parentc5b679f commitc07a8f8
File tree
3 files changed
+12
-1
lines changed- arch/x86
- include/asm
- kernel
- kprobes
3 files changed
+12
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
13 | 14 |
| |
14 | 15 |
| |
15 | 16 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1168 | 1168 |
| |
1169 | 1169 |
| |
1170 | 1170 |
| |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1171 | 1178 |
| |
1172 | 1179 |
| |
1173 | 1180 |
| |
1174 |
| - | |
| 1181 | + | |
| 1182 | + | |
1175 | 1183 |
| |
1176 | 1184 |
| |
1177 | 1185 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
| 121 | + | |
121 | 122 |
| |
122 | 123 |
| |
123 | 124 |
| |
| 125 | + | |
124 | 126 |
| |
125 | 127 |
| |
126 | 128 |
| |
|
0 commit comments
Comments
(0)