Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 2008 17:22:48 GMT
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/125546: [patch] ktrace(2) contains outdated struct ktr_header
Message-ID:  <200807121722.m6CHMm6h006893@www.freebsd.org>
Resent-Message-ID: <200807121730.m6CHU1Ia025529@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125546
>Category:       docs
>Synopsis:       [patch] ktrace(2) contains outdated struct ktr_header
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 12 17:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #14: Tue Jul  8 02:28:46 CEST 2008     f@eternal:/usr/obj/usr/src/sys/ETERNAL  i386

>Description:
struct ktr_header in ktrace(2):
[..]
caddr_t ktr_buf;
};

struct ktr_header in /usr/include/sys/ktrace.h:
[..]
intptr_t        ktr_tid;        /* was ktr_buffer */
};

>How-To-Repeat:

>Fix:
Patch is attached.

Patch attached with submission follows:

--- ./lib/libc/sys/ktrace.2.orig	2008-07-12 18:54:22.000000000 +0200
+++ ./lib/libc/sys/ktrace.2	2008-07-12 19:16:53.000000000 +0200
@@ -99,11 +99,11 @@
 	int	ktr_len;		/* length of buf */
 	short	ktr_type;		/* trace record type */
 	pid_t	ktr_pid;		/* process id */
 	char	ktr_comm[MAXCOMLEN+1];	/* command name */
 	struct	timeval ktr_time;	/* timestamp */
-	caddr_t	ktr_buf;
+	intptr_t	ktr_tid;
 };
 .Ed
 .Pp
 The
 .Va ktr_len
@@ -118,12 +118,12 @@
 The
 .Va ktr_time
 field gives the time (with microsecond resolution)
 that the record was generated.
 The
-.Va ktr_buf
-is an internal kernel pointer and is not useful.
+.Va ktr_tid
+field holds a threadid.
 .Pp
 The generic header is followed by
 .Va ktr_len
 bytes of a
 .Va ktr_type


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807121722.m6CHMm6h006893>