From: Borislav Petkov <bp@alien8.de>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Jann Horn <jannh@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v4 2/4] x86/traps: Print non-canonical address on #GP
Date: Wed, 20 Nov 2019 22:39:36 +0100 [thread overview]
Message-ID: <20191120213936.GM2634@zn.tnic> (raw)
In-Reply-To: <20191120202516.GD32572@linux.intel.com>
On Wed, Nov 20, 2019 at 12:25:16PM -0800, Sean Christopherson wrote:
> I get that adding a print just for the straddle case is probably overkill,
Yes, frankly I am not too crazy about adding all that code just for the
straddle case.
Also, the straddle case is kinda clear - it is always the
0x7ffffffffXX.. + size - 1
address and we could simply dump that address instead of dumping a
range. So we can simplify this to:
("general protection fault, non-canonical address 0x%lx: 0000 [#1] SMP\n", addr + size - 1)
It all depends on how the access is done by the hardware but we can't
always be absolutely sure which of the non-canonical bytes was accessed
first. Depends also on the access width and yadda yadda... But I don't
think we can know for sure always without the hw telling us, thus the
"possibly" formulation.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2019-11-20 21:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 17:02 [PATCH v4 1/4] x86/insn-eval: Add support for 64-bit kernel mode Jann Horn
2019-11-20 17:02 ` [PATCH v4 2/4] x86/traps: Print non-canonical address on #GP Jann Horn
2019-11-20 20:25 ` Sean Christopherson
2019-11-20 21:39 ` Borislav Petkov [this message]
2019-11-27 22:28 ` Jann Horn
2019-11-20 17:02 ` [PATCH v4 3/4] x86/dumpstack: Split out header line printing from __die() Jann Horn
2019-11-20 17:02 ` [PATCH v4 4/4] x86/kasan: Print original address on #GP Jann Horn
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=20191120213936.GM2634@zn.tnic \
--to=bp@alien8.de \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=jannh@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=sean.j.christopherson@intel.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).