public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Nan <wangnan0@huawei.com>
To: "Jon Medhurst (Tixy)" <tixy@linaro.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Will Deacon <will.deacon@arm.com>, <linux-kernel@vger.kernel.org>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
	Li Zefan <lizefan@huawei.com>, <davem@davemloft.net>,
	<linux-arm-kernel@lists.infradead.org>, <peifeiyue@huawei.com>
Subject: Re: [RFC PATCH] kprobes: arm: enable OPTPROBES for arm 32
Date: Wed, 6 Aug 2014 21:40:40 +0800	[thread overview]
Message-ID: <53E23058.3030206@huawei.com> (raw)
In-Reply-To: <1407332208.3006.13.camel@linaro1.home>

On 2014/8/6 21:36, Jon Medhurst (Tixy) wrote:
> On Wed, 2014-08-06 at 13:44 +0900, Masami Hiramatsu wrote:
>> (2014/08/05 16:28), Wang Nan wrote
> [...]
>>> +asm (
>>> +			".global optprobe_template_entry\n"
>>> +			"optprobe_template_entry:\n"
>>> +#ifndef CONFIG_THUMB
>>> +			"	sub	sp, sp, #80\n"
>>> +			"	stmia	sp, {r0 - r14} \n"
>>> +			"	add	r3, sp, #80\n"
>>> +			"	str	r3, [sp, #52]\n"
>>> +			"	mrs	r4, cpsr\n"
>>> +			"	str	r4, [sp, #64]\n"
>>> +			"	mov	r1, sp\n"
>>> +			"	ldr	r0, 1f\n"
>>> +			"	ldr	r2, 2f\n"
>>> +			"	blx	r2\n"
>>> +			"	ldr	r1, [sp, #64]\n"
>>> +			"	msr	cpsr_fs, r1\n"
>>> +			"	ldmia	sp, {r0 - r15}\n"
>>> +			".global optprobe_template_val\n"
>>> +			"optprobe_template_val:\n"
>>> +			"1:	nop\n"
>>> +			".global optprobe_template_call\n"
>>> +			"optprobe_template_call:\n"
>>> +			"2:	nop\n"
>>> +#else /* CONFIG_THUMB */
>>> +# error optprobe for thumb is not supported.
>>
>> Can we set CONFIG_THUMB=y without CONFIG_THUMB2_KERNEL ?
> 
> Yes, CONFIG_THUMB is for supporting userside Thumb code,
> CONFIG_THUMB2_KERNEL is for building the kernel for Thumb and the
> options are orthogonal. So I don't think kprobes code should be testing
> CONFIG_THUMB as it doesn't deal with userside.
> 

You are correct. This is my mistake.



  reply	other threads:[~2014-08-06 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  7:28 [RFC PATCH] kprobes: arm: enable OPTPROBES for arm 32 Wang Nan
2014-08-06  4:44 ` Masami Hiramatsu
2014-08-06  6:24   ` Wang Nan
2014-08-07  6:59     ` Masami Hiramatsu
2014-08-08  1:25       ` Wang Nan
2014-08-08  2:07         ` Masami Hiramatsu
2014-08-06 13:36   ` Jon Medhurst (Tixy)
2014-08-06 13:40     ` Wang Nan [this message]
2014-08-06 14:23 ` Jon Medhurst (Tixy)
2014-08-06 22:57   ` Russell King - ARM Linux
2014-08-06 22:55 ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E23058.3030206@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=peifeiyue@huawei.com \
    --cc=tixy@linaro.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox