kernel/trace/undefsyms_base.c
Source file repositories/reference/linux-study-clean/kernel/trace/undefsyms_base.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/trace/undefsyms_base.c- Extension
.c- Size
- 757 bytes
- Lines
- 29
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
Dependency Surface
linux/atomic.hlinux/string.hasm/page.h
Detected Declarations
function undefsyms_base
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* simple_ring_buffer is used by the pKVM hypervisor which does not have access
* to all kernel symbols. Whatever is undefined when compiling this file is
* compiler and tooling-generated symbols that can safely be ignored for
* simple_ring_buffer.
*/
#include <linux/atomic.h>
#include <linux/string.h>
#include <asm/page.h>
void undefsyms_base(void *p, int n);
static char page[PAGE_SIZE] __aligned(PAGE_SIZE);
void undefsyms_base(void *p, int n)
{
char buffer[256] = { 0 };
u32 u = 0;
memset((char * volatile)page, 8, PAGE_SIZE);
memset((char * volatile)buffer, 8, sizeof(buffer));
memcpy((void * volatile)p, buffer, sizeof(buffer));
cmpxchg((u32 * volatile)&u, 0, 8);
WARN_ON(n == 0xdeadbeef);
}
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/string.h`, `asm/page.h`.
- Detected declarations: `function undefsyms_base`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: source implementation candidate.
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.