From: Ingo Molnar <mingo@kernel.org>
To: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, Andrey Konovalov <adech.fo@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Borislav Petkov <bp@alien8.de>,
Alexander Popov <alpopov@ptsecurity.com>,
Dmitry Vyukov <dvyukov@google.com>,
Alexander Potapenko <glider@google.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/5] x86_64: fix kasan shadow region page tables
Date: Wed, 1 Jul 2015 11:07:40 +0200 [thread overview]
Message-ID: <20150701090740.GA16645@gmail.com> (raw)
In-Reply-To: <1435654811-8915-2-git-send-email-a.ryabinin@samsung.com>
* Andrey Ryabinin <a.ryabinin@samsung.com> wrote:
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index 5a46681..f129a9a 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -161,11 +161,12 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
> /* Kill off the identity-map trampoline */
> reset_early_page_tables();
>
> - kasan_map_early_shadow(early_level4_pgt);
> -
> - /* clear bss before set_intr_gate with early_idt_handler */
> clear_bss();
>
> + clear_page(init_level4_pgt);
> +
> + kasan_early_init();
> +
> for (i = 0; i < NUM_EXCEPTION_VECTORS; i++)
> set_intr_gate(i, early_idt_handler_array[i]);
> load_idt((const struct desc_ptr *)&idt_descr);
> @@ -177,12 +178,9 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
> */
> load_ucode_bsp();
>
> - clear_page(init_level4_pgt);
> /* set init_level4_pgt kernel high mapping*/
> init_level4_pgt[511] = early_level4_pgt[511];
>
> - kasan_map_early_shadow(init_level4_pgt);
> -
> x86_64_start_reservations(real_mode_data);
> }
>
So this changes generic code (moves the clear_page(init_level4_pgt) call), but the
changelog claims it's a KASAN-specific change.
Please split this into two patches: the first one does the generic change, the
second one the KASAN specific one.
That way if anything breaks in the generic code due to this change we have a
simple commit to bisect to.
Thanks,
Ingo
next prev parent reply other threads:[~2015-07-01 9:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1435654466-8714-1-git-send-email-a.ryabinin@samsung.com>
2015-06-30 8:54 ` [PATCH 1/5] x86_64: fix kasan shadow region page tables Andrey Ryabinin
2015-06-30 8:54 ` [PATCH 2/5] x86_64: kasan: flush tlbs after switching cr3 Andrey Ryabinin
2015-06-30 8:54 ` [PATCH 3/5] x86_64: kasan: fix boot crash on AMD processors Andrey Ryabinin
2015-06-30 9:00 ` [PATCH RESEND 0/5] x86_64 kasan fixes Andrey Ryabinin
2015-06-30 9:00 ` [PATCH 1/5] x86_64: fix kasan shadow region page tables Andrey Ryabinin
2015-07-01 9:07 ` Ingo Molnar [this message]
2015-07-01 12:13 ` Andrey Ryabinin
2015-07-02 7:56 ` Ingo Molnar
2015-06-30 9:00 ` [PATCH 2/5] x86_64: kasan: flush tlbs after switching cr3 Andrey Ryabinin
2015-06-30 9:00 ` [PATCH 3/5] x86_64: kasan: fix boot crash on AMD processors Andrey Ryabinin
2015-06-30 9:00 ` [PATCH 4/5] x86_64: kasan: add message about kasan being initialized Andrey Ryabinin
2015-06-30 9:00 ` [PATCH 5/5] x86_64: kasan: move KASAN_SHADOW_OFFSET to the arch Kconfig Andrey Ryabinin
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=20150701090740.GA16645@gmail.com \
--to=mingo@kernel.org \
--cc=a.ryabinin@samsung.com \
--cc=adech.fo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alpopov@ptsecurity.com \
--cc=bp@alien8.de \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.