From: Dongdong Deng <libfetion@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, ananth@in.ibm.com,
anil.s.keshavamurthy@intel.com, davem@davemloft.net,
mhiramat@redhat.com, jkenisto@us.ibm.com
Subject: Re: Did we really need to clear the IF flag at prepare_singlestep() of x86 kprobes?
Date: Wed, 13 Jan 2010 13:25:20 +0800 [thread overview]
Message-ID: <ce2c83091001122125i6aac119fk470621fb6b1c2b4c@mail.gmail.com> (raw)
In-Reply-To: <20100112080600.392c14cd@infradead.org>
On Wed, Jan 13, 2010 at 12:06 AM, Arjan van de Ven <arjan@infradead.org> wrote:
> On Tue, 12 Jan 2010 19:09:35 +0800
> Dongdong Deng <libfetion@gmail.com> wrote:
>
>> Hi Kprobe experts,
>>
>> I have a doubt about the handling "X86_EFLAGS_IF" at
>> prepare_singlestep(), Could you give me some suggestions?
>
>
> iirc it was a security thing; we used to have some exploits
> due to the linux-abi entry points which caused a mess, and this
> was put there as defensive programming.
Hi Arjan,
Thanks for your explain. :)
Do you means that the user will modify the IF? for example: through
"p->pre_handler(p, regs)" .
But I couldn't image the affect that if user modify the IF flag, could
you give me a detail info about security thing?
BTW:
Before linux 2.5, the debug tarp was initalized as trap gate:
linux-2.4.37/arch/i386/kernel/traps.c:966: set_trap_gate(1,&debug);
I know kprobes have a long history, Is it possible that the interrupt
flag of kprobes was introduced at that time?
Thanks,
Dongdong
>
> I could totally misremember this as well of course.
>
>
> --
> Arjan van de Ven Intel Open Source Technology Centre
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
>
next prev parent reply other threads:[~2010-01-13 5:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 11:09 Dongdong Deng
2010-01-12 16:06 ` Arjan van de Ven
2010-01-13 5:25 ` Dongdong Deng [this message]
2010-01-13 6:18 ` Masami Hiramatsu
2010-01-14 6:45 ` Dongdong Deng
2010-01-14 20:06 ` Masami Hiramatsu
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=ce2c83091001122125i6aac119fk470621fb6b1c2b4c@mail.gmail.com \
--to=libfetion@gmail.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=arjan@infradead.org \
--cc=davem@davemloft.net \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.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
all inboxes | Powered by JetHome®