arch/um/kernel/skas/mmu.c
Source file repositories/reference/linux-study-clean/arch/um/kernel/skas/mmu.c
File Facts
- System
- Linux kernel
- Corpus path
arch/um/kernel/skas/mmu.c- Extension
.c- Size
- 3845 bytes
- Lines
- 166
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mm.hlinux/sched/signal.hlinux/slab.hshared/irq_kern.hasm/pgalloc.hasm/sections.hasm/mmu_context.has-layout.hos.hskas.hstub-data.h
Detected Declarations
function enter_turnstilefunction exit_turnstilefunction init_new_contextfunction scoped_guardfunction destroy_contextfunction mm_sigchld_irqfunction init_child_tracking
Annotated Snippet
list_for_each_entry(mm_context, &mm_list, list) {
if (mm_context->id.pid == pid) {
struct stub_data *stub_data;
printk("Unexpectedly lost MM child! Affected tasks will segfault.");
/* Marks the MM as dead */
mm_context->id.pid = -1;
stub_data = (void *)mm_context->id.stack;
stub_data->futex = FUTEX_IN_KERN;
#if IS_ENABLED(CONFIG_SMP)
os_futex_wake(&stub_data->futex);
#endif
/*
* NOTE: Currently executing syscalls by
* affected tasks may finish normally.
*/
break;
}
}
}
return IRQ_HANDLED;
}
static int __init init_child_tracking(void)
{
int err;
spin_lock_init(&mm_list_lock);
INIT_LIST_HEAD(&mm_list);
err = request_irq(SIGCHLD_IRQ, mm_sigchld_irq, 0, "SIGCHLD", NULL);
if (err < 0)
panic("Failed to register SIGCHLD IRQ: %d", err);
return 0;
}
early_initcall(init_child_tracking)
Annotation
- Immediate include surface: `linux/mm.h`, `linux/sched/signal.h`, `linux/slab.h`, `shared/irq_kern.h`, `asm/pgalloc.h`, `asm/sections.h`, `asm/mmu_context.h`, `as-layout.h`.
- Detected declarations: `function enter_turnstile`, `function exit_turnstile`, `function init_new_context`, `function scoped_guard`, `function destroy_context`, `function mm_sigchld_irq`, `function init_child_tracking`.
- Atlas domain: Architecture Layer / arch/um.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.