Re: [PATCH v3 4/6] powerpc/64s: Un-blacklist system_call() from kprobes
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-06-22 11:14:22
Nicholas Piggin [off-list ref] writes:
On Thu, 22 Jun 2017 00:08:40 +0530 "Naveen N. Rao" [off-list ref] wrote:quoted
It is actually safe to probe system_call() in entry_64.S, but only till we unset MSR_RI. To allow this, add a new symbol system_call_exit() after the mtmsrd and blacklist that. Though the mtmsrd instruction itself is now whitelisted, we won't be allowed to probe on it as we don't allow probing on rfi and mtmsr instructions (checked for in arch_prepare_kprobe()).Can you add a little comment to say probes aren't allowed, and it's located after the mtmsr in order to avoid contaminating traces? Also I wonder if a slightly different name would be more instructive? I don't normally care, but the system_call_common code isn't trivial to follow. system_call_exit might give the impression that it is the entire exit path (which would pair with system_call for entry).
It is the entire path in the happy case isn't it? I'm not sure I know what you mean.
Perhaps system_call_exit_notrace? No that sucks too :(
A bit :D If you're tracing etc. then you'll be in syscall_exit_work, isn't that sufficient to differentiate the two? cheers