arch/powerpc/mm/book3s32/kuap.c
Source file repositories/reference/linux-study-clean/arch/powerpc/mm/book3s32/kuap.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/mm/book3s32/kuap.c- Extension
.c- Size
- 490 bytes
- Lines
- 23
- 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
asm/kup.hasm/smp.h
Detected Declarations
function setup_kuap
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
#include <asm/kup.h>
#include <asm/smp.h>
void setup_kuap(bool disabled)
{
if (!disabled) {
update_user_segments(mfsr(0) | SR_KS);
isync(); /* Context sync required after mtsr() */
init_mm.context.sr0 |= SR_KS;
current->thread.sr0 |= SR_KS;
}
if (smp_processor_id() != boot_cpuid)
return;
if (disabled)
cur_cpu_spec->mmu_features &= ~MMU_FTR_KUAP;
else
pr_info("Activating Kernel Userspace Access Protection\n");
}
Annotation
- Immediate include surface: `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.