Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Mar 2012 15:34:00 +0100
From: Oleg Nesterov <>
To: Djalal Harouni <>
        Andrew Morton <>,
        Linus Torvalds <>,
        Al Viro <>,
        Alexey Dobriyan <>,
        "Eric W. Biederman" <>,
        Vasiliy Kulikov <>,
        Kees Cook <>, Solar Designer <>,
        WANG Cong <>,
        James Morris <>,,,
        Alan Cox <>,
        Greg KH <>, Ingo Molnar <>,
        Stephen Wilson <>,
        "Jason A. Donenfeld" <>
Subject: Re: [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

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.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.