summaryrefslogtreecommitdiffstats
path: root/security/tomoyo
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2014-07-23 22:55:02 -0700
committerRalf Baechle <ralf@linux-mips.org>2014-07-30 20:37:42 +0200
commitdce0e7d54a710400c0056d86d0f0ed972133b25d (patch)
tree09c4e4a9ff99b1d11150e62c21f519264513254c /security/tomoyo
parentb1442d39fac2fcfbe6a4814979020e993ca59c9e (diff)
downloadop-kernel-dev-dce0e7d54a710400c0056d86d0f0ed972133b25d.zip
op-kernel-dev-dce0e7d54a710400c0056d86d0f0ed972133b25d.tar.gz
MIPS: ftrace: Fix dynamic tracing of kernel modules
Dynamic tracing of kernel modules is broken on 32-bit MIPS. When modules are loaded, the kernel crashes when dynamic tracing is enabled with: cd /sys/kernel/debug/tracing echo > set_ftrace_filter echo function > current_tracer 1) arch/mips/kernel/ftrace.c When the kernel boots, or when a module is initialized, ftrace_make_nop() modifies every _mcount call site to eliminate the ftrace overhead. However, when ftrace is later enabled for a call site, ftrace_make_call() does not currently restore the _mcount call correctly for module call sites. Added ftrace_modify_code_2r() and modified ftrace_make_call() to fix this. 2) arch/mips/kernel/mcount.S _mcount assembly routine is supposed to have the caller's _mcount call site address in register a0. However, a0 is currently not calculated correctly for module call sites. a0 should be (ra - 20) or (ra - 24), depending on whether the kernel was built with KBUILD_MCOUNT_RA_ADDRESS or not. This fix has been tested on Broadcom BMIPS5000 processor. Dynamic tracing now works for both built-in functions and module functions. Signed-off-by: Petri Gynther <pgynther@google.com> Cc: linux-mips@linux-mips.org Cc: rostedt@goodmis.org Cc: alcooperx@gmail.com Cc: cminyard@mvista.com Patchwork: https://patchwork.linux-mips.org/patch/7476/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'security/tomoyo')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud