retpoline.S (ab1c247094e323177a578b38f0325bf79f0317ac) | retpoline.S (5fa31af31e726c7f5a8f84800153054ca499338a) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#include <linux/export.h> 4#include <linux/stringify.h> 5#include <linux/linkage.h> 6#include <asm/dwarf2.h> 7#include <asm/cpufeatures.h> 8#include <asm/alternative.h> --- 57 unchanged lines hidden (view full) --- 66 67 .align RETPOLINE_THUNK_SIZE 68SYM_CODE_END(__x86_indirect_thunk_array) 69 70#define GEN(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg) 71#include <asm/GEN-for-each-reg.h> 72#undef GEN 73 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#include <linux/export.h> 4#include <linux/stringify.h> 5#include <linux/linkage.h> 6#include <asm/dwarf2.h> 7#include <asm/cpufeatures.h> 8#include <asm/alternative.h> --- 57 unchanged lines hidden (view full) --- 66 67 .align RETPOLINE_THUNK_SIZE 68SYM_CODE_END(__x86_indirect_thunk_array) 69 70#define GEN(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg) 71#include <asm/GEN-for-each-reg.h> 72#undef GEN 73 |
74#ifdef CONFIG_CALL_DEPTH_TRACKING | 74#ifdef CONFIG_MITIGATION_CALL_DEPTH_TRACKING |
75.macro CALL_THUNK reg 76 .align RETPOLINE_THUNK_SIZE 77 78SYM_INNER_LABEL(__x86_indirect_call_thunk_\reg, SYM_L_GLOBAL) 79 UNWIND_HINT_UNDEFINED 80 ANNOTATE_NOENDBR 81 82 CALL_DEPTH_ACCOUNT --- 239 unchanged lines hidden (view full) --- 322 ALTERNATIVE_2 JMP_RETBLEED_UNTRAIN_RET, \ 323 JMP_SRSO_UNTRAIN_RET, X86_FEATURE_SRSO, \ 324 JMP_SRSO_ALIAS_UNTRAIN_RET, X86_FEATURE_SRSO_ALIAS 325SYM_FUNC_END(entry_untrain_ret) 326__EXPORT_THUNK(entry_untrain_ret) 327 328#endif /* CONFIG_CPU_UNRET_ENTRY || CONFIG_CPU_SRSO */ 329 | 75.macro CALL_THUNK reg 76 .align RETPOLINE_THUNK_SIZE 77 78SYM_INNER_LABEL(__x86_indirect_call_thunk_\reg, SYM_L_GLOBAL) 79 UNWIND_HINT_UNDEFINED 80 ANNOTATE_NOENDBR 81 82 CALL_DEPTH_ACCOUNT --- 239 unchanged lines hidden (view full) --- 322 ALTERNATIVE_2 JMP_RETBLEED_UNTRAIN_RET, \ 323 JMP_SRSO_UNTRAIN_RET, X86_FEATURE_SRSO, \ 324 JMP_SRSO_ALIAS_UNTRAIN_RET, X86_FEATURE_SRSO_ALIAS 325SYM_FUNC_END(entry_untrain_ret) 326__EXPORT_THUNK(entry_untrain_ret) 327 328#endif /* CONFIG_CPU_UNRET_ENTRY || CONFIG_CPU_SRSO */ 329 |
330#ifdef CONFIG_CALL_DEPTH_TRACKING | 330#ifdef CONFIG_MITIGATION_CALL_DEPTH_TRACKING |
331 332 .align 64 333SYM_FUNC_START(call_depth_return_thunk) 334 ANNOTATE_NOENDBR 335 /* 336 * Keep the hotpath in a 16byte I-fetch for the non-debug 337 * case. 338 */ --- 15 unchanged lines hidden (view full) --- 354 355 CREDIT_CALL_DEPTH 356 357 ANNOTATE_UNRET_SAFE 358 ret 359 int3 360SYM_FUNC_END(call_depth_return_thunk) 361 | 331 332 .align 64 333SYM_FUNC_START(call_depth_return_thunk) 334 ANNOTATE_NOENDBR 335 /* 336 * Keep the hotpath in a 16byte I-fetch for the non-debug 337 * case. 338 */ --- 15 unchanged lines hidden (view full) --- 354 355 CREDIT_CALL_DEPTH 356 357 ANNOTATE_UNRET_SAFE 358 ret 359 int3 360SYM_FUNC_END(call_depth_return_thunk) 361 |
362#endif /* CONFIG_CALL_DEPTH_TRACKING */ | 362#endif /* CONFIG_MITIGATION_CALL_DEPTH_TRACKING */ |
363 364/* 365 * This function name is magical and is used by -mfunction-return=thunk-extern 366 * for the compiler to generate JMPs to it. 367 * 368 * This code is only used during kernel boot or module init. All 369 * 'JMP __x86_return_thunk' sites are changed to something else by 370 * apply_returns(). --- 19 unchanged lines hidden --- | 363 364/* 365 * This function name is magical and is used by -mfunction-return=thunk-extern 366 * for the compiler to generate JMPs to it. 367 * 368 * This code is only used during kernel boot or module init. All 369 * 'JMP __x86_return_thunk' sites are changed to something else by 370 * apply_returns(). --- 19 unchanged lines hidden --- |