diff options
| author | Wang Nan <wangnan0@huawei.com> | 2015-01-08 21:19:49 -0500 |
|---|---|---|
| committer | Jon Medhurst <tixy@linaro.org> | 2015-01-09 04:36:50 -0500 |
| commit | fca08f326ae0423f03b097ff54de432fe77b95d0 (patch) | |
| tree | 40d680c04ec5ec613c0b8bb9ec9ff8b5821bc237 | |
| parent | b1940cd21c0f4abdce101253e860feff547291b0 (diff) | |
ARM: probes: move all probe code to dedicate directory
In discussion on LKML (https://lkml.org/lkml/2014/11/28/158), Russell
King suggests to move all probe related code to arch/arm/probes. This
patch does the work. Due to dependency on 'arch/arm/kernel/patch.h', this
patch also moves patch.h to 'arch/arm/include/asm/patch.h', and related
'#include' directives are also midified to '#include <asm/patch.h>'.
Following is an overview of this patch:
./arch/arm/kernel/ ./arch/arm/probes/
|-- Makefile |-- Makefile
|-- probes-arm.c ==> |-- decode-arm.c
|-- probes-arm.h ==> |-- decode-arm.h
|-- probes-thumb.c ==> |-- decode-thumb.c
|-- probes-thumb.h ==> |-- decode-thumb.h
|-- probes.c ==> |-- decode.c
|-- probes.h ==> |-- decode.h
| |-- kprobes
| | |-- Makefile
|-- kprobes-arm.c ==> | |-- actions-arm.c
|-- kprobes-common.c ==> | |-- actions-common.c
|-- kprobes-thumb.c ==> | |-- actions-thumb.c
|-- kprobes.c ==> | |-- core.c
|-- kprobes.h ==> | |-- core.h
|-- kprobes-test-arm.c ==> | |-- test-arm.c
|-- kprobes-test.c ==> | |-- test-core.c
|-- kprobes-test.h ==> | |-- test-core.h
|-- kprobes-test-thumb.c ==> | `-- test-thumb.c
| `-- uprobes
| |-- Makefile
|-- uprobes-arm.c ==> |-- actions-arm.c
|-- uprobes.c ==> |-- core.c
|-- uprobes.h ==> `-- core.h
|
`-- patch.h ==> arch/arm/include/asm/patch.h
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
| -rw-r--r-- | arch/arm/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/patch.h (renamed from arch/arm/kernel/patch.h) | 0 | ||||
| -rw-r--r-- | arch/arm/kernel/Makefile | 16 | ||||
| -rw-r--r-- | arch/arm/kernel/jump_label.c | 2 | ||||
| -rw-r--r-- | arch/arm/kernel/kgdb.c | 3 | ||||
| -rw-r--r-- | arch/arm/kernel/patch.c | 3 | ||||
| -rw-r--r-- | arch/arm/probes/Makefile | 7 | ||||
| -rw-r--r-- | arch/arm/probes/decode-arm.c (renamed from arch/arm/kernel/probes-arm.c) | 7 | ||||
| -rw-r--r-- | arch/arm/probes/decode-arm.h (renamed from arch/arm/kernel/probes-arm.h) | 4 | ||||
| -rw-r--r-- | arch/arm/probes/decode-thumb.c (renamed from arch/arm/kernel/probes-thumb.c) | 6 | ||||
| -rw-r--r-- | arch/arm/probes/decode-thumb.h (renamed from arch/arm/kernel/probes-thumb.h) | 4 | ||||
| -rw-r--r-- | arch/arm/probes/decode.c (renamed from arch/arm/kernel/probes.c) | 4 | ||||
| -rw-r--r-- | arch/arm/probes/decode.h (renamed from arch/arm/kernel/probes.h) | 2 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/Makefile | 11 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/actions-arm.c (renamed from arch/arm/kernel/kprobes-arm.c) | 6 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/actions-common.c (renamed from arch/arm/kernel/kprobes-common.c) | 4 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/actions-thumb.c (renamed from arch/arm/kernel/kprobes-thumb.c) | 6 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/core.c (renamed from arch/arm/kernel/kprobes.c) | 8 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/core.h (renamed from arch/arm/kernel/kprobes.h) | 3 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/test-arm.c (renamed from arch/arm/kernel/kprobes-test-arm.c) | 2 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/test-core.c (renamed from arch/arm/kernel/kprobes-test.c) | 8 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/test-core.h (renamed from arch/arm/kernel/kprobes-test.h) | 2 | ||||
| -rw-r--r-- | arch/arm/probes/kprobes/test-thumb.c (renamed from arch/arm/kernel/kprobes-test-thumb.c) | 4 | ||||
| -rw-r--r-- | arch/arm/probes/uprobes/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/probes/uprobes/actions-arm.c (renamed from arch/arm/kernel/uprobes-arm.c) | 6 | ||||
| -rw-r--r-- | arch/arm/probes/uprobes/core.c (renamed from arch/arm/kernel/uprobes.c) | 6 | ||||
| -rw-r--r-- | arch/arm/probes/uprobes/core.h (renamed from arch/arm/kernel/uprobes.h) | 0 |
27 files changed, 69 insertions, 57 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c1785eec2cf7..7f99cd652203 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -266,6 +266,7 @@ core-$(CONFIG_KVM_ARM_HOST) += arch/arm/kvm/ | |||
| 266 | 266 | ||
| 267 | # If we have a machine-specific directory, then include it in the build. | 267 | # If we have a machine-specific directory, then include it in the build. |
| 268 | core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ | 268 | core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ |
| 269 | core-y += arch/arm/probes/ | ||
| 269 | core-y += arch/arm/net/ | 270 | core-y += arch/arm/net/ |
| 270 | core-y += arch/arm/crypto/ | 271 | core-y += arch/arm/crypto/ |
| 271 | core-y += arch/arm/firmware/ | 272 | core-y += arch/arm/firmware/ |
diff --git a/arch/arm/kernel/patch.h b/arch/arm/include/asm/patch.h index 77e054c2f6cd..77e054c2f6cd 100644 --- a/arch/arm/kernel/patch.h +++ b/arch/arm/include/asm/patch.h | |||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index fb2b71ebe3f2..9c51a433e025 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
| @@ -51,20 +51,8 @@ obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o | |||
| 51 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o | 51 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o |
| 52 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o | 52 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o |
| 53 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | 53 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o |
| 54 | obj-$(CONFIG_UPROBES) += probes.o probes-arm.o uprobes.o uprobes-arm.o | 54 | # Main staffs in KPROBES are in arch/arm/probes/ . |
| 55 | obj-$(CONFIG_KPROBES) += probes.o kprobes.o kprobes-common.o patch.o | 55 | obj-$(CONFIG_KPROBES) += patch.o |
| 56 | ifdef CONFIG_THUMB2_KERNEL | ||
| 57 | obj-$(CONFIG_KPROBES) += kprobes-thumb.o probes-thumb.o | ||
| 58 | else | ||
| 59 | obj-$(CONFIG_KPROBES) += kprobes-arm.o probes-arm.o | ||
| 60 | endif | ||
| 61 | obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o | ||
| 62 | test-kprobes-objs := kprobes-test.o | ||
| 63 | ifdef CONFIG_THUMB2_KERNEL | ||
| 64 | test-kprobes-objs += kprobes-test-thumb.o | ||
| 65 | else | ||
| 66 | test-kprobes-objs += kprobes-test-arm.o | ||
| 67 | endif | ||
| 68 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o | 56 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o |
| 69 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o | 57 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o |
| 70 | obj-$(CONFIG_KGDB) += kgdb.o patch.o | 58 | obj-$(CONFIG_KGDB) += kgdb.o patch.o |
diff --git a/arch/arm/kernel/jump_label.c b/arch/arm/kernel/jump_label.c index afeeb9ea6f43..d8da075959bf 100644 --- a/arch/arm/kernel/jump_label.c +++ b/arch/arm/kernel/jump_label.c | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
| 2 | #include <linux/jump_label.h> | 2 | #include <linux/jump_label.h> |
| 3 | #include <asm/patch.h> | ||
| 3 | 4 | ||
| 4 | #include "insn.h" | 5 | #include "insn.h" |
| 5 | #include "patch.h" | ||
| 6 | 6 | ||
| 7 | #ifdef HAVE_JUMP_LABEL | 7 | #ifdef HAVE_JUMP_LABEL |
| 8 | 8 | ||
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index 07db2f8a1b45..a6ad93c9bce3 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c | |||
| @@ -14,10 +14,9 @@ | |||
| 14 | #include <linux/kgdb.h> | 14 | #include <linux/kgdb.h> |
| 15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
| 16 | 16 | ||
| 17 | #include <asm/patch.h> | ||
| 17 | #include <asm/traps.h> | 18 | #include <asm/traps.h> |
| 18 | 19 | ||
| 19 | #include "patch.h" | ||
| 20 | |||
| 21 | struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = | 20 | struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = |
| 22 | { | 21 | { |
| 23 | { "r0", 4, offsetof(struct pt_regs, ARM_r0)}, | 22 | { "r0", 4, offsetof(struct pt_regs, ARM_r0)}, |
diff --git a/arch/arm/kernel/patch.c b/arch/arm/kernel/patch.c index 5038960e3c55..69bda1a5707e 100644 --- a/arch/arm/kernel/patch.c +++ b/arch/arm/kernel/patch.c | |||
| @@ -8,8 +8,7 @@ | |||
| 8 | #include <asm/fixmap.h> | 8 | #include <asm/fixmap.h> |
| 9 | #include <asm/smp_plat.h> | 9 | #include <asm/smp_plat.h> |
| 10 | #include <asm/opcodes.h> | 10 | #include <asm/opcodes.h> |
| 11 | 11 | #include <asm/patch.h> | |
| 12 | #include "patch.h" | ||
| 13 | 12 | ||
| 14 | struct patch { | 13 | struct patch { |
| 15 | void *addr; | 14 | void *addr; |
diff --git a/arch/arm/probes/Makefile b/arch/arm/probes/Makefile new file mode 100644 index 000000000000..aa1f8590dcdd --- /dev/null +++ b/arch/arm/probes/Makefile | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | obj-$(CONFIG_UPROBES) += decode.o decode-arm.o uprobes/ | ||
| 2 | obj-$(CONFIG_KPROBES) += decode.o kprobes/ | ||
| 3 | ifdef CONFIG_THUMB2_KERNEL | ||
| 4 | obj-$(CONFIG_KPROBES) += decode-thumb.o | ||
| 5 | else | ||
| 6 | obj-$(CONFIG_KPROBES) += decode-arm.o | ||
| 7 | endif | ||
diff --git a/arch/arm/kernel/probes-arm.c b/arch/arm/probes/decode-arm.c index 8eaef81d8344..e39cc75952f2 100644 --- a/arch/arm/kernel/probes-arm.c +++ b/arch/arm/probes/decode-arm.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes-arm.c | 2 | * |
| 3 | * arch/arm/probes/decode-arm.c | ||
| 3 | * | 4 | * |
| 4 | * Some code moved here from arch/arm/kernel/kprobes-arm.c | 5 | * Some code moved here from arch/arm/kernel/kprobes-arm.c |
| 5 | * | 6 | * |
| @@ -20,8 +21,8 @@ | |||
| 20 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
| 21 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
| 22 | 23 | ||
| 23 | #include "probes.h" | 24 | #include "decode.h" |
| 24 | #include "probes-arm.h" | 25 | #include "decode-arm.h" |
| 25 | 26 | ||
| 26 | #define sign_extend(x, signbit) ((x) | (0 - ((x) & (1 << (signbit))))) | 27 | #define sign_extend(x, signbit) ((x) | (0 - ((x) & (1 << (signbit))))) |
| 27 | 28 | ||
diff --git a/arch/arm/kernel/probes-arm.h b/arch/arm/probes/decode-arm.h index ace6572f6e26..9c56b40d6a57 100644 --- a/arch/arm/kernel/probes-arm.h +++ b/arch/arm/probes/decode-arm.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes-arm.h | 2 | * arch/arm/probes/decode-arm.h |
| 3 | * | 3 | * |
| 4 | * Copyright 2013 Linaro Ltd. | 4 | * Copyright 2013 Linaro Ltd. |
| 5 | * Written by: David A. Long | 5 | * Written by: David A. Long |
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef _ARM_KERNEL_PROBES_ARM_H | 15 | #ifndef _ARM_KERNEL_PROBES_ARM_H |
| 16 | #define _ARM_KERNEL_PROBES_ARM_H | 16 | #define _ARM_KERNEL_PROBES_ARM_H |
| 17 | 17 | ||
| 18 | #include "decode.h" | ||
| 19 | |||
| 18 | enum probes_arm_action { | 20 | enum probes_arm_action { |
| 19 | PROBES_EMULATE_NONE, | 21 | PROBES_EMULATE_NONE, |
| 20 | PROBES_SIMULATE_NOP, | 22 | PROBES_SIMULATE_NOP, |
diff --git a/arch/arm/kernel/probes-thumb.c b/arch/arm/probes/decode-thumb.c index 4131351e812f..2f0453a895dc 100644 --- a/arch/arm/kernel/probes-thumb.c +++ b/arch/arm/probes/decode-thumb.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes-thumb.c | 2 | * arch/arm/probes/decode-thumb.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
| @@ -12,8 +12,8 @@ | |||
| 12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | 14 | ||
| 15 | #include "probes.h" | 15 | #include "decode.h" |
| 16 | #include "probes-thumb.h" | 16 | #include "decode-thumb.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | static const union decode_item t32_table_1110_100x_x0xx[] = { | 19 | static const union decode_item t32_table_1110_100x_x0xx[] = { |
diff --git a/arch/arm/kernel/probes-thumb.h b/arch/arm/probes/decode-thumb.h index 7c6f6ebe514f..039013c7131d 100644 --- a/arch/arm/kernel/probes-thumb.h +++ b/arch/arm/probes/decode-thumb.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes-thumb.h | 2 | * arch/arm/probes/decode-thumb.h |
| 3 | * | 3 | * |
| 4 | * Copyright 2013 Linaro Ltd. | 4 | * Copyright 2013 Linaro Ltd. |
| 5 | * Written by: David A. Long | 5 | * Written by: David A. Long |
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef _ARM_KERNEL_PROBES_THUMB_H | 15 | #ifndef _ARM_KERNEL_PROBES_THUMB_H |
| 16 | #define _ARM_KERNEL_PROBES_THUMB_H | 16 | #define _ARM_KERNEL_PROBES_THUMB_H |
| 17 | 17 | ||
| 18 | #include "decode.h" | ||
| 19 | |||
| 18 | /* | 20 | /* |
| 19 | * True if current instruction is in an IT block. | 21 | * True if current instruction is in an IT block. |
| 20 | */ | 22 | */ |
diff --git a/arch/arm/kernel/probes.c b/arch/arm/probes/decode.c index a8ab540d7e73..3b05d5742359 100644 --- a/arch/arm/kernel/probes.c +++ b/arch/arm/probes/decode.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes.c | 2 | * arch/arm/probes/decode.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
| 18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
| 19 | 19 | ||
| 20 | #include "probes.h" | 20 | #include "decode.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | #ifndef find_str_pc_offset | 23 | #ifndef find_str_pc_offset |
diff --git a/arch/arm/kernel/probes.h b/arch/arm/probes/decode.h index dba9f2466a93..1d0b53169080 100644 --- a/arch/arm/kernel/probes.h +++ b/arch/arm/probes/decode.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/probes.h | 2 | * arch/arm/probes/decode.h |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
diff --git a/arch/arm/probes/kprobes/Makefile b/arch/arm/probes/kprobes/Makefile new file mode 100644 index 000000000000..eb38a428ecd6 --- /dev/null +++ b/arch/arm/probes/kprobes/Makefile | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | obj-$(CONFIG_KPROBES) += core.o actions-common.o | ||
| 2 | obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o | ||
| 3 | test-kprobes-objs := test-core.o | ||
| 4 | |||
| 5 | ifdef CONFIG_THUMB2_KERNEL | ||
| 6 | obj-$(CONFIG_KPROBES) += actions-thumb.o | ||
| 7 | test-kprobes-objs += test-thumb.o | ||
| 8 | else | ||
| 9 | obj-$(CONFIG_KPROBES) += actions-arm.o | ||
| 10 | test-kprobes-objs += test-arm.o | ||
| 11 | endif | ||
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/probes/kprobes/actions-arm.c index ac300c60d656..8797879f7b3a 100644 --- a/arch/arm/kernel/kprobes-arm.c +++ b/arch/arm/probes/kprobes/actions-arm.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/kprobes-decode.c | 2 | * arch/arm/probes/kprobes/actions-arm.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2006, 2007 Motorola Inc. | 4 | * Copyright (C) 2006, 2007 Motorola Inc. |
| 5 | * | 5 | * |
| @@ -62,8 +62,8 @@ | |||
| 62 | #include <linux/kprobes.h> | 62 | #include <linux/kprobes.h> |
| 63 | #include <linux/ptrace.h> | 63 | #include <linux/ptrace.h> |
| 64 | 64 | ||
| 65 | #include "kprobes.h" | 65 | #include "../decode-arm.h" |
| 66 | #include "probes-arm.h" | 66 | #include "core.h" |
| 67 | 67 | ||
| 68 | #if __LINUX_ARM_ARCH__ >= 6 | 68 | #if __LINUX_ARM_ARCH__ >= 6 |
| 69 | #define BLX(reg) "blx "reg" \n\t" | 69 | #define BLX(reg) "blx "reg" \n\t" |
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/probes/kprobes/actions-common.c index 0bf5d64eba1d..bd20a71cd34a 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/probes/kprobes/actions-common.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/kprobes-common.c | 2 | * arch/arm/probes/kprobes/actions-common.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
| @@ -15,7 +15,7 @@ | |||
| 15 | #include <linux/kprobes.h> | 15 | #include <linux/kprobes.h> |
| 16 | #include <asm/opcodes.h> | 16 | #include <asm/opcodes.h> |
| 17 | 17 | ||
| 18 | #include "kprobes.h" | 18 | #include "core.h" |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | static void __kprobes simulate_ldm1stm1(probes_opcode_t insn, | 21 | static void __kprobes simulate_ldm1stm1(probes_opcode_t insn, |
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/probes/kprobes/actions-thumb.c index 9495d7f3516f..6c4e60b62826 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/probes/kprobes/actions-thumb.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/kprobes-thumb.c | 2 | * arch/arm/probes/kprobes/actions-thumb.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
| @@ -13,8 +13,8 @@ | |||
| 13 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
| 14 | #include <linux/kprobes.h> | 14 | #include <linux/kprobes.h> |
| 15 | 15 | ||
| 16 | #include "kprobes.h" | 16 | #include "../decode-thumb.h" |
| 17 | #include "probes-thumb.h" | 17 | #include "core.h" |
| 18 | 18 | ||
| 19 | /* These emulation encodings are functionally equivalent... */ | 19 | /* These emulation encodings are functionally equivalent... */ |
| 20 | #define t32_emulate_rd8rn16rm0ra12_noflags \ | 20 | #define t32_emulate_rd8rn16rm0ra12_noflags \ |
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/probes/kprobes/core.c index 6d644202c8dc..701f49d74c35 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/probes/kprobes/core.c | |||
| @@ -30,11 +30,11 @@ | |||
| 30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
| 31 | #include <linux/percpu.h> | 31 | #include <linux/percpu.h> |
| 32 | #include <linux/bug.h> | 32 | #include <linux/bug.h> |
| 33 | #include <asm/patch.h> | ||
| 33 | 34 | ||
| 34 | #include "kprobes.h" | 35 | #include "../decode-arm.h" |
| 35 | #include "probes-arm.h" | 36 | #include "../decode-thumb.h" |
| 36 | #include "probes-thumb.h" | 37 | #include "core.h" |
| 37 | #include "patch.h" | ||
| 38 | 38 | ||
| 39 | #define MIN_STACK_SIZE(addr) \ | 39 | #define MIN_STACK_SIZE(addr) \ |
| 40 | min((unsigned long)MAX_STACK_SIZE, \ | 40 | min((unsigned long)MAX_STACK_SIZE, \ |
diff --git a/arch/arm/kernel/kprobes.h b/arch/arm/probes/kprobes/core.h index 9a2712ecefc3..2e1e5a3d9155 100644 --- a/arch/arm/kernel/kprobes.h +++ b/arch/arm/probes/kprobes/core.h | |||
| @@ -19,7 +19,8 @@ | |||
| 19 | #ifndef _ARM_KERNEL_KPROBES_H | 19 | #ifndef _ARM_KERNEL_KPROBES_H |
| 20 | #define _ARM_KERNEL_KPROBES_H | 20 | #define _ARM_KERNEL_KPROBES_H |
| 21 | 21 | ||
| 22 | #include "probes.h" | 22 | #include <asm/kprobes.h> |
| 23 | #include "../decode.h" | ||
| 23 | 24 | ||
| 24 | /* | 25 | /* |
| 25 | * These undefined instructions must be unique and | 26 | * These undefined instructions must be unique and |
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/probes/kprobes/test-arm.c index cb1424240ff6..d9a1255f3043 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/probes/kprobes/test-arm.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include <asm/system_info.h> | 13 | #include <asm/system_info.h> |
| 14 | #include <asm/opcodes.h> | 14 | #include <asm/opcodes.h> |
| 15 | 15 | ||
| 16 | #include "kprobes-test.h" | 16 | #include "test-core.h" |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | #define TEST_ISA "32" | 19 | #define TEST_ISA "32" |
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/probes/kprobes/test-core.c index b206d7790c77..7ab633d51954 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/probes/kprobes/test-core.c | |||
| @@ -209,10 +209,10 @@ | |||
| 209 | #include <linux/bug.h> | 209 | #include <linux/bug.h> |
| 210 | #include <asm/opcodes.h> | 210 | #include <asm/opcodes.h> |
| 211 | 211 | ||
| 212 | #include "kprobes.h" | 212 | #include "core.h" |
| 213 | #include "probes-arm.h" | 213 | #include "test-core.h" |
| 214 | #include "probes-thumb.h" | 214 | #include "../decode-arm.h" |
| 215 | #include "kprobes-test.h" | 215 | #include "../decode-thumb.h" |
| 216 | 216 | ||
| 217 | 217 | ||
| 218 | #define BENCHMARKING 1 | 218 | #define BENCHMARKING 1 |
diff --git a/arch/arm/kernel/kprobes-test.h b/arch/arm/probes/kprobes/test-core.h index 4430990e90e7..9991754947bc 100644 --- a/arch/arm/kernel/kprobes-test.h +++ b/arch/arm/probes/kprobes/test-core.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/kprobes-test.h | 2 | * arch/arm/probes/kprobes/test-core.h |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
diff --git a/arch/arm/kernel/kprobes-test-thumb.c b/arch/arm/probes/kprobes/test-thumb.c index 844dd10d8593..6c6e9a9bb675 100644 --- a/arch/arm/kernel/kprobes-test-thumb.c +++ b/arch/arm/probes/kprobes/test-thumb.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/kernel/kprobes-test-thumb.c | 2 | * arch/arm/probes/kprobes/test-thumb.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. | 4 | * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>. |
| 5 | * | 5 | * |
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <asm/opcodes.h> | 13 | #include <asm/opcodes.h> |
| 14 | 14 | ||
| 15 | #include "kprobes-test.h" | 15 | #include "test-core.h" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | #define TEST_ISA "16" | 18 | #define TEST_ISA "16" |
diff --git a/arch/arm/probes/uprobes/Makefile b/arch/arm/probes/uprobes/Makefile new file mode 100644 index 000000000000..e1dc3d0f6d5a --- /dev/null +++ b/arch/arm/probes/uprobes/Makefile | |||
| @@ -0,0 +1 @@ | |||
| obj-$(CONFIG_UPROBES) += core.o actions-arm.o | |||
diff --git a/arch/arm/kernel/uprobes-arm.c b/arch/arm/probes/uprobes/actions-arm.c index d3b655ff17da..1dd4916ba8aa 100644 --- a/arch/arm/kernel/uprobes-arm.c +++ b/arch/arm/probes/uprobes/actions-arm.c | |||
| @@ -13,9 +13,9 @@ | |||
| 13 | #include <linux/uprobes.h> | 13 | #include <linux/uprobes.h> |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | 15 | ||
| 16 | #include "probes.h" | 16 | #include "../decode.h" |
| 17 | #include "probes-arm.h" | 17 | #include "../decode-arm.h" |
| 18 | #include "uprobes.h" | 18 | #include "core.h" |
| 19 | 19 | ||
| 20 | static int uprobes_substitute_pc(unsigned long *pinsn, u32 oregs) | 20 | static int uprobes_substitute_pc(unsigned long *pinsn, u32 oregs) |
| 21 | { | 21 | { |
diff --git a/arch/arm/kernel/uprobes.c b/arch/arm/probes/uprobes/core.c index 56adf9c1fde0..b2954f6d3abe 100644 --- a/arch/arm/kernel/uprobes.c +++ b/arch/arm/probes/uprobes/core.c | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #include <asm/opcodes.h> | 17 | #include <asm/opcodes.h> |
| 18 | #include <asm/traps.h> | 18 | #include <asm/traps.h> |
| 19 | 19 | ||
| 20 | #include "probes.h" | 20 | #include "../decode.h" |
| 21 | #include "probes-arm.h" | 21 | #include "../decode-arm.h" |
| 22 | #include "uprobes.h" | 22 | #include "core.h" |
| 23 | 23 | ||
| 24 | #define UPROBE_TRAP_NR UINT_MAX | 24 | #define UPROBE_TRAP_NR UINT_MAX |
| 25 | 25 | ||
diff --git a/arch/arm/kernel/uprobes.h b/arch/arm/probes/uprobes/core.h index 1d0c12dfbd03..1d0c12dfbd03 100644 --- a/arch/arm/kernel/uprobes.h +++ b/arch/arm/probes/uprobes/core.h | |||
