Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-08 Thread Eric W. Biederman
Jessie Frazelle writes: > Thanks for patching this :) Guess I will find a different rabbit in a > hat to detect if running in a pid namespace ;) I want to say that stating the /proc/pid/ns/pid files ought to be an easy way. But thinking about it they permissions on those

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-08 Thread Eric W. Biederman
Jessie Frazelle writes: > Thanks for patching this :) Guess I will find a different rabbit in a > hat to detect if running in a pid namespace ;) I want to say that stating the /proc/pid/ns/pid files ought to be an easy way. But thinking about it they permissions on those might be a bit tricky.

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-07 Thread Jessie Frazelle
Thanks for patching this :) Guess I will find a different rabbit in a hat to detect if running in a pid namespace ;) On Mon, Aug 7, 2017 at 4:44 AM, Peter Zijlstra wrote: > On Sun, Aug 06, 2017 at 02:41:41PM +1000, Aleksa Sarai wrote: >> It appears as though the addition of

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-07 Thread Jessie Frazelle
Thanks for patching this :) Guess I will find a different rabbit in a hat to detect if running in a pid namespace ;) On Mon, Aug 7, 2017 at 4:44 AM, Peter Zijlstra wrote: > On Sun, Aug 06, 2017 at 02:41:41PM +1000, Aleksa Sarai wrote: >> It appears as though the addition of the PID namespace did

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-07 Thread Peter Zijlstra
On Sun, Aug 06, 2017 at 02:41:41PM +1000, Aleksa Sarai wrote: > It appears as though the addition of the PID namespace did not update > the output code for /proc/*/sched, which resulted in it providing PIDs > that were not self-consistent with the /proc mount. This additionally > made it trivial

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-07 Thread Peter Zijlstra
On Sun, Aug 06, 2017 at 02:41:41PM +1000, Aleksa Sarai wrote: > It appears as though the addition of the PID namespace did not update > the output code for /proc/*/sched, which resulted in it providing PIDs > that were not self-consistent with the /proc mount. This additionally > made it trivial

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-06 Thread Eric W. Biederman
Aleksa Sarai writes: > It appears as though the addition of the PID namespace did not update > the output code for /proc/*/sched, which resulted in it providing PIDs > that were not self-consistent with the /proc mount. This additionally > made it trivial to detect whether a

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-06 Thread Eric W. Biederman
Aleksa Sarai writes: > It appears as though the addition of the PID namespace did not update > the output code for /proc/*/sched, which resulted in it providing PIDs > that were not self-consistent with the /proc mount. This additionally > made it trivial to detect whether a process was inside

[PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-05 Thread Aleksa Sarai
It appears as though the addition of the PID namespace did not update the output code for /proc/*/sched, which resulted in it providing PIDs that were not self-consistent with the /proc mount. This additionally made it trivial to detect whether a process was inside _pid_ns from userspace (making

[PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-05 Thread Aleksa Sarai
It appears as though the addition of the PID namespace did not update the output code for /proc/*/sched, which resulted in it providing PIDs that were not self-consistent with the /proc mount. This additionally made it trivial to detect whether a process was inside _pid_ns from userspace (making