Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156947156
D29496.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
964 B
Referenced Files
None
Subscribers
None
D29496.diff
View Options
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -229,6 +229,14 @@
copy_thread(td1, td2);
+ /* Reset debug registers in the new process */
+ pcb2->pcb_dr0 = 0;
+ pcb2->pcb_dr1 = 0;
+ pcb2->pcb_dr2 = 0;
+ pcb2->pcb_dr3 = 0;
+ pcb2->pcb_dr6 = 0;
+ pcb2->pcb_dr7 = 0;
+
/* Point mdproc and then copy over p1's contents */
mdp2 = &p2->p_md;
bcopy(&p1->p_md, mdp2, sizeof(*mdp2));
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -241,6 +241,14 @@
copy_thread(td1, td2);
+ /* Reset debug registers in the new process */
+ pcb2->pcb_dr0 = 0;
+ pcb2->pcb_dr1 = 0;
+ pcb2->pcb_dr2 = 0;
+ pcb2->pcb_dr3 = 0;
+ pcb2->pcb_dr6 = 0;
+ pcb2->pcb_dr7 = 0;
+
/* Point mdproc and then copy over td1's contents */
mdp2 = &p2->p_md;
bcopy(&p1->p_md, mdp2, sizeof(*mdp2));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 1:51 PM (6 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33250950
Default Alt Text
D29496.diff (964 B)
Attached To
Mode
D29496: x86: clear %db registers in new process
Attached
Detach File
Event Timeline
Log In to Comment