blob: 5533ed92ab3de4e379add986426c22b79e723195 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// SPDX-License-Identifier: GPL-2.0-or-later
#include <asm/kup.h>
#include <asm/smp.h>
void __init setup_kuap(bool disabled)
{
kuap_update_sr(mfsr(0) | SR_KS, 0, TASK_SIZE);
if (smp_processor_id() != boot_cpuid)
return;
pr_info("Activating Kernel Userspace Access Protection\n");
if (disabled)
pr_warn("KUAP cannot be disabled yet on 6xx when compiled in\n");
}
|