2023-09-05 18:14:30

by Josh Poimboeuf

[permalink] [raw]
Subject: [PATCH v3 07/20] x86/srso: Print mitigation for retbleed IBPB case

When overriding the requested mitigation with IBPB due to retbleed=ibpb,
print the mitigation in the usual format instead of a custom error
message.

Signed-off-by: Josh Poimboeuf <[email protected]>
---
arch/x86/kernel/cpu/bugs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 235c0e00ae51..6c47f37515b8 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2425,9 +2425,8 @@ static void __init srso_select_mitigation(void)

if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
if (has_microcode) {
- pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n");
srso_mitigation = SRSO_MITIGATION_IBPB;
- goto pred_cmd;
+ goto out;
}
}

@@ -2490,7 +2489,8 @@ static void __init srso_select_mitigation(void)
break;
}

- pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
+out:
+ pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode");

pred_cmd:
if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&
--
2.41.0


Subject: [tip: x86/bugs] x86/srso: Print mitigation for retbleed IBPB case

The following commit has been merged into the x86/bugs branch of tip:

Commit-ID: 6988c6ceccb03bb29723bbf5645f7f5ab0658816
Gitweb: https://git.kernel.org/tip/6988c6ceccb03bb29723bbf5645f7f5ab0658816
Author: Josh Poimboeuf <[email protected]>
AuthorDate: Mon, 04 Sep 2023 22:04:51 -07:00
Committer: Ingo Molnar <[email protected]>
CommitterDate: Tue, 19 Sep 2023 11:42:47 +02:00

x86/srso: Print mitigation for retbleed IBPB case

When overriding the requested mitigation with IBPB due to retbleed=ibpb,
print the mitigation in the usual format instead of a custom error
message.

Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/ec3af919e267773d896c240faf30bfc6a1fd6304.1693889988.git.jpoimboe@kernel.org
---
arch/x86/kernel/cpu/bugs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 235c0e0..6c47f37 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2425,9 +2425,8 @@ static void __init srso_select_mitigation(void)

if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
if (has_microcode) {
- pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n");
srso_mitigation = SRSO_MITIGATION_IBPB;
- goto pred_cmd;
+ goto out;
}
}

@@ -2490,7 +2489,8 @@ static void __init srso_select_mitigation(void)
break;
}

- pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
+out:
+ pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode");

pred_cmd:
if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&

Subject: [tip: x86/bugs] x86/srso: Print mitigation for retbleed IBPB case

The following commit has been merged into the x86/bugs branch of tip:

Commit-ID: 8e7f2ef76ed2360dabe3ccd253042f9f9054db65
Gitweb: https://git.kernel.org/tip/8e7f2ef76ed2360dabe3ccd253042f9f9054db65
Author: Josh Poimboeuf <[email protected]>
AuthorDate: Mon, 04 Sep 2023 22:04:51 -07:00
Committer: Ingo Molnar <[email protected]>
CommitterDate: Sat, 23 Sep 2023 14:13:02 +02:00

x86/srso: Print mitigation for retbleed IBPB case

When overriding the requested mitigation with IBPB due to retbleed=ibpb,
print the mitigation in the usual format instead of a custom error
message.

Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/ec3af919e267773d896c240faf30bfc6a1fd6304.1693889988.git.jpoimboe@kernel.org
---
arch/x86/kernel/cpu/bugs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 235c0e0..6c47f37 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2425,9 +2425,8 @@ static void __init srso_select_mitigation(void)

if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
if (has_microcode) {
- pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n");
srso_mitigation = SRSO_MITIGATION_IBPB;
- goto pred_cmd;
+ goto out;
}
}

@@ -2490,7 +2489,8 @@ static void __init srso_select_mitigation(void)
break;
}

- pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
+out:
+ pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode");

pred_cmd:
if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&

Subject: [tip: x86/bugs] x86/srso: Print mitigation for retbleed IBPB case

The following commit has been merged into the x86/bugs branch of tip:

Commit-ID: de9f5f7b06a5b7adbfdd8016f011120a4e928add
Gitweb: https://git.kernel.org/tip/de9f5f7b06a5b7adbfdd8016f011120a4e928add
Author: Josh Poimboeuf <[email protected]>
AuthorDate: Mon, 04 Sep 2023 22:04:51 -07:00
Committer: Borislav Petkov (AMD) <[email protected]>
CommitterDate: Fri, 20 Oct 2023 11:45:24 +02:00

x86/srso: Print mitigation for retbleed IBPB case

When overriding the requested mitigation with IBPB due to retbleed=ibpb,
print the mitigation in the usual format instead of a custom error
message.

Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/ec3af919e267773d896c240faf30bfc6a1fd6304.1693889988.git.jpoimboe@kernel.org
---
arch/x86/kernel/cpu/bugs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 235c0e0..6c47f37 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2425,9 +2425,8 @@ static void __init srso_select_mitigation(void)

if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
if (has_microcode) {
- pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n");
srso_mitigation = SRSO_MITIGATION_IBPB;
- goto pred_cmd;
+ goto out;
}
}

@@ -2490,7 +2489,8 @@ static void __init srso_select_mitigation(void)
break;
}

- pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode"));
+out:
+ pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode");

pred_cmd:
if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&