summaryrefslogtreecommitdiff
path: root/kprobe
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-11-25 16:14:17 +0400
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2013-11-28 16:12:23 +0400
commit4081ba6b0d873aeab4fc66fe6a149c1a21a20dd4 (patch)
treea05eba61044215d0d51c4710ee740161c78f907a /kprobe
parent49562f498c7e236dc13b5ffa24f41266a13ccbca (diff)
downloadswap-modules-4081ba6b0d873aeab4fc66fe6a149c1a21a20dd4.tar.gz
swap-modules-4081ba6b0d873aeab4fc66fe6a149c1a21a20dd4.tar.bz2
swap-modules-4081ba6b0d873aeab4fc66fe6a149c1a21a20dd4.zip
[FIX] US instrumentation running process
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com> Change-Id: Ib5c5f526e12d9abdb246b16b562637d620370f2b
Diffstat (limited to 'kprobe')
-rw-r--r--kprobe/arch/asm-x86/dbi_kprobes.h1
-rw-r--r--kprobe/dbi_insn_slots.c3
-rw-r--r--kprobe/dbi_kprobes.h5
3 files changed, 4 insertions, 5 deletions
diff --git a/kprobe/arch/asm-x86/dbi_kprobes.h b/kprobe/arch/asm-x86/dbi_kprobes.h
index 24cf06ad..6850c243 100644
--- a/kprobe/arch/asm-x86/dbi_kprobes.h
+++ b/kprobe/arch/asm-x86/dbi_kprobes.h
@@ -57,6 +57,7 @@ typedef u8 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION 0xcc
#define RELATIVEJUMP_INSTRUCTION 0xe9
+#define BP_INSN_SIZE 1
#define MAX_INSN_SIZE 16
#define MAX_STACK_SIZE 64
diff --git a/kprobe/dbi_insn_slots.c b/kprobe/dbi_insn_slots.c
index fb4f6d1b..57239358 100644
--- a/kprobe/dbi_insn_slots.c
+++ b/kprobe/dbi_insn_slots.c
@@ -192,6 +192,9 @@ void free_insn_slot(struct slot_manager *sm, void *slot)
struct fixed_alloc *fa;
DECLARE_NODE_PTR_FOR_HLIST(pos);
+ if (slot == NULL)
+ return;
+
swap_hlist_for_each_entry_rcu(fa, pos, &sm->page_list, hlist) {
if (!chunk_check_ptr(&fa->chunk, slot, PAGE_SIZE))
continue;
diff --git a/kprobe/dbi_kprobes.h b/kprobe/dbi_kprobes.h
index 67d7ff18..9b187aa5 100644
--- a/kprobe/dbi_kprobes.h
+++ b/kprobe/dbi_kprobes.h
@@ -98,12 +98,7 @@ struct kprobe
{
struct hlist_node hlist;
/*list of probes to search by instruction slot*/
-#ifdef CONFIG_ARM
- struct hlist_node is_hlist_arm;
- struct hlist_node is_hlist_thumb;
-#else /* CONFIG_ARM */
struct hlist_node is_hlist;
-#endif /* CONFIG_ARM */
/* list of kprobes for multi-handler support */
struct list_head list;
/* Indicates that the corresponding module has been ref counted */