From: David Howells <dhowells@redhat.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: dhowells@redhat.com, james.l.morris@oracle.com, serge@hallyn.com,
keyrings@vger.kernel.org, linux-security-module@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
syzkaller <syzkaller@googlegroups.com>
Subject: Re: keys: GPF in request_key
Date: Wed, 01 Feb 2017 13:22:24 +0000 [thread overview]
Message-ID: <21709.1485955344@warthog.procyon.org.uk> (raw)
In-Reply-To: <CACT4Y+arJJW0Ge9UxcLB77dM82gEENaEYgAcJdTSRLv1X0wnZw@mail.gmail.com>
Dmitry Vyukov <dvyukov@google.com> wrote:
> The line causes the crash is:
> BUG_ON(index_key->desc_len == 0);
>
> The addresses that the line tried to access are:
>
> RDI: ffffffffca29fa68
> RDI: ffffffffd7236a28
> RDI: 000000007d19ed68
These are all calculated from R12:
lea 0x10(%r12),%rdi
...
mov %rdi,%rdx
shr $0x3,%rdx
cmpb $0x0,(%rdx,%rax,1)
R12 would appear to be index_key - which would correlate with 0x10 being the
offset of desc_len therein - but why muck around with the pointer rather than
just
In my compiler output,
BUG_ON(index_key->desc_len == 0);
is turned into:
0xffffffff8131f023 <+0>: cmpq $0x0,0x10(%rsi)
0xffffffff8131f028 <+5>: jne 0xffffffff8131f02c <__key_link_begin+9>
0xffffffff8131f02a <+7>: ud2
What compiler are you using?
David
next prev parent reply other threads:[~2017-02-01 13:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 12:19 keys: GPF in request_key Dmitry Vyukov
2017-02-01 13:11 ` David Howells
2017-02-01 13:23 ` Dmitry Vyukov
2017-02-01 13:22 ` David Howells [this message]
2017-02-01 13:48 ` David Howells
2017-02-01 14:07 ` Dmitry Vyukov
2017-02-01 14:54 ` David Howells
2017-02-01 15:26 ` Dmitry Vyukov
2017-02-01 15:42 ` David Howells
2017-02-01 15:50 ` Dmitry Vyukov
2017-02-01 16:50 ` David Howells
2017-02-01 17:13 ` Dmitry Vyukov
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=21709.1485955344@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=dvyukov@google.com \
--cc=james.l.morris@oracle.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=syzkaller@googlegroups.com \
/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