From: rabin@rab.in (Rabin Vincent)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: ftrace: fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER
Date: Sat, 18 Mar 2017 19:33:23 +0100 [thread overview]
Message-ID: <20170318183323.5hmqt6yx6ja63kaa@debian> (raw)
In-Reply-To: <1489601259-9432-1-git-send-email-abelvesa@linux.com>
On Wed, Mar 15, 2017 at 06:07:39PM +0000, Abel Vesa wrote:
> 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: 80d6b0c2eed2a ("ARM: mm: allow text and rodata sections to be read-only")
>
> Suggested-by: Nicolai Stange <nicstange@gmail.com>
> Suggested-by: Rabin Vincent <rabin@rab.in>
> Signed-off-by: Abel Vesa <abelvesa@linux.com>
Acked-by: Rabin Vincent <rabin@rab.in>
prev parent reply other threads:[~2017-03-18 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 18:07 [PATCH] arm: ftrace: fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER Abel Vesa
2017-03-18 18:33 ` Rabin Vincent [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170318183323.5hmqt6yx6ja63kaa@debian \
--to=rabin@rab.in \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox