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