Re: shm_close hook

From: Emily Ratliff (ratliffat_private)
Date: Wed Jan 16 2002 - 08:30:31 PST

  • Next message: Antony Edwards: "[PATCH] add lock hook to prevent race"

    On Tue, 15 Jan 2002, Chris Wright wrote:
    > 
    > i see no immediate reason not to include this patch.  do you think this
    > hook is sufficient for SECURE_SHM?  the shm_close() vm_op gets called
    > during __exit_mm() (so we don't have to wait for parent in wait4),
    > right?
    In this case, yes, the shm_close() hook is sufficient. shm_exit() just 
    walks through all of the shared memory segments created by the exiting 
    process and destroys them if no other process is attached to them. Since 
    __exit_mm() calls close (and our hook marks them destroyable if there is 
    nothing else attached to them) which calls destroy, the same behavior 
    takes place, and takes place at the right time so we don't have to put 
    that behavior in the task_ops->free_security hook where it wouldn't get 
    called until after we wait for the parent.
    
    Thanks! That is good news.
    
    Emily
    
    -- 
    Emily Ratliff
    IBM Linux Technology Center, Security
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Wed Jan 16 2002 - 08:30:43 PST