[PATCH v2] fs/proc: Don't expose absolute kernel addresses via wchan

From: Ingo Molnar
Date: Wed Sep 30 2015 - 09:59:36 EST



* Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> On Wed, 30 Sep 2015, Ingo Molnar wrote:
> > diff --git a/fs/proc/array.c b/fs/proc/array.c
> > index f60f0121e331..99082730b2ac 100644
> > --- a/fs/proc/array.c
> > +++ b/fs/proc/array.c
> > @@ -507,7 +507,7 @@ 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, ' ', sigign.sig[0] & 0x7fffffffUL);
> > seq_put_decimal_ull(m, ' ', sigcatch.sig[0] & 0x7fffffffUL);
> > - seq_put_decimal_ull(m, ' ', wchan);
> > + seq_puts(m, " 0"); /* Used to be numeric wchan - replaced by /proc/PID/wchan */
>
> That should get rid of all wchan usage in do_task_stat()

Indeed - updated patch attached.

Thanks,

Ingo

================================>