Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1345668
| From | tip-bot for Oleg Nesterov <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault |
| Date | 2016-02-29 12:10 +0100 |
| Message-ID | <r7tSc-2et-55@gated-at.bofh.it> (permalink) |
| References | <r6Vns-15z-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 869ae76147ffdf21ad24f0e599303cd58a2bb39f
Gitweb: http://git.kernel.org/tip/869ae76147ffdf21ad24f0e599303cd58a2bb39f
Author: Oleg Nesterov <oleg@redhat.com>
AuthorDate: Sat, 27 Feb 2016 23:11:28 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 29 Feb 2016 08:47:51 +0100
uprobes: __create_xol_area() must nullify xol_mapping.fault
As Jiri pointed out, this recent commit:
f872f5400cc0 ("mm: Add a vm_special_mapping.fault() method")
breaks uprobes: __create_xol_area() doesn't initialize the new ->fault()
method and this obviously leads to kernel crash when the application
tries to execute the probed insn after bp hit.
We probably want to add uprobes_special_mapping_fault(), this allows to
turn xol_area->xol_mapping into a single instance of vm_special_mapping.
But we need a simple fix, so lets change __create_xol() to nullify the
new member as Jiri suggests.
Suggested-by: Jiri Olsa <jolsa@redhat.com>
Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <tipbot@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160227221128.GA29565@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/events/uprobes.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 0167679..5f6ce93 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1178,6 +1178,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
goto free_area;
area->xol_mapping.name = "[uprobes]";
+ area->xol_mapping.fault = NULL;
area->xol_mapping.pages = area->pages;
area->pages[0] = alloc_page(GFP_HIGHUSER);
if (!area->pages[0])
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault Oleg Nesterov <oleg@redhat.com> - 2016-02-27 23:20 +0100
[tip:x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault tip-bot for Oleg Nesterov <tipbot@zytor.com> - 2016-02-29 12:10 +0100
Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault Peter Zijlstra <peterz@infradead.org> - 2016-02-29 12:50 +0100
Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault Oleg Nesterov <oleg@redhat.com> - 2016-02-29 17:00 +0100
Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault Peter Zijlstra <peterz@infradead.org> - 2016-02-29 17:20 +0100
csiph-web