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
* Rename pgid to vpgid to reflect it's in-namespace
#1044 added tracking of a process's
process group id (pgid). However, this change didn't compeltely handle
process group ids in a namespace. When reading process information from
/proc, it was using the process group id from the global namespace. When
tracking execve()s and setpgid()s it would take the pgid from the
namespace of the calling process.
To fix this, define the pgid to be the pgid from its current pid
namespace. And to make this clear, rename it to vpgid everywhere.
This commit handles renaming the variable at the scap/sinsp
levels. Other changes will fix setpgid() handling to handle cases when
it's called in a pid namespace.
* Rename the proc.pgid filtercheck to proc.vpgid
This reflects its real meaning (from the namespace)
* Removing event parsing for setpgid
This means that if a setpgid occurs, the pgid of the process won't be
in-sync again until the next execve(), where the process's pgid is
returned by the driver in the exit event. However, we expect that this
will cover most cases, and is dramatically simpler.
* Fix logic for setting vpgid
Comment was right, but test was backwards.
{PT_INT32, EPF_NONE, PF_ID, "proc.tty", "The controlling terminal of the process. 0 for processes without a terminal."},
1354
1354
{PT_CHARBUF, EPF_NONE, PF_NA, "proc.exepath", "The full executable path of the process."},
1355
1355
{PT_CHARBUF, EPF_TABLE_ONLY, PF_NA, "thread.nametid", "this field chains the process name and tid of a thread and can be used as a specific identifier of a thread for a specific execve."},
1356
-
{PT_INT64, EPF_NONE, PF_ID, "proc.pgid", "the process group id of the process generating the event."},
1356
+
{PT_INT64, EPF_NONE, PF_ID, "proc.vpgid", "the process group id of the process generating the event, as seen from its current PID namespace."},
0 commit comments