ARM: kprobes: Add ARM instruction simulation test cases
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
This commit is contained in:
@@ -47,6 +47,8 @@ obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o
|
|||||||
test-kprobes-objs := kprobes-test.o
|
test-kprobes-objs := kprobes-test.o
|
||||||
ifdef CONFIG_THUMB2_KERNEL
|
ifdef CONFIG_THUMB2_KERNEL
|
||||||
test-kprobes-objs += kprobes-test-thumb.o
|
test-kprobes-objs += kprobes-test-thumb.o
|
||||||
|
else
|
||||||
|
test-kprobes-objs += kprobes-test-arm.o
|
||||||
endif
|
endif
|
||||||
obj-$(CONFIG_ATAGS_PROC) += atags.o
|
obj-$(CONFIG_ATAGS_PROC) += atags.o
|
||||||
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
||||||
|
1323
arch/arm/kernel/kprobes-test-arm.c
Normal file
1323
arch/arm/kernel/kprobes-test-arm.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1139,6 +1139,11 @@ static int __init run_all_tests(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
pr_info("ARM instruction simulation\n");
|
||||||
|
ret = run_test_cases(kprobe_arm_test_cases);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
|
||||||
#else /* CONFIG_THUMB2_KERNEL */
|
#else /* CONFIG_THUMB2_KERNEL */
|
||||||
|
|
||||||
pr_info("Probe 16-bit Thumb code\n");
|
pr_info("Probe 16-bit Thumb code\n");
|
||||||
|
@@ -387,4 +387,6 @@ struct test_arg_end {
|
|||||||
#ifdef CONFIG_THUMB2_KERNEL
|
#ifdef CONFIG_THUMB2_KERNEL
|
||||||
void kprobe_thumb16_test_cases(void);
|
void kprobe_thumb16_test_cases(void);
|
||||||
void kprobe_thumb32_test_cases(void);
|
void kprobe_thumb32_test_cases(void);
|
||||||
|
#else
|
||||||
|
void kprobe_arm_test_cases(void);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user