mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Sami Tolvanen <samitolvanen@google.com>
Subject: Re: arm64 ftrace fixes for v5.4.y
Date: Fri, 18 Feb 2022 10:01:35 +0100	[thread overview]
Message-ID: <Yg9gb4qXyPVyE60W@kroah.com> (raw)
In-Reply-To: <CAE-0n53cOFJFOOV-YOc0MzbiLr9FvaJw=ucs2SNNGOeznYzVLw@mail.gmail.com>

On Thu, Feb 17, 2022 at 05:27:33PM -0800, Stephen Boyd wrote:
> Hi stable maintainers,
> 
> I recently ran into an issue where trying to load a module with jump
> table entries crashes the system when function tracing is enabled. The
> crash happens because ftrace is modifying the code and then marking it
> as read-only too early. ftrace_make_call() calls module_enable_ro(mod,
> true) before module init is over because ftrace_module_enable() calls
> __ftrace_replace_code() which does FTRACE_UPDATE_MAKE_CALL. All this
> code is gone now upstream but is still present on v5.4 stable kernels. I
> picked this set of patches to v5.4 and it fixed it for me.
> 
> fbf6c73c5b26 ftrace: add ftrace_init_nop()
> a1326b17ac03 module/ftrace: handle patchable-function-entry
> bd8b21d3dd66 arm64: module: rework special section handling
> f1a54ae9af0d arm64: module/ftrace: intialize PLT at load time

These all apply just fine, thanks.

> after doing that I ran into another issue because I'm using clang. Would
> it be possible to pick two more patches to the stable tree to silence
> this module warning from sysfs complaining about
> /module/<modname>/sections/__patchable_function_entries being
> duplicated?
> 
> dd2776222abb kbuild: lto: merge module sections
> 6a3193cdd5e5 kbuild: lto: Merge module sections if and only if
> CONFIG_LTO_CLANG is enabled

These two do not apply to the 5.4.y branch, as the file they touch is
not present in 5.4.y.  They do apply to 5.10.y, so I've queued them up
there, but I think you need to provide a working backport please.

thanks,

greg k-h

  reply	other threads:[~2022-02-18  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  1:27 Stephen Boyd
2022-02-18  9:01 ` Greg KH [this message]
2022-02-18 21:51   ` Stephen Boyd

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=Yg9gb4qXyPVyE60W@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ndesaulniers@google.com \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=stable@vger.kernel.org \
    --cc=swboyd@chromium.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

all inboxes | Powered by JetHome®