mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Acked-by: Srikar Dronamraju <[email protected]>
This commit is contained in:
parent
3d78e945b6
commit
c912dae60a
2 changed files with 23 additions and 27 deletions
|
|
@ -85,6 +85,25 @@ struct return_instance {
|
|||
struct return_instance *next; /* keep as stack */
|
||||
};
|
||||
|
||||
/*
|
||||
* On a breakpoint hit, thread contests for a slot. It frees the
|
||||
* slot after singlestep. Currently a fixed number of slots are
|
||||
* allocated.
|
||||
*/
|
||||
struct xol_area {
|
||||
wait_queue_head_t wq; /* if all slots are busy */
|
||||
atomic_t slot_count; /* number of in-use slots */
|
||||
unsigned long *bitmap; /* 0 = free slot */
|
||||
struct page *page;
|
||||
|
||||
/*
|
||||
* We keep the vma's vm_start rather than a pointer to the vma
|
||||
* itself. The probed process or a naughty kernel module could make
|
||||
* the vma go away, and we must handle that reasonably gracefully.
|
||||
*/
|
||||
unsigned long vaddr; /* Page(s) of instruction slots */
|
||||
};
|
||||
|
||||
/*
|
||||
* valid_vma: Verify if the specified vma is an executable vma
|
||||
* Relax restrictions while unregistering: vm_flags might have
|
||||
|
|
|
|||
Loading…
Reference in a new issue