Commit Graph

2 Commits

Author SHA1 Message Date
Rohit Vaswani
eccfab069f arm: patch.c : Allow kernel text section to be written
MSM implements CONFIG_RWX and disallows the kernel text to be written.
However, in cases where we temporarily need to write the kernel text,
we explicitly mark it writeable for a short period of time.

Change-Id: I532b663a9bd0115ea5e7177e9dac4ac54e007725
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-20 02:49:15 -08:00
Rabin Vincent
b21d55e98a ARM: 7332/1: extract out code patch function from kprobes
Extract out the code patching code from kprobes so that it can be used
from the jump label code.  Additionally, the separated code:

 - Uses the IS_ENABLED() macros instead of the #ifdefs for THUMB2
   support

 - Unifies the two separate functions in kprobes, providing one function
   that uses stop_machine() internally, and one that can be called from
   stop_machine() directly

 - Patches the text on all CPUs only on processors requiring software
   broadcasting of cache operations

Acked-by: Jon Medhurst <tixy@yxit.co.uk>
Tested-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-03-24 09:38:55 +00:00