aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events/uprobes.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-11-09 13:49:39 -0500
committerOleg Nesterov <oleg@redhat.com>2013-11-20 10:31:01 -0500
commitc912dae60ae6f659455f239298110adc67a5f3e9 (patch)
tree1997566bb556e768f12881dd39d1d1036ef9e5b5 /kernel/events/uprobes.c
parent3d78e945b6249d4ef2308192343f8b203b1d7ea5 (diff)
uprobes: Cleanup !CONFIG_UPROBES decls, unexport xol_area
1. Don't include asm/uprobes.h unconditionally, we only need it if CONFIG_UPROBES. 2. Move the definition of "struct xol_area" into uprobes.c. Perhaps we should simply kill struct uprobes_state, it buys nothing. 3. Kill the dummy definition of uprobe_get_swbp_addr(), nobody except handle_swbp() needs it. 4. Purely cosmetic, but move the decl of uprobe_get_swbp_addr() up, close to other __weak helpers. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/events/uprobes.c')
-rw-r--r--kernel/events/uprobes.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 445962a72498..51a7f535ff96 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -86,6 +86,25 @@ struct return_instance {
86}; 86};
87 87
88/* 88/*
89 * On a breakpoint hit, thread contests for a slot. It frees the
90 * slot after singlestep. Currently a fixed number of slots are
91 * allocated.
92 */
93struct xol_area {
94 wait_queue_head_t wq; /* if all slots are busy */
95 atomic_t slot_count; /* number of in-use slots */
96 unsigned long *bitmap; /* 0 = free slot */
97 struct page *page;
98
99 /*
100 * We keep the vma's vm_start rather than a pointer to the vma
101 * itself. The probed process or a naughty kernel module could make
102 * the vma go away, and we must handle that reasonably gracefully.
103 */
104 unsigned long vaddr; /* Page(s) of instruction slots */
105};
106
107/*
89 * valid_vma: Verify if the specified vma is an executable vma 108 * valid_vma: Verify if the specified vma is an executable vma
90 * Relax restrictions while unregistering: vm_flags might have 109 * Relax restrictions while unregistering: vm_flags might have
91 * changed after breakpoint was inserted. 110 * changed after breakpoint was inserted.