tools/testing/vma/include/stubs.h
Source file repositories/reference/linux-study-clean/tools/testing/vma/include/stubs.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/vma/include/stubs.h- Extension
.h- Size
- 8086 bytes
- Lines
- 436
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct mm_structstruct vm_area_structstruct vm_area_descstruct pagetable_move_controlstruct mmap_actionstruct filestruct anon_vmastruct anon_vma_chainstruct address_spacestruct unmap_descstruct vm_userfaultfd_ctxstruct mempolicystruct mmu_gatherstruct mutexstruct vm_faultfunction userfaultfd_unmap_completefunction free_pgd_rangefunction ksm_exitfunction mmap_action_completefunction fixup_hugetlb_reservationsfunction ksm_vma_flagsfunction remap_pfn_range_preparefunction do_munmapfunction mmap_assert_lockedfunction mmap_write_downgradefunction can_modify_mmfunction arch_unmapfunction khugepaged_enter_vmafunction is_vm_hugetlb_pagefunction vma_soft_dirty_enabledfunction userfaultfd_wpfunction mmap_assert_write_lockedfunction signal_pendingfunction is_file_hugepagesfunction security_vm_enough_memory_mmfunction may_expand_vmfunction shmem_zero_setupfunction vm_acct_memoryfunction arch_validate_flagsfunction vma_closefunction is_hugepage_only_rangefunction capablefunction is_mergeable_vm_userfaultfd_ctxfunction anon_vma_name_eqfunction might_sleepfunction vma_dup_policyfunction vma_adjust_trans_huge
Annotated Snippet
struct vm_userfaultfd_ctx {};
struct mempolicy {};
struct mmu_gather {};
struct mutex {};
struct vm_fault {};
static inline void userfaultfd_unmap_complete(struct mm_struct *mm,
struct list_head *uf)
{
}
static inline unsigned long move_page_tables(struct pagetable_move_control *pmc)
{
return 0;
}
static inline void free_pgd_range(struct mmu_gather *tlb,
unsigned long addr, unsigned long end,
unsigned long floor, unsigned long ceiling)
{
}
static inline int ksm_execve(struct mm_struct *mm)
{
return 0;
}
static inline void ksm_exit(struct mm_struct *mm)
{
}
static inline void vma_numab_state_init(struct vm_area_struct *vma)
{
}
static inline void vma_numab_state_free(struct vm_area_struct *vma)
{
}
static inline void dup_anon_vma_name(struct vm_area_struct *orig_vma,
struct vm_area_struct *new_vma)
{
}
static inline void free_anon_vma_name(struct vm_area_struct *vma)
{
}
static inline int mmap_action_prepare(struct vm_area_desc *desc)
{
return 0;
}
static inline int mmap_action_complete(struct vm_area_struct *vma,
struct mmap_action *action,
bool is_compat)
{
return 0;
}
static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
{
}
static inline bool shmem_file(struct file *file)
{
return false;
}
static inline vma_flags_t ksm_vma_flags(struct mm_struct *mm,
const struct file *file, vma_flags_t vma_flags)
{
return vma_flags;
}
static inline void remap_pfn_range_prepare(struct vm_area_desc *desc, unsigned long pfn)
{
}
static inline int remap_pfn_range_complete(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t pgprot)
{
return 0;
}
static inline int do_munmap(struct mm_struct *, unsigned long, size_t,
struct list_head *uf)
{
return 0;
}
Annotation
- Detected declarations: `struct mm_struct`, `struct vm_area_struct`, `struct vm_area_desc`, `struct pagetable_move_control`, `struct mmap_action`, `struct file`, `struct anon_vma`, `struct anon_vma_chain`, `struct address_space`, `struct unmap_desc`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.