Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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(). Fixes: ef7f0d6 ("x86_64: add KASan support") Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Andrey Ryabinin <[email protected]> Cc: [email protected] Cc: Alexander Potapenko <[email protected]> Cc: [email protected] Cc: Andrew Morton <[email protected]> Cc: [email protected] Cc: Dmitry Vyukov <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
- Loading branch information