summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-test.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: kprobes: Prevent known test failures stopping other tests runningJon Medhurst2014-07-021-0/+10
| | | | | | | | | | | | | | Due to a long-standing issue with Thumb symbol lookup [1] the jprobes tests fail when built into a kernel compiled as Thumb mode. (They work fine for ARM mode kernels or for Thumb when built as a loadable module.) Rather than have this problem terminate testing prematurely lets instead emit an error message and carry on with the main kprobes tests, delaying the final failure report until the end. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/063026.html Signed-off-by: Jon Medhurst <tixy@linaro.org>
* ARM: kprobes-test: Workaround GAS .align bugTaras Kondratiuk2014-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | By default if no fill symbol is given to .align directive in a code section it fills gap with NOPs. If previous fragment is not instruction-aligned, additional pre-alignment is done by zero bytes before NOPs. These zero bytes are marked as data by special symbol $d in symbol table. Unfortunately GAS assumes that there is only code in the code section so it "puts back" code symbol $a at the end of this pre-alignment. So if there is some data after alignment it will be interpreted as code and will be swapped back to LE for BE8 system during a final linking. If explicit fill value is given to .align, the NOP-padding code is skipped and symbol table does not get messed-up. So the workaround for this issue: Use explicit fill value if data should be aligned in the code section. Acked-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
* ARM: kprobes-test: use <asm/opcodes.h> for instruction accessesBen Dooks2014-04-011-5/+6
| | | | | | | | | | Ensure we read instructions in the correct endian-ness by using the <asm/opcodes.h> helper to transform them as necessary. Acked-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> [taras.kondratiuk@linaro.org: fix next_instruction() function] Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
* ARM: Change the remaining shared kprobes/uprobes symbols to something genericDavid A. Long2014-03-181-3/+5
| | | | | | | | Any more ARM kprobes/uprobes symbols which have "kprobe" in the name must be changed to the more generic "probes" or other non-kprobes specific symbol. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
* ARM: Fix missing includes in kprobes sourcesDavid A. Long2014-03-181-1/+3
| | | | | | | | Make sure includes in ARM kprobes sources are done explicitly. Do not rely on includes from other includes. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
* treewide: fix printk typo in multiple driversMasanari Iida2012-11-191-1/+1
| | | | | | | Correct spelling typo in multiple drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* ARM: 7209/1: Use generic ARM instruction set condition code checks for kprobes.Leif Lindholm2011-12-131-59/+7
| | | | | | | | | | | This patch changes the kprobes implementation to use the generic ARM instruction set condition code checks, rather than a dedicated implementation. Signed-off-by: Leif Lindholm <leif.lindholm@arm.com> Acked-by: Jon Medhurst <tixy@yxit.co.uk> Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: kprobes: Add introductory comment to test codeJon Medhurst2011-09-201-0/+21
| | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add some benchmarking to test moduleJon Medhurst2011-09-201-0/+161
| | | | | | | | | These benchmarks show the basic speed of kprobes and verify the success of optimisations done to the emulation of typical function entry instructions (i.e. push/stmdb). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add decoding table test coverage analysisJon Medhurst2011-09-201-0/+261
| | | | | | | | This is used to verify that all combinations of CPU instructions described by the kprobes decoding tables have a test case. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add decoding table self-consistency testsJon Medhurst2011-09-201-4/+99
| | | | | | | | These check that the bitmask and match value used in the decoding tables are self consistent. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add ARM instruction simulation test casesJon Medhurst2011-09-201-0/+5
| | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add Thumb instruction simulation test casesJon Medhurst2011-09-201-0/+25
| | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Framework for instruction set test casesJon Medhurst2011-09-201-0/+840
| | | | | | | | | | On ARM we have to simulate/emulate CPU instructions in order to singlestep them. This patch adds a framework which can be used to construct test cases for different instruction forms. It is described in detail in the in-source comments of kprobes-test.c Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
* ARM: kprobes: Add basic API testsJon Medhurst2011-09-201-0/+340
These test that the different kinds of probes can be successfully placed into ARM and Thumb code and that the handlers are called correctly when this code is executed. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
OpenPOWER on IntegriCloud