aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/uprobes.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-02-17 03:27:41 -0500
committerIngo Molnar <mingo@elte.hu>2012-02-17 04:18:07 -0500
commit7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89 (patch)
tree23987f194dcd91b0ba6d27f7f6e08c178797488e /arch/x86/include/asm/uprobes.h
parent2b144498350860b6ee9dc57ff27a93ad488de5dc (diff)
uprobes/core: Clean up, refactor and improve the code
Make the uprobes code readable to me: - improve the Kconfig text so that a mere mortal gets some idea what CONFIG_UPROBES=y is really about - do trivial renames to standardize around the uprobes_*() namespace - clean up and simplify various code flow details - separate basic blocks of functionality - line break artifact and white space related removal - use standard local varible definition blocks - use vertical spacing to make things more readable - remove unnecessary volatile - restructure comment blocks to make them more uniform and more readable in general Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Anton Arapov <anton@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Link: http://lkml.kernel.org/n/tip-ewbwhb8o6navvllsauu7k07p@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/uprobes.h')
-rw-r--r--arch/x86/include/asm/uprobes.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h
index 8208234391ff..072df3902636 100644
--- a/arch/x86/include/asm/uprobes.h
+++ b/arch/x86/include/asm/uprobes.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_UPROBES_H 1#ifndef _ASM_UPROBES_H
2#define _ASM_UPROBES_H 2#define _ASM_UPROBES_H
3/* 3/*
4 * Userspace Probes (UProbes) for x86 4 * User-space Probes (UProbes) for x86
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -24,19 +24,20 @@
24 */ 24 */
25 25
26typedef u8 uprobe_opcode_t; 26typedef u8 uprobe_opcode_t;
27#define MAX_UINSN_BYTES 16
28#define UPROBES_XOL_SLOT_BYTES 128 /* to keep it cache aligned */
29 27
30#define UPROBES_BKPT_INSN 0xcc 28#define MAX_UINSN_BYTES 16
31#define UPROBES_BKPT_INSN_SIZE 1 29#define UPROBES_XOL_SLOT_BYTES 128 /* to keep it cache aligned */
30
31#define UPROBES_BKPT_INSN 0xcc
32#define UPROBES_BKPT_INSN_SIZE 1
32 33
33struct uprobe_arch_info { 34struct uprobe_arch_info {
34 u16 fixups; 35 u16 fixups;
35#ifdef CONFIG_X86_64 36#ifdef CONFIG_X86_64
36 unsigned long rip_rela_target_address; 37 unsigned long rip_rela_target_address;
37#endif 38#endif
38}; 39};
39 40
40struct uprobe; 41struct uprobe;
41extern int analyze_insn(struct mm_struct *mm, struct uprobe *uprobe); 42extern int arch_uprobes_analyze_insn(struct mm_struct *mm, struct uprobe *uprobe);
42#endif /* _ASM_UPROBES_H */ 43#endif /* _ASM_UPROBES_H */