From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 1/9] exec: add a global execve counter Date: Sun, 11 Mar 2012 18:25:12 +0100 Message-ID: <20120311172512.GA2729@redhat.com> References: <1331421919-15499-1-git-send-email-tixxdz@opendz.org> <1331421919-15499-2-git-send-email-tixxdz@opendz.org> Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Andrew Morton , Linus Torvalds , Al Viro , Alexey Dobriyan , "Eric W. Biederman" , Vasiliy Kulikov , Kees Cook , Solar Designer , WANG Cong , James Morris , linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alan Cox , Greg KH , Ingo Molnar , Stephen Wilson , "Jason A. Donenfeld" To: Djalal Harouni Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: <1331421919-15499-2-git-send-email-tixxdz@opendz.org> List-Id: linux-fsdevel.vger.kernel.org On 03/11, Djalal Harouni wrote: > > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1420,6 +1420,9 @@ struct task_struct { > #endif > seccomp_t seccomp; > > +/* Execve counter: will be used to check if objects belong to the appropriate > + * process image */ > + atomic64_t exec_id; > /* Thread group tracking */ > u32 parent_exec_id; > u32 self_exec_id; 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. Btw this is also true for parent_exec_id/self_exec_id, but this is another story. Oleg.