forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit0d07c0e
x86/kprobes: Fix optprobe to detect INT3 padding correctly
Commit7705dc8 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes")changed the padding bytes between functions from NOP to INT3. However,when optprobe decodes a target function it finds INT3 and gives up thejump optimization.Instead of giving up any INT3 detection, check whether the rest of thebytes to the end of the function are INT3. If all of them are INT3,those come from the linker. In that case, continue the optprobe jumpoptimization. [ bp: Massage commit message. ]Fixes:7705dc8 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes")Reported-by: Adam Zabrocki <pi3@pi3.com.pl>Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>Signed-off-by: Borislav Petkov <bp@suse.de>Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>Reviewed-by: Kees Cook <keescook@chromium.org>Cc: stable@vger.kernel.orgLink:https://lkml.kernel.org/r/160767025681.3880685.16021570341428835411.stgit@devnote21 parent190113b commit0d07c0e
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
| |||
310 | 323 | | |
311 | 324 | | |
312 | 325 | | |
313 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
314 | 331 | | |
315 | | - | |
| 332 | + | |
| 333 | + | |
316 | 334 | | |
317 | 335 | | |
318 | 336 | | |
| |||
0 commit comments
Comments
(0)