login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
February
»
27
Re: debug registers and fork
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: <eranian@...>
Cc: <linux-kernel@...>, <linux-ia64@...>, <ak@...>, <tony.luck@...>, Roland McGrath <roland@...>
Subject:
Re: debug registers and fork
Date: Tuesday, February 27, 2007 - 4:24 pm
> On Mon, 26 Feb 2007 15:51:54 -0800 Stephane Eranian <eranian@hpl.hp.com> wrote:
quoted text
> Hello, > > I have come across an issue with a monitoring using the > hardware debug registers on ia64/i386/x86-64. > > It seems that the way debug registers are inherited across fork > differs between ia-64 and i386/x86-64. On ia-64, the debug registers > are NEVER inherited in the child. The copy_thread() routine clears > the necessary thread flags to avoid reloading the debug registers in > the child. > > Now, on x86-64, it appears that the TIF_DEBUG flag is inherited via > setup_thread_stack(). By virtue of dup_task_struct() the debug registers > get copied into the child task on fork. So the child has active breakpoints, > unless I am mistaken somewhere. > > Given the way the ptrace() interface works, I would tend to > think that the ia-64 way is the correct one. Any comment? > > Furthermore, on i386/x86-64, when switching out from a task with TIF_DEBUG > enabled to another which does not, it seems we do not clear the debug > registers (at least dr7) so they become inactive. >
Let's cc Roland - he's totally rewritten ptrace and probably knows this stuff. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
debug registers and fork
, Stephane Eranian
, (Mon Feb 26, 7:51 pm)
Re: debug registers and fork
, Andi Kleen
, (Mon Mar 5, 1:25 pm)
Re: debug registers and fork
, Stephane Eranian
, (Mon Mar 5, 4:05 pm)
Re: debug registers and fork
, Andrew Morton
, (Tue Feb 27, 4:24 pm)
Re: debug registers and fork
, Roland McGrath
, (Wed Feb 28, 5:25 pm)
Re: debug registers and fork
, Alan Stern
, (Wed Feb 28, 8:01 pm)
Re: debug registers and fork
, Stephane Eranian
, (Wed Feb 28, 8:27 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Andrea Arcangeli
[PATCH 00 of 12] mmu notifier #v13
Eric W. Biederman
Remaining straight forward kthread API conversions...
Eric Paris
Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan...
Trond Myklebust
Re: Announce: Linux-next (Or Andrew's dream :-))
git
:
linux-netdev
:
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
[GIT]: Networking
Herbert Xu
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Alexey Dobriyan
[PATCH 04/33] Fix {ip,6}_route_me_harder() in netns
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
1106 guests
online.
Online users
strcmp
genanxdiso
plianc20
Syndicate