lkml.org 
[lkml]   [2023]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip: x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
    The following commit has been merged into the x86/bugs branch of tip:

    Commit-ID: a94be9ae24d2e1580cf68fb58e14369ae6a4846b
    Gitweb: https://git.kernel.org/tip/a94be9ae24d2e1580cf68fb58e14369ae6a4846b
    Author: Josh Poimboeuf <jpoimboe@kernel.org>
    AuthorDate: Mon, 04 Sep 2023 22:04:59 -07:00
    Committer: Ingo Molnar <mingo@kernel.org>
    CommitterDate: Tue, 05 Sep 2023 12:05:07 +02:00

    x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block

    Simplify the code flow a bit by moving the retbleed IBPB check into the
    existing 'has_microcode' block.

    Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://lore.kernel.org/r/0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org
    ---
    arch/x86/kernel/cpu/bugs.c | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
    index 941ac94..6b443f0 100644
    --- a/arch/x86/kernel/cpu/bugs.c
    +++ b/arch/x86/kernel/cpu/bugs.c
    @@ -2430,10 +2430,8 @@ static void __init srso_select_mitigation(void)
    setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
    return;
    }
    - }

    - if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
    - if (has_microcode) {
    + if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
    srso_mitigation = SRSO_MITIGATION_IBPB;
    goto out;
    }
    \
     
     \ /
      Last update: 2023-09-05 18:46    [W:4.062 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site