Skip to content

Commit

Permalink
ARM: kprobes: Reject 16-bit Thumb SVC and UNDEFINED instructions
Browse files Browse the repository at this point in the history
SVC (SWI) instructions shouldn't occur in kernel code so we don't
need to be able to probe them.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
  • Loading branch information
Jon Medhurst authored and Tixy committed Jul 13, 2011
1 parent 5b94faf commit 4449566
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/kernel/kprobes-thumb.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,14 @@ const union decode_item kprobe_decode_thumb16_table[] = {
/* LDM 1100 1xxx xxxx xxxx */
DECODE_EMULATE (0xf000, 0xc000, t16_emulate_loregs_rwflags),

/*
* Conditional branch, and Supervisor Call
*/

/* Permanently UNDEFINED 1101 1110 xxxx xxxx */
/* SVC 1101 1111 xxxx xxxx */
DECODE_REJECT (0xfe00, 0xde00),

DECODE_END
};

Expand Down

0 comments on commit 4449566

Please sign in to comment.