All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Alexander Potapenko <glider@google.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dmitriy Vyukov <dvyukov@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kbuild test robot <fengguang.wu@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>
Cc: <linux-tip-commits@vger.kernel.org>
Subject: Re: [tip:x86/urgent] x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y
Date: Tue, 14 Mar 2017 18:01:06 +0300	[thread overview]
Message-ID: <3cf126f2-8810-086f-1a71-1065d965acb8@virtuozzo.com> (raw)
In-Reply-To: <c97b497b-4647-9566-499b-6ae83f0af426@virtuozzo.com>



On 03/14/2017 05:59 PM, Andrey Ryabinin wrote:
> On 03/14/2017 05:09 PM, Alexander Potapenko wrote:
>> On Tue, Mar 14, 2017 at 12:03 AM, tip-bot for Andrey Ryabinin
>> <tipbot@zytor.com> wrote:
>>> Commit-ID:  be3606ff739d1c1be36389f8737c577ad87e1f57
>>> Gitweb:     http://git.kernel.org/tip/be3606ff739d1c1be36389f8737c577ad87e1f57
>>> Author:     Andrey Ryabinin <aryabinin@virtuozzo.com>
>>> AuthorDate: Mon, 13 Mar 2017 19:33:37 +0300
>>> Committer:  Thomas Gleixner <tglx@linutronix.de>
>>> CommitDate: Tue, 14 Mar 2017 00:00:55 +0100
>>>
>>> x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y
>>>
>>> The kernel doesn't boot with both PROFILE_ANNOTATED_BRANCHES=y and KASAN=y
>>> options selected. With branch profiling enabled we end up calling
>>> ftrace_likely_update() before kasan_early_init(). ftrace_likely_update() is
>>> built with KASAN instrumentation, so calling it before kasan has been
>>> initialized leads to crash.
>>>
>>> Use DISABLE_BRANCH_PROFILING define to make sure that we don't call
>>> ftrace_likely_update() from early code before kasan_early_init().
>> Won't it suffice to disable instrumentation of ftrace_likely_update() and alike?
> 
> Not just ftrace_likely_update(), but also all functions that ftrace_likely_update() might call.
> That would suffice, but it would be unreasonable way to fix this, given that we can just
>       ftrace_likely_update() call.

 ^^avoid

> Plus we don't have any sane way to disable instrumentation per-function.
> 

      reply	other threads:[~2017-03-14 15:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28  3:12 [mm/kasan] 80a9201a59 BUG: kernel reboot-without-warning in early-boot stage, last printk: Booting the kernel Fengguang Wu
2017-02-28  3:12 ` Fengguang Wu
2017-02-28  9:06 ` Dmitry Vyukov
2017-02-28  9:06   ` Dmitry Vyukov
2017-02-28  9:06   ` Dmitry Vyukov
2017-03-11 13:54 ` [mm/kasan] BUG: KASAN: slab-out-of-bounds in inotify_read at addr ffff88001539780c Fengguang Wu
2017-03-11 13:54   ` Fengguang Wu
2017-03-13 14:51   ` Andrey Ryabinin
2017-03-13 14:51     ` Andrey Ryabinin
2017-03-13 14:51     ` Andrey Ryabinin
2017-03-13 14:25 ` [mm/kasan] 80a9201a59 BUG: kernel reboot-without-warning in early-boot stage, last printk: Booting the kernel Andrey Ryabinin
2017-03-13 14:25   ` Andrey Ryabinin
2017-03-13 14:25   ` Andrey Ryabinin
2017-03-13 16:33 ` [PATCH] x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y Andrey Ryabinin
2017-03-13 16:33   ` Andrey Ryabinin
2017-03-13 23:03   ` [tip:x86/urgent] " tip-bot for Andrey Ryabinin
2017-03-14 14:09     ` Alexander Potapenko
2017-03-14 14:59       ` Andrey Ryabinin
2017-03-14 15:01         ` Andrey Ryabinin [this message]

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=3cf126f2-8810-086f-1a71-1065d965acb8@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=fengguang.wu@intel.com \
    --cc=glider@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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.