|
@@ -375,7 +375,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
|
|
static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
|
|
static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
|
|
struct pid *pid, struct task_struct *task, int whole)
|
|
struct pid *pid, struct task_struct *task, int whole)
|
|
{
|
|
{
|
|
- unsigned long vsize, eip, esp, wchan = ~0UL;
|
|
|
|
|
|
+ unsigned long vsize, eip, esp, wchan = 0;
|
|
int priority, nice;
|
|
int priority, nice;
|
|
int tty_pgrp = -1, tty_nr = 0;
|
|
int tty_pgrp = -1, tty_nr = 0;
|
|
sigset_t sigign, sigcatch;
|
|
sigset_t sigign, sigcatch;
|
|
@@ -507,7 +507,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
|
|
seq_put_decimal_ull(m, ' ', task->blocked.sig[0] & 0x7fffffffUL);
|
|
seq_put_decimal_ull(m, ' ', task->blocked.sig[0] & 0x7fffffffUL);
|
|
seq_put_decimal_ull(m, ' ', sigign.sig[0] & 0x7fffffffUL);
|
|
seq_put_decimal_ull(m, ' ', sigign.sig[0] & 0x7fffffffUL);
|
|
seq_put_decimal_ull(m, ' ', sigcatch.sig[0] & 0x7fffffffUL);
|
|
seq_put_decimal_ull(m, ' ', sigcatch.sig[0] & 0x7fffffffUL);
|
|
- seq_put_decimal_ull(m, ' ', wchan);
|
|
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * We used to output the absolute kernel address, but that's an
|
|
|
|
+ * information leak - so instead we show a 0/1 flag here, to signal
|
|
|
|
+ * to user-space whether there's a wchan field in /proc/PID/wchan.
|
|
|
|
+ *
|
|
|
|
+ * This works with older implementations of procps as well.
|
|
|
|
+ */
|
|
|
|
+ if (wchan)
|
|
|
|
+ seq_puts(m, " 1");
|
|
|
|
+ else
|
|
|
|
+ seq_puts(m, " 0");
|
|
|
|
+
|
|
seq_put_decimal_ull(m, ' ', 0);
|
|
seq_put_decimal_ull(m, ' ', 0);
|
|
seq_put_decimal_ull(m, ' ', 0);
|
|
seq_put_decimal_ull(m, ' ', 0);
|
|
seq_put_decimal_ll(m, ' ', task->exit_signal);
|
|
seq_put_decimal_ll(m, ' ', task->exit_signal);
|