lkml.org 
[lkml]   [2023]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 11/20] x86/srso: Improve i-cache locality for alias mitigation
    Date
    Move srso_alias_return_thunk() to the same section as
    srso_alias_safe_ret() so they can share a cache line.

    Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
    ---
    arch/x86/lib/retpoline.S | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S
    index cd86aeb5fdd3..9ab634f0b5d2 100644
    --- a/arch/x86/lib/retpoline.S
    +++ b/arch/x86/lib/retpoline.S
    @@ -177,15 +177,14 @@ SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE)
    int3
    SYM_FUNC_END(srso_alias_safe_ret)

    - .section .text..__x86.return_thunk
    -
    -SYM_CODE_START(srso_alias_return_thunk)
    +SYM_CODE_START_NOALIGN(srso_alias_return_thunk)
    UNWIND_HINT_FUNC
    ANNOTATE_NOENDBR
    call srso_alias_safe_ret
    ud2
    SYM_CODE_END(srso_alias_return_thunk)

    + .section .text..__x86.return_thunk
    /*
    * Some generic notes on the untraining sequences:
    *
    --
    2.41.0
    \
     
     \ /
      Last update: 2023-09-05 18:44    [W:4.080 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site