]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: ensure SDT module probes work with NORX
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 13 Aug 2015 16:23:54 +0000 (12:23 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 14 Aug 2015 10:13:08 +0000 (11:13 +0100)
commit8ba78aab5aa9a55cf673876e49381a38a48864a2
treed496b96e3dbc42a333891fe10b35fd9b5f291dc1
parent07bc84b75a5e24359507576e0f172a1c2a67e486
dtrace: ensure SDT module probes work with NORX

When the CONFIG_DEBUG_SET_MODULE_RONX option is enabled in the kernel,
the executable code of the module is marked read-only prior to calling
the module notifier.  This causes the patching of NOPs in the probe
locations to fail with a system crash.

Because patching of SDT probe locations should happen upon module load
for DTrace-enabled kernels regardless of whether or not DTrace will be
used, it is both cleaner and more correct to make a direct call to the
code that handles the patching rather than using the notifier mechanism.
The new call takes place prior to marking the pages read-only, avoiding
the problem altogether.

Orabug: 21630297
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
include/linux/dtrace_sdt.h [moved from kernel/dtrace/dtrace_sdt.h with 91% similarity]
kernel/dtrace/dtrace_os.c
kernel/dtrace/dtrace_sdt_core.c
kernel/module.c