[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53EEB60D.1030907@huawei.com>
Date: Sat, 16 Aug 2014 09:38:21 +0800
From: Wang Nan <wangnan0@...wei.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
CC: Russell King - ARM Linux <linux@....linux.org.uk>,
"Jon Medhurst (Tixy)" <tixy@...aro.org>, <ananth@...ibm.com>,
<anil.s.keshavamurthy@...el.com>, <davem@...emloft.net>,
Will Deacon <will.deacon@....com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <peifeiyue@...wei.com>,
<lizefan@...wei.com>
Subject: Re: [PATCH v4] kprobes: arm: enable OPTPROBES for ARM 32
On 2014/8/15 23:23, Masami Hiramatsu wrote:
> (2014/08/12 13:56), Wang Nan wrote:
>> +/* Caller must ensure addr & 3 == 0 */
>> +static int can_optimize(unsigned long paddr)
>> +{
>> + return 1;
>> +}
>
> As we have talked on another thread, we'd better filter-out all stack-pushing
> instructions here, since (as you said) that will corrupt pt_regs on the stack.
>
> Thank you,
>
So we need to identify the replaced instruction. I think some improvement on
arm instruction decoder is required, else we have to implement another (although simpler)
decoder for memory accessing instructions.
In this situation we are talking about, we need the decoder identify the addressing
information for str/stm instroction. However, decoder can bring up more information such as
instruction type, source/destnation registers, memory access pattern ...
With such information, we can further optimize our trampoline code.
For example: doesn't protect destnation registers, and for some (most of, I think) instruction,
we can direct execute them like x86_64.
What do you think?
--
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