arch/x86/lib/bhi.S
Source file repositories/reference/linux-study-clean/arch/x86/lib/bhi.S
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/lib/bhi.S- Extension
.S- Size
- 2596 bytes
- Lines
- 148
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: arch/x86
- Status
- atlas-only
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/linkage.hasm/unwind_hints.hasm/nospec-branch.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/linkage.h>
#include <asm/unwind_hints.h>
#include <asm/nospec-branch.h>
/*
* Notably, the FineIBT preamble calling these will have ZF set and eax zero.
*
* The very last element is in fact larger than 32 bytes, but since its the
* last element, this does not matter,
*
* There are 2 #UD sites, located between 0,1-2,3 and 4,5-6,7 such that they
* can be reached using Jcc.d8, these elements (1 and 5) have sufficiently
* big alignment holes for this to not stagger the array.
*/
.pushsection .noinstr.text, "ax"
.align 32
SYM_CODE_START(__bhi_args)
#ifdef CONFIG_FINEIBT_BHI
.align 32
SYM_INNER_LABEL(__bhi_args_0, SYM_L_LOCAL)
ANNOTATE_NOENDBR
UNWIND_HINT_FUNC
jne .Lud_1
ANNOTATE_UNRET_SAFE
ret
int3
.align 32
SYM_INNER_LABEL(__bhi_args_1, SYM_L_LOCAL)
ANNOTATE_NOENDBR
UNWIND_HINT_FUNC
jne .Lud_1
cmovne %rax, %rdi
ANNOTATE_UNRET_SAFE
ret
int3
.align 8
ANNOTATE_REACHABLE
.Lud_1: ud2
ANNOTATE_UNRET_SAFE
ret
int3
.align 32
SYM_INNER_LABEL(__bhi_args_2, SYM_L_LOCAL)
ANNOTATE_NOENDBR
UNWIND_HINT_FUNC
jne .Lud_1
cmovne %rax, %rdi
cmovne %rax, %rsi
ANNOTATE_UNRET_SAFE
ret
int3
.align 32
SYM_INNER_LABEL(__bhi_args_3, SYM_L_LOCAL)
ANNOTATE_NOENDBR
UNWIND_HINT_FUNC
jne .Lud_1
cmovne %rax, %rdi
cmovne %rax, %rsi
cmovne %rax, %rdx
ANNOTATE_UNRET_SAFE
ret
int3
Annotation
- Immediate include surface: `linux/linkage.h`, `asm/unwind_hints.h`, `asm/nospec-branch.h`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.