bin/157663: kdump gets ptrace args wrong

jason wright jason at
Mon Jun 6 15:50:08 UTC 2011

>Number:         157663
>Category:       bin
>Synopsis:       kdump gets ptrace args wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 06 15:50:08 UTC 2011
>Originator:     jason wright
>Release:        8.2
as if.
FreeBSD fbsd82-32.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root at  i386
Regex for grabbing ptrace flags for kdump is not inclusive enough.

Before fix:

CALL  ptrace(<invalid=5>, ...)

After fix:

CALL  ptrace(PT_WRITE_D, ...)

ktrace something that uses ptrace(PT_WRITE_D,...) then use kdump to view results.

apply patch below.  It appears that no extraneous garbage is picked up by the modified regex (which just adds '_' is an additional character).

Patch attached with submission follows:

--- mksubr.old	2011-06-05 13:54:57.000000000 -0600
+++ mksubr	2011-06-05 13:57:21.000000000 -0600
@@ -343,7 +343,7 @@
 auto_if_type "sockipprotoname" "IPPROTO_[[:alnum:]]+[[:space:]]+" "netinet/in.h"
 auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h"
 auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h"
-auto_switch_type "ptraceopname" "PT_[[:alnum:]]+[[:space:]]+[0-9]+" "sys/ptrace.h"
+auto_switch_type "ptraceopname" "PT_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/ptrace.h"
 cat <<_EOF_


More information about the freebsd-bugs mailing list