title: Getting a user ID and a process group ID from a task_struct and a pid_namespace
body: <p>I'm trying to modify Linux kernel and I need to get the user ID and the process group ID from a <code>task_struct</code> and a <code>pid_namespace</code>. Although I searched their definitions in the source code, I couldn't find any global variables or functions (maybe I am missing because of the lack of the comments in codes) to access them. </p>
  
  <p>Is there a method to get those inside the kernel space since I can not use user-space functions like <code>getuid()</code>, etc.?</p>