public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/24935] Reading userland static data always leads to read faults on Fedora 29 x86_64
Date: Wed, 10 Apr 2024 21:25:15 +0000	[thread overview]
Message-ID: <bug-24935-6586-9dFwazqJ1I@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24935-6586@http.sourceware.org/bugzilla/>

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wcohen at redhat dot com
         Resolution|---                         |NOTABUG

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
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

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

      reply	other threads:[~2024-04-10 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24  1:13 [Bug runtime/24935] New: " agentzh at gmail dot com
2024-04-10 21:25 ` wcohen at redhat dot com [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-24935-6586-9dFwazqJ1I@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).