Skip to content
Commit 6f05d076 authored by Abel Vesa's avatar Abel Vesa Committed by Russell King
Browse files

ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER



The support for dynamic ftrace with CONFIG_DEBUG_RODATA involves
overriding the weak arch_ftrace_update_code() with a variant which makes
the kernel text writable around the patching.

This override was however added under the CONFIG_OLD_MCOUNT ifdef, and
CONFIG_OLD_MCOUNT is only enabled if frame pointers are enabled.

This leads to non-functional dynamic ftrace (ftrace triggers a
WARN_ON()) when CONFIG_DEBUG_RODATA is enabled and CONFIG_FRAME_POINTER
is not.

Move the override out of that ifdef and into the CONFIG_DYNAMIC_FTRACE
ifdef where it belongs.

Fixes: 80d6b0c2 ("ARM: mm: allow text and rodata sections to be read-only")
Suggested-by: default avatarNicolai Stange <nicstange@gmail.com>
Suggested-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarAbel Vesa <abelvesa@gmail.com>
Acked-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent b089c31c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment