lkml.org 
[lkml]   [2022]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC PATCH v3 20/20] x86: Add support for CONFIG_CFI_CLANG
    On Sat, Jul 23, 2022 at 4:21 AM Peter Zijlstra <peterz@infradead.org> wrote:
    >
    > On Fri, Jun 10, 2022 at 04:35:13PM -0700, Sami Tolvanen wrote:
    >
    > > +#ifdef CONFIG_CFI_CLANG
    > > +#define __CFI_TYPE(name) \
    > > + .fill 7, 1, 0xCC ASM_NL \
    > > + SYM_START(__cfi_##name, SYM_L_LOCAL, SYM_A_NONE) \
    > > + int3 ASM_NL \
    > > + int3 ASM_NL \
    > > + mov __kcfi_typeid_##name, %eax ASM_NL \
    > > + int3 ASM_NL \
    > > + int3 ASM_NL \
    > > + SYM_FUNC_END(__cfi_##name)
    > > +#endif
    >
    > Like said on IRC yesterday, this doesn't generate the right mov
    > encoding.
    >
    > .byte 0xb8 ; .long __kcfi_typeid_##name ; \
    >
    > works. Your LLVM tree already has the ZExt patch you gave me yesterday
    > to fix up the linker fallout from this change.

    Indeed, I updated my kernel tree and confirmed that this fixes the
    issue. Thanks for pointing it out.

    Sami

    \
     
     \ /
      Last update: 2022-07-26 02:11    [W:3.344 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site