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: <50EF43F8.3040403@redhat.com>
Date:	Thu, 10 Jan 2013 14:43:04 -0800
From:	Josh Stone <jistone@...hat.com>
To:	Anton Arapov <anton@...hat.com>
CC:	Oleg Nesterov <oleg@...hat.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Frank Eigler <fche@...hat.com>
Subject: Re: [RFC PATCH 5/6] uprobes: add bp_vaddr argument to consumer handler

On 01/08/2013 06:27 AM, Anton Arapov wrote:
> On Sun, Dec 23, 2012 at 04:49:10PM +0100, Oleg Nesterov wrote:
>> On 12/22, Oleg Nesterov wrote:
>>>> Just change regs->ip before calling ->handler().
>>>
>>> Josh, Frank, will it work for you?
>>
>> Wait, probably I was confused by this patch and 4/6...
>>
>> To simplify, lets ignore the normal uprobes. Yes I still think that it
>> would be better to set "regs->ip = orig_return_vaddr" before calling
>> ->handler() and not pass it as an argument.
>>
>> But, probably uprobe_consumer also needs to know bp_vaddr? IOW, the
>> address of the function which we are going to return from? In this case,
>> yes, we also need another argument. And prepare_uretprobe/etc should
>> be changed to record bp_vaddr passed from handle_swbp(). And
>> uretprobe_run_handlers() should pass this bp_vaddr, not orig_return_vaddr.
>>
>> Or I am confused.
>>
>> Anton?
> 
>   Oleg, you are absolutely right and change the ip before calling the
> ->handle is much better then what I 'invented'.
>  
>   I'm working on v2 to address this and other issues, will post it soon.

For uprobes, systemtap wants regs->ip to be the real breakpoint address,
and for uretprobes we want the original return address.  With the
utrace-based uprobes we would munge it by modifying regs->ip before
continuing with the rest of our handler.  If uprobes now wants to
prepare regs->ip for us in the same way, I think that's fine.

Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ