Re: [PATCH] security_ops locking

From: James Morris (jmorrisat_private)
Date: Wed Jul 24 2002 - 19:05:31 PDT

  • Next message: Chris Wright: "Re: [PATCH] security_ops locking"

    On Wed, 24 Jul 2002, Chris Wright wrote:
    
    > * David Wheeler (dwheelerat_private) wrote:
    > > James Morris said:
    > > 
    > >  > The patch below implements locking of for the security module
    > >  > registration interfaces, covering writing & testing of the 
    > > security_ops pointer.
    > > 
    > > This patch solves a DIFFERENT problem than the one I'm concerned about;
    > > it DOES NOT solve the problem I raised earlier if there are multiple
    > > CPUs which don't guarantee atomic pointer writes.
    > 
    > I think it does.  Look at the way parisc implements xchg().
    > 
    
    Nope, David was correct.  The spinlocking only imposes memory ordering 
    with respect to its lock and critical region, which doesn't help us if 
    pointer assignments are not atomic.  The locking is still needed for 
    unprotected use of the registration interface, though.
    
    However, I have been told by one of the kernel port maintainers that 
    pointer assignments will always be atomic where the pointers are aligned 
    correctly, for all current archs.  This means we should be ok, as the 
    pointers we are using will be aligned correctly by the compiler.
    
    
    - James
    -- 
    James Morris
    <jmorrisat_private>
    
    
    _______________________________________________
    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 Jul 24 2002 - 19:06:56 PDT