Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152583270
D16572.id46215.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16572.id46215.diff
View Options
Index: sys/x86/x86/stack_machdep.c
===================================================================
--- sys/x86/x86/stack_machdep.c
+++ sys/x86/x86/stack_machdep.c
@@ -82,16 +82,16 @@
stack_zero(st);
frame = (x86_frame_t)fp;
while (1) {
- if (!INKERNEL((long)frame))
+ if ((vm_offset_t)frame < td->td_kstack ||
+ (vm_offset_t)frame >= td->td_kstack +
+ td->td_kstack_pages * PAGE_SIZE)
break;
callpc = frame->f_retaddr;
if (!INKERNEL(callpc))
break;
if (stack_put(st, callpc) == -1)
break;
- if (frame->f_frame <= frame ||
- (vm_offset_t)frame->f_frame >= td->td_kstack +
- td->td_kstack_pages * PAGE_SIZE)
+ if (frame->f_frame <= frame)
break;
frame = frame->f_frame;
}
@@ -106,7 +106,7 @@
if (nmi_stack == NULL || curthread != nmi_pending)
return (0);
- if (INKERNEL(TF_PC(tf)) && (TF_FLAGS(tf) & PSL_I) != 0)
+ if (!TRAPF_USERMODE(tf) && (TF_FLAGS(tf) & PSL_I) != 0)
stack_capture(curthread, nmi_stack, TF_FP(tf));
else
/* We were running in usermode or had interrupts disabled. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 7:50 PM (11 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31621570
Default Alt Text
D16572.id46215.diff (1 KB)
Attached To
Mode
D16572: Tighten checks in the x86 stack unwinder.
Attached
Detach File
Event Timeline
Log In to Comment