lkml.org 
[lkml]   [2020]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: x86/irq: Make run_on_irqstack_cond() typesafe
    Hi Thomas,

    On Tue, Sep 22, 2020 at 12:58 AM Thomas Gleixner <tglx@linutronix.de> wrote:
    >
    > Sami reported that run_on_irqstack_cond() requires the caller to cast
    > functions to mismatching types, which trips indirect call Control-Flow
    > Integrity (CFI) in Clang.
    >
    > Instead of disabling CFI on that function, provide proper helpers for
    > the three call variants. The actual ASM code stays the same as that is
    > out of reach.
    >
    > Reported-by: Sami Tolvanen <samitolvanen@google.com>
    > Fixes: 931b94145981 ("x86/entry: Provide helpers for executing on the irqstack")
    > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

    Thank you for the patch! I confirmed that this fixes the type mismatch
    issue with CFI for me:

    Tested-by: Sami Tolvanen <samitolvanen@google.com>

    Also, please note that this was first reported by Nathan in this GitHub issue:
    https://github.com/ClangBuiltLinux/linux/issues/1052

    Sami

    \
     
     \ /
      Last update: 2020-09-22 20:47    [W:3.882 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site