From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 6 15:50:08 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6B38106566B for ; Mon, 6 Jun 2011 15:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7B4A28FC14 for ; Mon, 6 Jun 2011 15:50:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p56Fo8JG000651 for ; Mon, 6 Jun 2011 15:50:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p56Fo8nZ000650; Mon, 6 Jun 2011 15:50:08 GMT (envelope-from gnats) Resent-Date: Mon, 6 Jun 2011 15:50:08 GMT Resent-Message-Id: <201106061550.p56Fo8nZ000650@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, jason wright Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15253106564A for ; Mon, 6 Jun 2011 15:46:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 05CA48FC15 for ; Mon, 6 Jun 2011 15:46:31 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p56FkUvB004146 for ; Mon, 6 Jun 2011 15:46:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p56FkUvU004145; Mon, 6 Jun 2011 15:46:30 GMT (envelope-from nobody) Message-Id: <201106061546.p56FkUvU004145@red.freebsd.org> Date: Mon, 6 Jun 2011 15:46:30 GMT From: jason wright To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/157663: kdump gets ptrace args wrong X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2011 15:50:08 -0000 >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 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Regex for grabbing ptrace flags for kdump is not inclusive enough. Before fix: CALL ptrace(, ...) 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: