public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/21726] on rawhide, the backtrace.exp test case causes a kernel panic
Date: Fri, 07 Jul 2017 15:28:00 -0000	[thread overview]
Message-ID: <bug-21726-6586-EGW0YAuXac@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-21726-6586@http.sourceware.org/bugzilla/>

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

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
The actual crash is in:

static int _stp_valid_pc_addr(unsigned long addr, struct task_struct *tsk)
{
        /* Just a simple check of whether the the address can be accessed
           as a user space address. Zero is always bad. */

/* FIXME for s390x PR13350. */
#if defined (__s390__) || defined (__s390x__)
       return addr != 0L;
#else
        int ok;
        mm_segment_t oldfs = get_fs();
        set_fs(USER_DS);
        ok = access_ok(VERIFY_READ, (long *) (intptr_t) addr, sizeof(long));
        set_fs(oldfs);
        return addr != 0L && tsk != NULL ? ok : ! ok;
#endif
}

Changing the first #if 1 || ... so that the check simply becomes teturn addr !=
0L makes the crash go away.

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

  parent reply	other threads:[~2017-07-07 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 15:26 [Bug runtime/21726] New: " dsmith at redhat dot com
2017-07-06 20:22 ` [Bug runtime/21726] " mark at klomp dot org
2017-07-06 20:31 ` mark at klomp dot org
2017-07-07 15:28 ` mark at klomp dot org [this message]
2017-07-07 15:36 ` mark at klomp dot org
2017-07-14 14:15 ` dsmith at redhat dot com
2017-07-20 14:49 ` dsmith at redhat dot com

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-21726-6586-EGW0YAuXac@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).