1. 28 Apr, 2021 1 commit
    • Steven Rostedt (VMware)'s avatar
      tracing: Map all PIDs to command lines · 785e3c0a
      Steven Rostedt (VMware) authored
      The default max PID is set by PID_MAX_DEFAULT, and the tracing
      infrastructure uses this number to map PIDs to the comm names of the
      tasks, such output of the trace can show names from the recorded PIDs in
      the ring buffer. This mapping is also exported to user space via the
      "saved_cmdlines" file in the tracefs directory.
      
      But currently the mapping expects the PIDs to be less than
      PID_MAX_DEFAULT, which is the default maximum and not the real maximum.
      Recently, systemd will increases the maximum value of a PID on the system,
      and when tasks are traced that have a PID higher than PID_MAX_DEFAULT, its
      comm is not recorded. This leads to the entire trace to have "<...>" as
      the comm name, which is pretty useless.
      
      Instead, keep the array mapping the size of PID_MAX_DEFAULT, but instead
      of just mapping the index to the comm, map a mask of the PID
      (PID_MAX_DEFAULT - 1) to the comm, and find the full PID from the
      map_cmdline_to_pid array (that already exists).
      
      This bug goes back to the beginning of ftrace, but hasn't been an issue
      until user space started increasing the maximum value of PIDs.
      
      Link: https://lkml.kernel.org/r/20210427113207.3c601884@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Fixes: bc0c38d1 ("ftrace: latency tracer infrastructure")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      785e3c0a
  2. 15 Apr, 2021 7 commits
  3. 01 Apr, 2021 6 commits
  4. 30 Mar, 2021 1 commit
  5. 25 Mar, 2021 3 commits
  6. 23 Mar, 2021 1 commit
  7. 22 Mar, 2021 2 commits
  8. 18 Mar, 2021 14 commits
  9. 14 Mar, 2021 5 commits