arch/powerpc/mm/nohash/kup.c
Source file repositories/reference/linux-study-clean/arch/powerpc/mm/nohash/kup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/mm/nohash/kup.c- Extension
.c- Size
- 561 bytes
- Lines
- 28
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
Dependency Surface
linux/export.hlinux/init.hlinux/printk.hlinux/smp.hasm/kup.hasm/smp.h
Detected Declarations
function setup_kuap
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* This file contains the routines for initializing kernel userspace protection
*/
#include <linux/export.h>
#include <linux/init.h>
#include <linux/printk.h>
#include <linux/smp.h>
#include <asm/kup.h>
#include <asm/smp.h>
#ifdef CONFIG_PPC_KUAP
void setup_kuap(bool disabled)
{
if (disabled) {
if (smp_processor_id() == boot_cpuid)
cur_cpu_spec->mmu_features &= ~MMU_FTR_KUAP;
return;
}
pr_info("Activating Kernel Userspace Access Protection\n");
prevent_user_access(KUAP_READ_WRITE);
}
#endif
Annotation
- Immediate include surface: `linux/export.h`, `linux/init.h`, `linux/printk.h`, `linux/smp.h`, `asm/kup.h`, `asm/smp.h`.
- Detected declarations: `function setup_kuap`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.