NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/55502: dtrace copyinstr invalid address



>Number:         55502
>Category:       kern
>Synopsis:       dtrace copyinstr invalid address
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 20 15:05:00 +0000 2020
>Originator:     Patrick Welche
>Release:        NetBSD-9.99.69/amd64
>Organization:
>Environment:
>Description:
According to "Dynamic Instrumentation of Production Systems" by Cantrill et al.:

DTrace also allows for tracing of data from user pro-
cesses. The copyin() and copyinstr() subroutines
can be used to access data from the current process. For
example, the following script aggregates on the name
(arg0) passed to the open(2) system call:

syscall::open:entry
{
@files[copyinstr(arg0)] = count();
}

By tracing events in both the kernel and user processes,
and combining data from both sources, DTrace provides
the complete view of the system required to understand
systemic problems that span the user/kernel boundary.


Trying this however gives:

# cat open.d
syscall::open:entry
{
        @files[copyinstr(arg0)] = count();
}
# dtrace -s open.d 
dtrace: script 'open.d' matched 1 probe
dtrace: aggregation size lowered to 2m
dtrace: error on enabled probe ID 1 (ID 206: syscall::open:entry): invalid address (0x7f7ff7c0b290) in action #2 at DIF offset 12
: No such file or directory
...
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index