summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorPatrick Daly <pdaly@codeaurora.org>2015-09-09 20:00:57 -0700
committerRohit Vaswani <rvaswani@codeaurora.org>2016-03-01 12:22:09 -0800
commit47ae5b18729dcd554e28bd414d005c2c515e293b (patch)
tree11abc2d4c0c47e3cb5c011ce46a5961dbe80a3a1 /arch/arm64/kernel
parent0cf03042cff1084ff642944e5fd0e79c119d2eac (diff)
arm64: alternative: Support memory protection
Modify the kernel code section with fixmap to handle the case where the kernel text section is readonly. Change-Id: I3f81fcbfe917ef42783e55b107289ad97e1c02c3 Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/alternative.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
index ab9db0e9818c..47a8caf28bcc 100644
--- a/arch/arm64/kernel/alternative.c
+++ b/arch/arm64/kernel/alternative.c
@@ -108,7 +108,7 @@ static void __apply_alternatives(void *alt_region)
for (i = 0; i < nr_inst; i++) {
insn = get_alt_insn(alt, origptr + i, replptr + i);
- *(origptr + i) = cpu_to_le32(insn);
+ BUG_ON(aarch64_insn_patch_text_nosync(origptr + i, insn));
}
flush_icache_range((uintptr_t)origptr,