1 // SPDX-License-Identifier: GPL-2.0-or-later 2 3 #include <asm/kup.h> 4 #include <asm/smp.h> 5 6 struct static_key_false disable_kuep_key; 7 setup_kuep(bool disabled)8void setup_kuep(bool disabled) 9 { 10 if (!disabled) 11 kuep_lock(); 12 13 if (smp_processor_id() != boot_cpuid) 14 return; 15 16 if (disabled) 17 static_branch_enable(&disable_kuep_key); 18 else 19 pr_info("Activating Kernel Userspace Execution Prevention\n"); 20 } 21