Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361839
| From | David Long <dave.long@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v11 8/9] arm64: Add kernel return probes support (kretprobes) |
| Date | 2016-03-21 14:40 +0100 |
| Message-ID | <rf8dP-6jL-3@gated-at.bofh.it> (permalink) |
| References | <raF0J-3nW-5@gated-at.bofh.it> <raF0L-3nW-51@gated-at.bofh.it> <rdFdT-7nw-5@gated-at.bofh.it> <rdFGW-7xG-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/17/2016 08:58 AM, 平松雅巳 / HIRAMATU,MASAMI wrote:
>> From: 平松雅巳 / HIRAMATU,MASAMI [mailto:masami.hiramatsu.pt@hitachi.com]
>>
>> Hi,
>>
>>> From: Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>
>>>
>>> The pre-handler of this special 'trampoline' kprobe executes the return
>>> probe handler functions and restores original return address in ELR_EL1.
>>> This way the saved pt_regs still hold the original register context to be
>>> carried back to the probed kernel function.
>>
>> This patch seems not well separated.
>>
>>> diff --git a/arch/arm64/kernel/kprobes.c b/arch/arm64/kernel/kprobes.c
>>> index bd3f233..13d3333 100644
>>> --- a/arch/arm64/kernel/kprobes.c
>>> +++ b/arch/arm64/kernel/kprobes.c
>>
>> [snip]
>>
>>> +void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
>>> + struct pt_regs *regs)
>>> +{
>>> + ri->ret_addr = (kprobe_opcode_t *)regs->regs[30];
>>> +
>>> + /* replace return addr (x30) with trampoline */
>>> + regs->regs[30] = (long)&kretprobe_trampoline;
>>
>> So, where is the kretprobe_trampoline? It seems that function is
>> defined in other patch.
>>
>>> +}
>>> +
>>> +int __kprobes arch_trampoline_kprobe(struct kprobe *p)
>>> +{
>>> + return 0;
>>> }
>>
>> And what this function is for??
>
> Ah, sorry, this was my fault. Yes, this function is required.
> But this implementation also means there is an asm-based trampoline
> function which should be included in this patch.
>
> David, could you tell me the repository which I can get the latest
> version of this series? I'd like to see the whole code of kprobes/arm64.
>
> Thank you,
>
It can be found in:
http://git.linaro.org/people/dave.long/linux.git
...in the kprobes64-v11 branch.
Thanks,
-dl
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v11 8/9] arm64: Add kernel return probes support (kretprobes) David Long <dave.long@linaro.org> - 2016-03-21 14:40 +0100
csiph-web