linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Hurley <peter@hurleysoftware.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable <stable@vger.kernel.org>,
	lwn@lwn.net, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: BUG: unable to handle kernel paging request from pty_write [was: Linux 4.4.2]
Date: Thu, 25 Feb 2016 22:32:26 +0100	[thread overview]
Message-ID: <56CF72EA.9040009@suse.cz> (raw)
In-Reply-To: <CA+55aFx306jsTaUkm_c4nJtEo=A3vdDFYqqpLJj1zKUh=wLxog@mail.gmail.com>

On 02/25/2016, 09:51 PM, Linus Torvalds wrote:
> Jiri, can you check your try_to_wake_up() disassembly for some
> indirect "jmp" instructions?

Nope, there is none.

I will reply to all your questions tomorrow.

Just quickly, as I have to go (and don't want you to duplicate efforts)
the kernel which was used can be obtained here:
https://build.opensuse.org/package/binaries/openSUSE:Factory:Staging:I/kernel-default?repository=standard

The issue is very weird, indeed, this is what I noted to our bugzilla:
The stack trace ends in call of try_to_wake_up. Then, there it has to be
some of the indirect calls:

callq  *0x40(%rax)
  p->sched_class->select_task_rq from select_task_rq

RAX is 0x00000000bb37e180, barely can be read with offset 0x40

callq  *0xd85656(%rip) # ffffffff81e2aba0 <smp_ops+0x20>
  smp_ops.smp_send_reschedule from ttwu_queue_remote

Which hardly can be it, given smp_ops is static.

So it has to be some other "call *" from a nested function :(.




Interestingly, RBP contains address inside try_to_wake_up --
ffffffff810a535a (dunno why) which is:
ffffffff810a5355:       e8 66 a0 ff ff          callq  ffffffff8109f3c0
<ttwu_stat>
ffffffff810a535a:       e9 9d fe ff ff          jmpq   ffffffff810a51fc
<try_to_wake_up+0x3c>


ttwu_stat does in the begginning:
mov    $0x16e80,%r14

which is what we actually still have in r14 when it crashes. The first
ttwu_stat's "if" has to go through the true branch (otherwise r14 would
be overwritten).



Another note: we die when jmp/calling to 0xffff88023fd40000.
RSI=RDI=0xffff88023fdd6e80. RSI-RIP is 0x96e80, which is R14 + 0x80000.
Coincidence?

thanks,
-- 
js
suse labs

  reply	other threads:[~2016-02-25 21:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 20:37 Linux 4.4.2 Greg KH
2016-02-17 20:37 ` Greg KH
2016-02-25 10:12 ` BUG: unable to handle kernel paging request from pty_write [was: Linux 4.4.2] Jiri Slaby
2016-02-25 18:40   ` Peter Hurley
2016-02-25 19:09     ` Linus Torvalds
2016-02-25 19:23       ` Steven Rostedt
2016-02-26  8:25         ` Jiri Slaby
2016-02-25 20:32       ` Peter Hurley
2016-02-25 20:51         ` Linus Torvalds
2016-02-25 21:32           ` Jiri Slaby [this message]
2016-02-25 22:33             ` Peter Hurley
2016-02-26  0:38               ` Peter Hurley
2016-02-26  8:45                 ` Jiri Slaby
2016-02-26  0:38             ` Linus Torvalds
2016-02-26  8:56               ` Jiri Slaby
2016-02-26  9:23                 ` Jiri Slaby
2016-02-26  9:50                   ` Jiri Slaby
2016-02-26 16:34                     ` Greg KH
2016-02-26 17:12                 ` Linus Torvalds
2016-02-29 15:45                   ` Paolo Bonzini
2016-02-26 17:52                 ` Peter Hurley
2016-02-25 21:43           ` Peter Hurley
2016-02-25 22:00           ` Jiri Kosina
2016-02-26  8:31             ` Jiri Slaby
2016-02-26  8:15     ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2016-02-26 18:05 Linus Torvalds
2016-02-26 18:17 ` Borislav Petkov
2016-02-26 18:18 ` Peter Hurley
2016-02-26 19:44 ` Linus Torvalds
2016-02-26 19:59   ` Robert Święcki
2016-02-29  7:39     ` Jiri Slaby
2016-02-29 12:43       ` Henrique de Moraes Holschuh

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=56CF72EA.9040009@suse.cz \
    --to=jslaby@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwn@lwn.net \
    --cc=peter@hurleysoftware.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 NNTP newsgroup(s).