Lines Matching +full:alternative +full:- +full:a

1 /* SPDX-License-Identifier: GPL-2.0 */
8 #include <asm/alternative.h>
9 #include <asm/asm-offsets.h>
10 #include <asm/nospec-branch.h>
53 * Worse, you can only have a single EXPORT_SYMBOL per line,
64 #include <asm/GEN-for-each-reg.h>
71 #include <asm/GEN-for-each-reg.h>
93 #include <asm/GEN-for-each-reg.h>
100 #include <asm/GEN-for-each-reg.h>
119 #include <asm/GEN-for-each-reg.h>
126 #include <asm/GEN-for-each-reg.h>
135 * compiler issues is either a short one or the compiler doesn't use
136 * relocations for same-section JMPs and that breaks the returns
147 * - srso_alias_untrain_ret() is 2M aligned
148 * - srso_alias_safe_ret() is also in the same 2M page but bits 2, 8, 14
156 * As a result, srso_alias_safe_ret() becomes a safe return.
188 * above. On kernel entry, srso_untrain_ret() is executed which is a
193 * later, it is a stack manipulation and a RET which is mispredicted and
194 * thus a "safe" one to use.
197 .skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc
203 * This forces the function return instruction to speculate into a trap
229 /* Dummy for the alternative in CALL_UNTRAIN_RET. */
254 * Regarding alignment - the instructions which need to be untrained,
255 * must all start at a cacheline boundary for Zen1/2 generations. That
258 * must start at a cacheline boundary.
263 * 1) The RET at retbleed_return_thunk must be on a 64 byte boundary, for
268 * from re-poisioning the BTB prediction.
271 .skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc
281 * Executing the TEST instruction has a side effect of evicting any BTB
288 * As executed from retbleed_return_thunk, this is a plain RET.
293 * This creates a correct BTB prediction (type=ret), but in the
297 * With SMT enabled and STIBP active, a sibling thread cannot poison
298 * RET's prediction to a type of its choice, but can evict the
329 ALTERNATIVE JMP_RETBLEED_UNTRAIN_RET, JMP_SRSO_UNTRAIN_RET, X86_FEATURE_SRSO
341 * Keep the hotpath in a 16byte I-fetch for the non-debug
370 * This function name is magical and is used by -mfunction-return=thunk-extern
377 * The ALTERNATIVE below adds a really loud warning to catch the case
388 ALTERNATIVE __stringify(ANNOTATE_UNRET_SAFE; ret), \