From: Borislav Petkov <bp@alien8.de>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
syzbot <syzbot+ce179bc99e64377c24bc@syzkaller.appspotmail.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Jiri Olsa <jolsa@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
Thomas Gleixner <tglx@linutronix.de>,
the arch/x86 maintainers <x86@kernel.org>,
clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: general protection fault in perf_misc_flags
Date: Tue, 22 Sep 2020 00:13:36 +0200 [thread overview]
Message-ID: <20200921221336.GN5901@zn.tnic> (raw)
In-Reply-To: <CAKwvOdmKcn=FNzwtBZ8z0evLz4BXgWtsoz9+QTC6GLqtNp1bXg@mail.gmail.com>
On Mon, Sep 21, 2020 at 01:59:43PM -0700, Nick Desaulniers wrote:
> Right, the two sequences above look almost the same, except those 4
> bytes of zeros (the disassembler gets confused about the rest, but
> it's the same byte sequence otherwise). Are the two disassemblies a
> comparison of the code at runtime vs. compile-time?
Yes.
> If so, how did you disassemble the runtime code?
./scripts/decodecode < /tmp/splat
where /tmp/splat contains the line starting with "Code:". Make sure you
have only one "Code:"-line, otherwise you'll see the code of the *last*
Code: line only.
> If runtime and compile time differ, I suspect some kind of runtime
> patching.
If it is, it ain't patching at the right place. :)
But no, that function is pretty simple and looking at its asm, there's
no asm goto() or alternatives in there. But that .config might add them.
It adds a lot of calls to *ASAN helpers and whatnot.
> I wonder if we calculated the address of a static_key wrong
> (asm goto). What function am I looking at the disassembly of?
> perf_misc_flags() in arch/x86/events/core.c?
Yes.
> With this config?
> https://syzkaller.appspot.com/x/.config?x=cd992d74d6c7e62 (though I
> don't see _any_ asm goto in the IR for this file built with this
> config).
Right, there should be none.
> If this is deterministically reproducible, I suppose we
> could set a watchpoint on the address being overwritten?
Sounds like worth a try. I'll go sleep instead, tho. :)
Gnight and good luck.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2020-09-21 22:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 8:32 general protection fault in perf_misc_flags syzbot
2020-09-19 11:08 ` Borislav Petkov
2020-09-21 5:54 ` Dmitry Vyukov
2020-09-21 8:08 ` Dmitry Vyukov
2020-09-21 20:59 ` Nick Desaulniers
2020-09-21 22:13 ` Borislav Petkov [this message]
2020-09-22 18:56 ` Nick Desaulniers
2020-09-22 19:29 ` Borislav Petkov
2020-09-23 9:03 ` Borislav Petkov
2020-09-23 9:24 ` Dmitry Vyukov
2020-09-23 10:34 ` Borislav Petkov
2020-09-23 15:20 ` Dmitry Vyukov
2020-09-25 12:22 ` Dmitry Vyukov
2020-09-26 0:32 ` Nick Desaulniers
2020-09-26 6:46 ` Dmitry Vyukov
2020-09-26 17:14 ` Borislav Petkov
2020-09-26 11:21 ` Borislav Petkov
2020-09-26 12:08 ` Dmitry Vyukov
2020-09-22 5:15 ` Dmitry Vyukov
2020-09-22 5:16 ` Dmitry Vyukov
2020-09-27 14:57 ` Borislav Petkov
2020-09-28 5:18 ` Dmitry Vyukov
2020-09-28 6:06 ` Dmitry Vyukov
2020-09-28 8:38 ` Borislav Petkov
2020-09-28 8:40 ` Dmitry Vyukov
2020-09-28 8:54 ` Borislav Petkov
2020-09-28 10:33 ` Dmitry Vyukov
2020-09-28 20:23 ` Borislav Petkov
2020-09-29 8:33 ` Borislav Petkov
2020-09-29 13:29 ` Dmitry Vyukov
2020-09-30 16:17 ` Borislav Petkov
2020-09-30 16:23 ` Dmitry Vyukov
2020-09-30 16:29 ` Dmitry Vyukov
2020-09-30 16:31 ` Borislav Petkov
2020-10-01 10:23 ` Dmitry Vyukov
2020-10-01 11:05 ` Borislav Petkov
2020-09-28 20:51 ` Nick Desaulniers
2020-09-28 21:19 ` Andy Lutomirski
2020-09-28 7:25 ` Marco Elver
2020-09-28 20:32 ` Nick Desaulniers
2020-09-29 13:27 ` 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=20200921221336.GN5901@zn.tnic \
--to=bp@alien8.de \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dvyukov@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=syzbot+ce179bc99e64377c24bc@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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).