From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbdCRSdw (ORCPT ); Sat, 18 Mar 2017 14:33:52 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33812 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbdCRSdv (ORCPT ); Sat, 18 Mar 2017 14:33:51 -0400 Date: Sat, 18 Mar 2017 19:33:23 +0100 From: Rabin Vincent To: Abel Vesa Cc: nicstange@gmail.com, keescook@chromium.org, linux-kernel@vger.kernel.org, Steven Rostedt , Russell King , Ingo Molnar , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm: ftrace: fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER Message-ID: <20170318183323.5hmqt6yx6ja63kaa@debian> References: <1489601259-9432-1-git-send-email-abelvesa@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489601259-9432-1-git-send-email-abelvesa@linux.com> User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Suggested-by: Rabin Vincent > Signed-off-by: Abel Vesa Acked-by: Rabin Vincent