lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 24/39] x86/text-patching: Make text_gen_insn() IBT aware
    On Thu, Feb 24, 2022 at 03:52:02PM +0100, Peter Zijlstra wrote:
    > + /*
    > + * Hide the addresses to avoid the compiler folding in constants when
    > + * referencing code, these can mess up annotations like
    > + * ANNOTATE_NOENDBR.
    > + */
    > + OPTIMIZER_HIDE_VAR(addr);
    > + OPTIMIZER_HIDE_VAR(dest);
    > +
    > +#ifdef CONFIG_X86_KERNEL_IBT
    > + if (is_endbr(*(u32 *)dest))
    > + dest += 4;
    > +#endif

    Another unnecessary ifdef.

    --
    Josh

    \
     
     \ /
      Last update: 2022-02-25 01:56    [W:4.511 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site