|
@@ -62,6 +62,7 @@
|
|
#include <linux/mman.h>
|
|
#include <linux/mman.h>
|
|
#include <linux/sched/mm.h>
|
|
#include <linux/sched/mm.h>
|
|
#include <linux/sched/numa_balancing.h>
|
|
#include <linux/sched/numa_balancing.h>
|
|
|
|
+#include <linux/sched/task_stack.h>
|
|
#include <linux/sched/task.h>
|
|
#include <linux/sched/task.h>
|
|
#include <linux/sched/cputime.h>
|
|
#include <linux/sched/cputime.h>
|
|
#include <linux/proc_fs.h>
|
|
#include <linux/proc_fs.h>
|
|
@@ -421,7 +422,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
|
|
* esp and eip are intentionally zeroed out. There is no
|
|
* esp and eip are intentionally zeroed out. There is no
|
|
* non-racy way to read them without freezing the task.
|
|
* non-racy way to read them without freezing the task.
|
|
* Programs that need reliable values can use ptrace(2).
|
|
* Programs that need reliable values can use ptrace(2).
|
|
|
|
+ *
|
|
|
|
+ * The only exception is if the task is core dumping because
|
|
|
|
+ * a program is not able to use ptrace(2) in that case. It is
|
|
|
|
+ * safe because the task has stopped executing permanently.
|
|
*/
|
|
*/
|
|
|
|
+ if (permitted && (task->flags & PF_DUMPCORE)) {
|
|
|
|
+ eip = KSTK_EIP(task);
|
|
|
|
+ esp = KSTK_ESP(task);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
get_task_comm(tcomm, task);
|
|
get_task_comm(tcomm, task);
|