[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2.6.9] fork: add a hook in do_fork()
    On Tue, 2004-11-23 at 13:51 -0800, Chris Wright wrote:
    > * Guillaume Thouvenin ( wrote:
    > > static int elsa_task_alloc_security(struct task_struct *p)
    > > {
    > > printk(KERN_ALERT "intercept a fork: %d created by %d\n",
    > > p->pid, p->parent->pid);
    > It's created by current. So, current->pid. p is not completely setup
    > yet, and is still largely duplication of current from dup_task_struct().

    I see. Thus the correct answer is: process pointed by "current" is the
    parent of the process pointed by "p" when elsa_task_alloc_security() is

    > And, IIRC, elsa is accounting related.
    > LSM is not the right framework, you should be using something like PAGG
    > or CKRM.

    I understand your point of view. Elsa is accounting related that's true
    but I'm trying to provide a solution without modifying the Linux kernel
    tree. To achieve this I just need a hook in the fork to be inform when a
    process creates a child. LSM hook does the trick and it is already in
    the kernel. That's why I use the LSM hook (and I'm waiting to see PAGG
    or CKRM in the Linux kernel).


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:08    [W:0.021 / U:57.532 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site