From: Alexander Popov <alpopov@ptsecurity.com>
To: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andrey Konovalov <adech.fo@gmail.com>,
"Denys Vlasenko" <dvlasenk@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
Alexander Kuleshov <kuleshovmail@gmail.com>,
Sergey Kovalev <SKovalev@ptsecurity.com>, <x86@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] x86_64: fix KASan shadow region page tables
Date: Mon, 25 May 2015 16:43:06 +0300 [thread overview]
Message-ID: <556326EA.10807@ptsecurity.com> (raw)
In-Reply-To: <5562D989.3030206@samsung.com>
On 25.05.2015 11:12, Andrey Ryabinin wrote:
> On 05/22/2015 07:03 PM, Alexander Popov wrote:
>> Physical addresses in KASan shadow region page tables need fixup:
>> kernel halts without it if phys_base is not zero.
>>
>
> Indeed.
> Since we have to patch page tables anyway, compile-time created kasan
> page tables become pointless.
> So, I'd suggest to create them in runtime. This could be done in plain C
> in kasan_map_early_shadow().
>
Thanks for your reply, Andrey.
Creating kasan_zero_pud, kasan_zero_pmd and kasan_zero_pte in
kasan_map_early_shadow() doesn't look handy for me because this function
is called twice in x86_64_start_kernel().
What do you think about leaving the initialization of KASan shadow region
page tables in arch/x86/kernel/head_64.S and calling something like
kasan_fixup_early_shadow() before calling kasan_map_early_shadow()
for the first time?
Best regards,
Alexander
next prev parent reply other threads:[~2015-05-25 13:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 16:03 [PATCH 1/1] x86_64: fix KASan shadow region page tables Alexander Popov
2015-05-25 8:12 ` Andrey Ryabinin
2015-05-25 13:43 ` Alexander Popov [this message]
2015-05-26 8:52 ` Andrey Ryabinin
2015-05-28 8:56 ` Alexander Popov
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=556326EA.10807@ptsecurity.com \
--to=alpopov@ptsecurity.com \
--cc=SKovalev@ptsecurity.com \
--cc=a.ryabinin@samsung.com \
--cc=adech.fo@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.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