lkml.org 
[lkml]   [2012]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/9] exec: add a global execve counter
On 03/12, Djalal Harouni wrote:
>
> On Sun, Mar 11, 2012 at 06:25:12PM +0100, Oleg Nesterov wrote:
> >
> > Well, I don't think it is right to add this counter into task_struct.
> >
> > It should be per-process, signal_struct makes more sense. Or may be
> > mm_struct.
> Some /proc/<pid>/{syscall,stack,...} do not operate on mm_struct so why we
> should add the: "acquire a reference to mm, get exec_id and mmput".

This could be simpler, just read the counter under task_lock(). And
unless I misread the next patches syscall/stack can use current->mm
lockless.

OK, nevermind.

> For the signal_struct currently I don't know, from a comment it seems that
> signal_struct can be shared!

Yes, it is shared, and that is why it makes sense for the per-process
data. All threads in the thread group (process) have the same ->signal.
And unlike ->mm, ->signal survives after exec.

Oleg.



\
 
 \ /
  Last update: 2012-03-12 16:21    [W:0.434 / U:1.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site