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 <oleg@...hat.com>
To: Djalal Harouni <tixxdz@...ndz.org>
Cc: linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Alexey Dobriyan <adobriyan@...il.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Vasiliy Kulikov <segoon@...nwall.com>,
        Kees Cook <keescook@...omium.org>, Solar Designer <solar@...nwall.com>,
        WANG Cong <xiyou.wangcong@...il.com>,
        James Morris <james.l.morris@...cle.com>,
        linux-security-module@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Alan Cox <alan@...rguk.ukuu.org.uk>,
        Greg KH <gregkh@...uxfoundation.org>, Ingo Molnar <mingo@...e.hu>,
        Stephen Wilson <wilsons@...rt.ca>,
        "Jason A. Donenfeld" <Jason@...c4.com>
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
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.

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.