1 // SPDX-License-Identifier: GPL-2.0-or-later
6 void setup_kuap(bool disabled)
9 update_user_segments(mfsr(0) | SR_KS);
10 isync(); /* Context sync required after mtsr() */
11 init_mm.context.sr0 |= SR_KS;
12 current->thread.sr0 |= SR_KS;
15 if (smp_processor_id() != boot_cpuid)
19 cur_cpu_spec->mmu_features &= ~MMU_FTR_KUAP;
21 pr_info("Activating Kernel Userspace Access Protection\n");