lkml.org 
[lkml]   [2023]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RESEND][PATCH 1/6] x86/bugs: Add asm helpers for executing VERW
    On Wed, Oct 25, 2023 at 08:52:50AM +0100, Andrew Cooper wrote:

    > > +.pushsection .entry.text, "ax"
    > > +
    > > +.align 64
    > > +SYM_CODE_START_NOALIGN(mds_verw_sel)
    > > + UNWIND_HINT_UNDEFINED
    > > + ANNOTATE_NOENDBR
    > > +1:
    > > + .word __KERNEL_DS
    > > + .skip 64 - (. - 1b), 0xcc
    >
    > The 1 label aliases mds_verw_sel and this must remain like this for the
    > construct to work.
    >
    > So instead of .skip, why not simply .align 64, 0xcc and get rid of the
    > 1: label?

    Because I forgot you can add a filler byte to .align :/ Yes, that's much
    saner.

    > Do we have a suitably named constant cacheline size, rather than
    > opencoding 64?

    L1_CACHE_BYTES probably.

    >
    > > +SYM_CODE_END(mds_verw_sel);
    >
    > Given that KVM needs it, this probably needs an EXPORT_SYMBOL_GPL() on it.

    localyesconfig ftw ;-)

    /me runs

    \
     
     \ /
      Last update: 2023-10-25 10:03    [W:2.831 / U:0.468 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site