You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this LWN article: https://lwn.net/Articles/999770/, if a program is started using fexecve, which takes a file descriptor instead of a filename, then /proc/$PID/comm contains the file descriptor number instead of the name of the program.
Having something like "5" as a name for a program in the trace instead of the actual name of the program, sounds not very helpful.
The right(tm) way, according to Torvalds in the discussion mentioned in the article, is to use argv[0] from /proc/$PID/cmdline instead.
As whats in argv[0] differs from what we currently (somewhat wrongly) assume to be in /proc/$PID/comm, this is not a drop-in replacement.
This might also affect the comm field in the PERF_RECORD_MISC_COMM_EXEC events that we get from perf.
The text was updated successfully, but these errors were encountered:
According to this LWN article: https://lwn.net/Articles/999770/, if a program is started using
fexecve
, which takes a file descriptor instead of a filename, then /proc/$PID/comm contains the file descriptor number instead of the name of the program.Having something like "5" as a name for a program in the trace instead of the actual name of the program, sounds not very helpful.
The right(tm) way, according to Torvalds in the discussion mentioned in the article, is to use argv[0] from /proc/$PID/cmdline instead.
As whats in
argv[0]
differs from what we currently (somewhat wrongly) assume to be in/proc/$PID/comm
, this is not a drop-in replacement.This might also affect the
comm
field in thePERF_RECORD_MISC_COMM_EXEC
events that we get from perf.The text was updated successfully, but these errors were encountered: