This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/15928] New: the memory1.exp testcase is accessing user memory as kernel memory


https://sourceware.org/bugzilla/show_bug.cgi?id=15928

            Bug ID: 15928
           Summary: the memory1.exp testcase is accessing user memory as
                    kernel memory
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com

The testsuite/systemtap.printf/memory1.exp testcase has an associated
testsuite/systemtap.printf/memory1.stp file, which does this:

====
probe syscall.open {
        ...
        result = sprintf ("%m", $filename);
        ...
====

However, since $filename is a pointer to user memory, this really isn't valid.
This occidentally works on systems where there is no real user/kernel memory
split, like on x86_64, but fails on systems like s390x where there is a real
user/kernel memory split.

As the documentation for '%m' states:

              %m     Safely reads kernel memory at the given address, outputs
                     its content.  The precision specifier determines the numâ
                     ber of bytes to read.  Default is 1 byte.

The testcase will need to be fixed, perhaps reading data from a private kernel
module instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]