x86/bugs: Avoid warning when overriding return thunk
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Wed, 11 Jun 2025 17:29:31 +0000 (10:29 -0700)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 23 Jun 2025 10:21:30 +0000 (12:21 +0200)
commit9f85fdb9fc5a1bd308a10a0a7d7e34f2712ba58b
tree15128d9bab37b855076599b6352d46c8e917440f
parent530e80648bff083e1d19ad7248c0540812a9a35f
x86/bugs: Avoid warning when overriding return thunk

The purpose of the warning is to prevent an unexpected change to the return
thunk mitigation. However, there are legitimate cases where the return
thunk is intentionally set more than once. For example, ITS and SRSO both
can set the return thunk after retbleed has set it. In both the cases
retbleed is still mitigated.

Replace the warning with an info about the active return thunk.

Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250611-eibrs-fix-v4-3-5ff86cac6c61@linux.intel.com
arch/x86/kernel/cpu/bugs.c