Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-23 Thread Richard Guy Briggs
On 13/12/17, Peter Zijlstra wrote: On Mon, Dec 16, 2013 at 05:20:51PM -0500, Richard Guy Briggs wrote: static inline bool is_idle_task(const struct task_struct *p) { - return p-pid == 0; + return task_pid(p) == init_struct_pid; } I'll stick with task_pid_nr(p) == 0.

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-17 Thread Peter Zijlstra
On Mon, Dec 16, 2013 at 05:20:51PM -0500, Richard Guy Briggs wrote: static inline bool is_idle_task(const struct task_struct *p) { -return p-pid == 0; +return task_pid(p) == init_struct_pid; } I'll stick with task_pid_nr(p) == 0. We're going to probably switch to:

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-17 Thread Peter Zijlstra
On Tue, Dec 17, 2013 at 10:34:42AM +0100, Peter Zijlstra wrote: On Mon, Dec 16, 2013 at 05:20:51PM -0500, Richard Guy Briggs wrote: static inline bool is_idle_task(const struct task_struct *p) { - return p-pid == 0; + return task_pid(p) == init_struct_pid; } I'll stick

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-17 Thread Oleg Nesterov
Hi Richard, Sorry, I already forgot the context, not sure I understand your email correctly. On 12/16, Richard Guy Briggs wrote: On 13/08/26, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 09:08:48PM +0200, Oleg Nesterov wrote: On 08/20, Richard Guy Briggs wrote: static inline

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-16 Thread Richard Guy Briggs
On 13/08/26, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 09:08:48PM +0200, Oleg Nesterov wrote: On 08/20, Richard Guy Briggs wrote: static inline int is_global_init(struct task_struct *tsk) { - return tsk-pid == 1; + return task_pid_nr(tsk) == 1; } Probably it

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-12-16 Thread Richard Guy Briggs
On 13/12/16, Oleg Nesterov wrote: Hi Richard, Sorry, I already forgot the context, not sure I understand your email correctly. On 12/16, Richard Guy Briggs wrote: On 13/08/26, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 09:08:48PM +0200, Oleg Nesterov wrote: On 08/20,

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-09-15 Thread Oleg Nesterov
On 09/13, Steve Grubb wrote: On Sunday, September 08, 2013 05:54:35 PM Oleg Nesterov wrote: Then why audit_alloc() doesn't set TIF_SYSCALL_AUDIT unconditionally? The code I'm looking at does right at the end of the function. The code I'm looking at does right at the end too ;) but it also

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-09-13 Thread Steve Grubb
On Sunday, September 08, 2013 05:54:35 PM Oleg Nesterov wrote: Sorry for delay, vacation. First of all, I do not pretend I understand this code. This was mostly the question, and in fact I mostly asked about audit_bprm() in 0/1. However, On 08/30, Steve Grubb wrote: On Friday, August

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-09-13 Thread Steve Grubb
On Tuesday, September 10, 2013 07:20:33 PM Oleg Nesterov wrote: On 09/08, Oleg Nesterov wrote: First of all, I do not pretend I understand this code. This was mostly the question, and in fact I mostly asked about audit_bprm() in 0/1. However, On 08/30, Steve Grubb wrote: On

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-09-10 Thread Oleg Nesterov
Sorry for delay, vacation. First of all, I do not pretend I understand this code. This was mostly the question, and in fact I mostly asked about audit_bprm() in 0/1. However, On 08/30, Steve Grubb wrote: On Friday, August 30, 2013 03:06:46 PM Richard Guy Briggs wrote: On Tue, Aug 27, 2013 at

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-09-10 Thread Oleg Nesterov
On 09/08, Oleg Nesterov wrote: First of all, I do not pretend I understand this code. This was mostly the question, and in fact I mostly asked about audit_bprm() in 0/1. However, On 08/30, Steve Grubb wrote: On Friday, August 30, 2013 03:06:46 PM Richard Guy Briggs wrote: On Tue, Aug

Re: audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-08-30 Thread Steve Grubb
On Friday, August 30, 2013 03:06:46 PM Richard Guy Briggs wrote: On Tue, Aug 27, 2013 at 07:11:34PM +0200, Oleg Nesterov wrote: Btw. audit looks unmaintained... if you are going to take care of this code, perhaps you can look at http://marc.info/?l=linux-kernelm=137589907108485

audit looks unmaintained? [was: Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid]

2013-08-30 Thread Richard Guy Briggs
On Tue, Aug 27, 2013 at 07:11:34PM +0200, Oleg Nesterov wrote: Btw. audit looks unmaintained... if you are going to take care of this code, perhaps you can look at http://marc.info/?l=linux-kernelm=137589907108485 http://marc.info/?l=linux-kernelm=137590271809664 (I don't want

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-28 Thread Eric W. Biederman
Peter Zijlstra pet...@infradead.org writes: On Mon, Aug 26, 2013 at 10:37:22PM -0400, Richard Guy Briggs wrote: On Fri, Aug 23, 2013 at 08:36:21AM +0200, Peter Zijlstra wrote: Except that's not the case, with namespaces there's a clear hierarchy and the task_struct::pid is the one true

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-28 Thread Oleg Nesterov
On 08/26, Richard Guy Briggs wrote: On Fri, Aug 23, 2013 at 09:28:07PM +0200, Oleg Nesterov wrote: Or 3/12. That is a cleanup to make clear what parts are actually pid-related and what isn't. You know, I decided to send another email about this patch. This cleanup doesn't look even

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-27 Thread Peter Zijlstra
On Mon, Aug 26, 2013 at 10:37:22PM -0400, Richard Guy Briggs wrote: On Fri, Aug 23, 2013 at 08:36:21AM +0200, Peter Zijlstra wrote: Except that's not the case, with namespaces there's a clear hierarchy and the task_struct::pid is the one true value aka. root namespace. Peter, I agonized

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-26 Thread Oleg Nesterov
On 08/22, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: Why would you ever want to do this? It just makes these tests more expensive for no gain what so ff'ing ever. Backups are generally considered a good idea, but in this case, I'd quote:

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-26 Thread Richard Guy Briggs
On Fri, Aug 23, 2013 at 08:36:21AM +0200, Peter Zijlstra wrote: On Thu, Aug 22, 2013 at 05:43:47PM -0400, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: This stops these four

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-26 Thread Richard Guy Briggs
On Fri, Aug 23, 2013 at 09:28:07PM +0200, Oleg Nesterov wrote: On 08/22, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: Why would you ever want to do this? It just makes these tests more expensive for no gain what so ff'ing ever. Backups

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-23 Thread Peter Zijlstra
On Thu, Aug 22, 2013 at 05:43:47PM -0400, Richard Guy Briggs wrote: On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: This stops these four task helper functions from using the deprecated and error-prone

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-22 Thread Oleg Nesterov
On 08/20, Richard Guy Briggs wrote: static inline int is_global_init(struct task_struct *tsk) { - return tsk-pid == 1; + return task_pid_nr(tsk) == 1; } Probably it would be better to simply kill it. Almost every usage is wrong. static inline bool is_idle_task(const struct

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-22 Thread Peter Zijlstra
On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: This stops these four task helper functions from using the deprecated and error-prone task-pid and task-tgid. (informed by ebiederman's ea5a4d01) Cc: Eric W. Biederman ebied...@xmission.com Signed-off-by: Richard Guy Briggs

Re: [PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-22 Thread Richard Guy Briggs
On Thu, Aug 22, 2013 at 10:05:55PM +0200, Peter Zijlstra wrote: On Tue, Aug 20, 2013 at 05:32:03PM -0400, Richard Guy Briggs wrote: This stops these four task helper functions from using the deprecated and error-prone task-pid and task-tgid. (informed by ebiederman's ea5a4d01) Cc: Eric

[PATCH 11/12] pid: rewrite task helper functions avoiding task-pid and task-tgid

2013-08-21 Thread Richard Guy Briggs
This stops these four task helper functions from using the deprecated and error-prone task-pid and task-tgid. (informed by ebiederman's ea5a4d01) Cc: Eric W. Biederman ebied...@xmission.com Signed-off-by: Richard Guy Briggs r...@redhat.com --- include/linux/sched.h |8 1 files