* [commit] Fix & clarify OpenBSD/i386 and OpenBSD/amd64 kernel support
@ 2005-12-23 19:26 Mark Kettenis
2005-12-23 19:45 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2005-12-23 19:26 UTC (permalink / raw)
To: gdb-patches
Hopefully this makes it clear that this is not so dangerous as Daniel
thought it would be.
Thanks Daniel for pointing this out!
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* amd64obsd-tdep.c (amd64obsd_trapframe_cache): Fix typos.
(amd64obsd_trapframe_sniffer): Add comment.
* i386obsd-tdep.c (i386obsd_trapframe_cache): Fix typos.
(i386obsd_trapframe_sniffer): Add comment.
Index: amd64obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64obsd-tdep.c,v
retrieving revision 1.20
diff -u -p -r1.20 amd64obsd-tdep.c
--- amd64obsd-tdep.c 22 Dec 2005 14:09:17 -0000 1.20
+++ amd64obsd-tdep.c 22 Dec 2005 15:54:01 -0000
@@ -360,7 +360,7 @@ amd64obsd_trapframe_cache(struct frame_i
sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM);
find_pc_partial_function (func, &name, NULL, NULL);
- if (name && strncmp(name, "Xintr", 5) == 0)
+ if (name && strncmp (name, "Xintr", 5) == 0)
addr = sp + 8; /* It's an interrupt frame. */
else
addr = sp;
@@ -374,7 +374,7 @@ amd64obsd_trapframe_cache(struct frame_i
cs = read_memory_unsigned_integer (addr, 8);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
{
- /* Trap from use space; terminate backtrace. */
+ /* Trap from user space; terminate backtrace. */
trad_frame_set_id (cache, null_frame_id);
}
else
@@ -418,6 +418,8 @@ amd64obsd_trapframe_sniffer (const struc
ULONGEST cs;
char *name;
+ /* Check Current Privilige Level and bail out if we're not executing
+ in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, AMD64_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
return 0;
Index: i386obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v
retrieving revision 1.27
diff -u -p -r1.27 i386obsd-tdep.c
--- i386obsd-tdep.c 22 Dec 2005 14:09:17 -0000 1.27
+++ i386obsd-tdep.c 22 Dec 2005 15:54:02 -0000
@@ -358,7 +358,7 @@ i386obsd_trapframe_cache(struct frame_in
sp = frame_unwind_register_unsigned (next_frame, I386_ESP_REGNUM);
find_pc_partial_function (func, &name, NULL, NULL);
- if (name && strncmp(name, "Xintr", 5) == 0)
+ if (name && strncmp (name, "Xintr", 5) == 0)
addr = sp + 8; /* It's an interrupt frame. */
else
addr = sp;
@@ -372,7 +372,7 @@ i386obsd_trapframe_cache(struct frame_in
cs = read_memory_unsigned_integer (addr, 4);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
{
- /* Trap from use space; terminate backtrace. */
+ /* Trap from user space; terminate backtrace. */
trad_frame_set_id (cache, null_frame_id);
}
else
@@ -416,9 +416,11 @@ i386obsd_trapframe_sniffer (const struct
ULONGEST cs;
char *name;
+ /* Check Current Privilige Level and bail out if we're not executing
+ in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, I386_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
- return NULL;
+ return 0;
find_pc_partial_function (frame_pc_unwind (next_frame), &name, NULL, NULL);
return (name && ((strcmp (name, "calltrap") == 0)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [commit] Fix & clarify OpenBSD/i386 and OpenBSD/amd64 kernel support
2005-12-23 19:26 [commit] Fix & clarify OpenBSD/i386 and OpenBSD/amd64 kernel support Mark Kettenis
@ 2005-12-23 19:45 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-12-23 19:45 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On Thu, Dec 22, 2005 at 04:57:12PM +0100, Mark Kettenis wrote:
> + /* Check Current Privilige Level and bail out if we're not executing
> + in kernel space. */
I'm beginning to feel like a pest today so I fixed this myself :-)
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-12-22 Daniel Jacobowitz <dan@codesourcery.com>
* amd64obsd-tdep.c (amd64obsd_trapframe_sniffer): Spelling fix.
* i386obsd-tdep.c (i386obsd_trapframe_sniffer): Likewise.
Index: amd64obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64obsd-tdep.c,v
retrieving revision 1.21
diff -u -p -r1.21 amd64obsd-tdep.c
--- amd64obsd-tdep.c 22 Dec 2005 15:57:04 -0000 1.21
+++ amd64obsd-tdep.c 22 Dec 2005 16:12:21 -0000
@@ -418,7 +418,7 @@ amd64obsd_trapframe_sniffer (const struc
ULONGEST cs;
char *name;
- /* Check Current Privilige Level and bail out if we're not executing
+ /* Check Current Privilege Level and bail out if we're not executing
in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, AMD64_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
Index: i386obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 i386obsd-tdep.c
--- i386obsd-tdep.c 22 Dec 2005 15:57:04 -0000 1.28
+++ i386obsd-tdep.c 22 Dec 2005 16:12:21 -0000
@@ -416,7 +416,7 @@ i386obsd_trapframe_sniffer (const struct
ULONGEST cs;
char *name;
- /* Check Current Privilige Level and bail out if we're not executing
+ /* Check Current Privilege Level and bail out if we're not executing
in kernel space. */
cs = frame_unwind_register_unsigned (next_frame, I386_CS_REGNUM);
if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-22 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-23 19:26 [commit] Fix & clarify OpenBSD/i386 and OpenBSD/amd64 kernel support Mark Kettenis
2005-12-23 19:45 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox