Summary: | Reading userland static data always leads to read faults on Fedora 29 x86_64 | ||
---|---|---|---|
Product: | systemtap | Reporter: | agentzh <agentzh> |
Component: | runtime | Assignee: | Unassigned <systemtap> |
Status: | RESOLVED NOTABUG | ||
Severity: | normal | CC: | wcohen |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
agentzh
2019-08-24 01:13:06 UTC
One could have the probe fire after the static string has been accessed by test.c, for example in the process("function").return for a function that accesses s. However, in this test.c example for this PR nothing is going to ever going to cause a page fault to pull in that static page that s points at. Systemtap can only access pages that are already mapped in. SystemTap can't trigger a pagefault to map in a page that is not currently mapped in. A similar situation was observed on a number of the testsuite/systemtap.syscall tests where a string was stored on a page that was not mapped in on syscall entry and the syscall would page fault the string in. The work around in the syscall tests was to use mlockall(MCL_CURRENT) to ensure that the string in .rodata section was mapped in. One example fix of this is git commit e67e4b19fd73953fbc8a23c91ae22f9d35a7c817: Author: William Cohen <wcohen@redhat.com> 2023-11-15 17:01:14 Committer: William Cohen <wcohen@redhat.com> 2023-11-15 17:01:14 Parent: 114de05acfdab36295c9c6beee9715e986810d11 (PR29076: Additional syscall test fixes for .rodata on x86_64) Child: 130af146398ca5788be92d258eabe1cee662037f (Tweak testsuite/semok/target_addr.stp to work with linux 5.14 and newer.) Branches: master, remotes/origin/master, remotes/origin/mcermak-pr30321, wcohen/nfs Follows: release-5.0a Precedes: PR29076: syscall test fixes for .rodata on x86_64 for pwritev.c and sysfs.c |