retpoline.S (1260ed77798502de9c98020040d2995008de10cc) | retpoline.S (8754e67ad4ac692c67ff1f99c0d07156f04ae40c) |
---|---|
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> --- 353 unchanged lines hidden (view full) --- 362 363 ANNOTATE_UNRET_SAFE 364 ret 365 int3 366SYM_FUNC_END(call_depth_return_thunk) 367 368#endif /* CONFIG_MITIGATION_CALL_DEPTH_TRACKING */ 369 | 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> --- 353 unchanged lines hidden (view full) --- 362 363 ANNOTATE_UNRET_SAFE 364 ret 365 int3 366SYM_FUNC_END(call_depth_return_thunk) 367 368#endif /* CONFIG_MITIGATION_CALL_DEPTH_TRACKING */ 369 |
370#ifdef CONFIG_MITIGATION_ITS 371 372.macro ITS_THUNK reg 373 374SYM_INNER_LABEL(__x86_indirect_its_thunk_\reg, SYM_L_GLOBAL) 375 UNWIND_HINT_UNDEFINED 376 ANNOTATE_NOENDBR 377 ANNOTATE_RETPOLINE_SAFE 378 jmp *%\reg 379 int3 380 .align 32, 0xcc /* fill to the end of the line */ 381 .skip 32, 0xcc /* skip to the next upper half */ 382.endm 383 384/* ITS mitigation requires thunks be aligned to upper half of cacheline */ 385.align 64, 0xcc 386.skip 32, 0xcc 387SYM_CODE_START(__x86_indirect_its_thunk_array) 388 389#define GEN(reg) ITS_THUNK reg 390#include <asm/GEN-for-each-reg.h> 391#undef GEN 392 393 .align 64, 0xcc 394SYM_CODE_END(__x86_indirect_its_thunk_array) 395 396#endif 397 |
|
370/* 371 * This function name is magical and is used by -mfunction-return=thunk-extern 372 * for the compiler to generate JMPs to it. 373 * 374 * This code is only used during kernel boot or module init. All 375 * 'JMP __x86_return_thunk' sites are changed to something else by 376 * apply_returns(). 377 * --- 22 unchanged lines hidden --- | 398/* 399 * This function name is magical and is used by -mfunction-return=thunk-extern 400 * for the compiler to generate JMPs to it. 401 * 402 * This code is only used during kernel boot or module init. All 403 * 'JMP __x86_return_thunk' sites are changed to something else by 404 * apply_returns(). 405 * --- 22 unchanged lines hidden --- |