diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index f53d2de118e5..45ddf4268b17 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -297,3 +297,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_gpio_cd_irqt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_save_vmalloc_stack); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_stack_hash); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_save_track_hash); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_task_comm); diff --git a/fs/exec.c b/fs/exec.c index cc08a3bd566d..4b3ac651b027 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -73,6 +73,7 @@ #include "internal.h" #include +#include static int bprm_creds_from_file(struct linux_binprm *bprm); @@ -1227,6 +1228,7 @@ void __set_task_comm(struct task_struct *tsk, const char *buf, bool exec) strlcpy(tsk->comm, buf, sizeof(tsk->comm)); task_unlock(tsk); perf_event_comm(tsk, exec); + trace_android_vh_set_task_comm(tsk); } /* diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index bd044ce0d19c..6a97a7907f03 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -362,6 +362,10 @@ DECLARE_HOOK(android_vh_dup_task_struct, TP_PROTO(struct task_struct *tsk, struct task_struct *orig), TP_ARGS(tsk, orig)); +DECLARE_HOOK(android_vh_set_task_comm, + TP_PROTO(struct task_struct *p), + TP_ARGS(p)); + /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_SCHED_H */