arch/um/kernel/asm-offsets.c
Source file repositories/reference/linux-study-clean/arch/um/kernel/asm-offsets.c
File Facts
- System
- Linux kernel
- Corpus path
arch/um/kernel/asm-offsets.c- Extension
.c- Size
- 1358 bytes
- Lines
- 50
- Domain
- Architecture Layer
- Bucket
- arch/um
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/stddef.hlinux/sched.hlinux/elf.hlinux/crypto.hlinux/kbuild.hlinux/audit.hlinux/fs.hasm/mman.hasm/seccomp.hasm/extable.h
Detected Declarations
function foo
Annotated Snippet
#define COMPILE_OFFSETS
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/elf.h>
#include <linux/crypto.h>
#include <linux/kbuild.h>
#include <linux/audit.h>
#include <linux/fs.h>
#include <asm/mman.h>
#include <asm/seccomp.h>
#include <asm/extable.h>
/* workaround for a warning with -Wmissing-prototypes */
void foo(void);
void foo(void)
{
DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE);
DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK);
DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT);
DEFINE(UM_GFP_KERNEL, GFP_KERNEL);
DEFINE(UM_GFP_ATOMIC, GFP_ATOMIC);
DEFINE(UM_THREAD_SIZE, THREAD_SIZE);
DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC);
DEFINE(UM_KERN_GDT_ENTRY_TLS_ENTRIES, GDT_ENTRY_TLS_ENTRIES);
DEFINE(UM_SECCOMP_ARCH_NATIVE, SECCOMP_ARCH_NATIVE);
DEFINE(HOSTFS_ATTR_MODE, ATTR_MODE);
DEFINE(HOSTFS_ATTR_UID, ATTR_UID);
DEFINE(HOSTFS_ATTR_GID, ATTR_GID);
DEFINE(HOSTFS_ATTR_SIZE, ATTR_SIZE);
DEFINE(HOSTFS_ATTR_ATIME, ATTR_ATIME);
DEFINE(HOSTFS_ATTR_MTIME, ATTR_MTIME);
DEFINE(HOSTFS_ATTR_CTIME, ATTR_CTIME);
DEFINE(HOSTFS_ATTR_ATIME_SET, ATTR_ATIME_SET);
DEFINE(HOSTFS_ATTR_MTIME_SET, ATTR_MTIME_SET);
DEFINE(ALT_INSTR_SIZE, sizeof(struct alt_instr));
DEFINE(EXTABLE_SIZE, sizeof(struct exception_table_entry));
}
Annotation
- Immediate include surface: `linux/stddef.h`, `linux/sched.h`, `linux/elf.h`, `linux/crypto.h`, `linux/kbuild.h`, `linux/audit.h`, `linux/fs.h`, `asm/mman.h`.
- Detected declarations: `function foo`.
- Atlas domain: Architecture Layer / arch/um.
- 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.