>Number:         157663
>Category:       bin
>Synopsis:       kdump gets ptrace args wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 06 15:50:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     jason wright
>Release:        8.2
>Organization:
as if.
>Environment:
FreeBSD fbsd82-32.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 
02:24:46 UTC 2011     [email protected]:/usr/obj/usr/src/sys/GENERIC 
 i386
>Description:
Regex for grabbing ptrace flags for kdump is not inclusive enough.

Before fix:

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

After fix:

CALL  ptrace(PT_WRITE_D, ...)


>How-To-Repeat:
ktrace something that uses ptrace(PT_WRITE_D,...) then use kdump to view 
results.

>Fix:
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_
 /*


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to