lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Mar 2017 18:01:06 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Alexander Potapenko <glider@...gle.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Dmitriy Vyukov <dvyukov@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kbuild test robot <fengguang.wu@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>
CC:     <linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/urgent] x86/kasan: Fix boot with KASAN=y and
 PROFILE_ANNOTATED_BRANCHES=y



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@...or.com> wrote:
>>> Commit-ID:  be3606ff739d1c1be36389f8737c577ad87e1f57
>>> Gitweb:     http://git.kernel.org/tip/be3606ff739d1c1be36389f8737c577ad87e1f57
>>> Author:     Andrey Ryabinin <aryabinin@...tuozzo.com>
>>> AuthorDate: Mon, 13 Mar 2017 19:33:37 +0300
>>> Committer:  Thomas Gleixner <tglx@...utronix.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.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ