lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56EFF83F.7040906@linaro.org>
Date:	Mon, 21 Mar 2016 09:33:51 -0400
From:	David Long <dave.long@...aro.org>
To:	平松雅巳 / HIRAMATU,MASAMI 
	<masami.hiramatsu.pt@...achi.com>,
	"'ltc-kernel@...yrl.intra.hitachi.co.jp'" 
	<ltc-kernel@...yrl.intra.hitachi.co.jp>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Sandeepa Prabhu <sandeepa.s.prabhu@...il.com>,
	William Cohen <wcohen@...hat.com>,
	Pratyush Anand <panand@...hat.com>,
	Steve Capper <steve.capper@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Marc Zyngier <marc.zyngier@....com>
Cc:	Mark Rutland <mark.rutland@....com>,
	Petr Mladek <pmladek@...e.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	John Blackwood <john.blackwood@...r.com>,
	Feng Kan <fkan@....com>, Zi Shen Lim <zlim.lnx@...il.com>,
	Dave P Martin <Dave.Martin@....com>,
	Yang Shi <yang.shi@...aro.org>,
	Vladimir Murzin <Vladimir.Murzin@....com>,
	Kees Cook <keescook@...omium.org>,
	"Suzuki K. Poulose" <suzuki.poulose@....com>,
	Mark Brown <broonie@...nel.org>,
	Alex Bennée <alex.bennee@...aro.org>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mark Salyzyn <salyzyn@...roid.com>,
	James Morse <james.morse@....com>,
	Christoffer Dall <christoffer.dall@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Robin Murphy <Robin.Murphy@....com>,
	Jens Wiklander <jens.wiklander@...aro.org>,
	Balamurugan Shanmugam <bshanmugam@....com>,
	sysp-manager <cti.systems-productivity-manager.ts@...achi.com>
Subject: Re: [PATCH v11 8/9] arm64: Add kernel return probes support
 (kretprobes)

On 03/17/2016 08:58 AM, 平松雅巳 / HIRAMATU,MASAMI wrote:
>> From: 平松雅巳 / HIRAMATU,MASAMI [mailto:masami.hiramatsu.pt@...achi.com]
>>
>> Hi,
>>
>>> From: Sandeepa Prabhu <sandeepa.s.prabhu@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ