Refactoring KPM support to check KPM status using CMD_ENABLE_KPM
This commit is contained in:
@@ -425,6 +425,18 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (arg2 == CMD_ENABLE_KPM) {
|
||||
#ifdef CONFIG_KPM
|
||||
bool KPM_Enabled = true;
|
||||
#else
|
||||
bool KPM_Enabled = false;
|
||||
#endif
|
||||
if (copy_to_user((void __user *)arg3, &KPM_Enabled, sizeof(KPM_Enabled))) {
|
||||
pr_info("KPM: copy_to_user() failed\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// all other cmds are for 'root manager'
|
||||
if (!from_manager) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user