Simplify 'do_exit' hook

We don't need to do such verification here. Process is dying anyway so the impact of verification is low.
This commit is contained in:
Adam_pi3 2020-12-10 01:38:12 -05:00
parent b175832dba
commit 47d6aca4d4
No known key found for this signature in database
GPG key ID: 7C0A38B52323F571

View file

@ -36,7 +36,6 @@ static struct kretprobe p_do_exit_kretprobe = {
int p_do_exit_entry(struct kretprobe_instance *p_ri, struct pt_regs *p_regs) {
struct p_ed_process *p_tmp;
unsigned long p_flags;
p_debug_kprobe_log(
@ -45,12 +44,6 @@ int p_do_exit_entry(struct kretprobe_instance *p_ri, struct pt_regs *p_regs) {
// p_ed_enforce_validation();
p_tasks_write_lock(&p_flags);
if ( (p_tmp = p_find_ed_by_pid(task_pid_nr(current))) != NULL) {
// This process is on the ED list - validate 'off' flag
p_ed_is_off_off_wrap(p_tmp);
}
if (p_remove_task_pid_f(task_pid_nr(current))) {
;// DEBUG: p_print_log(P_LKRG_CRIT, "Can't remove ED pid (is not on the list) => %d [%s]\n",task_pid_nr(current),current->comm);
}