Re: [RFC] 2.4.11-pre4 patch

From: Greg KH (gregat_private)
Date: Mon Oct 08 2001 - 09:23:02 PDT

  • Next message: Greg KH: "Re: [PATCH] proposed documentation changes"

    On Mon, Oct 08, 2001 at 09:22:30AM -0700, Seth Arnold wrote:
    > On Fri, Oct 05, 2001 at 07:23:11PM -0700, Crispin Cowan wrote:
    > > There are two conflicting schools of thought on this issue:
    > > 
    > >     * conditional compilation is bad:  hard to maintain, etc.  So just
    > >       use straight hooks, and make them as efficient as possible.
    > >     * you can't please everyone, so make LSM config'able.
    > 
    > I think what the "no conditional compilation" is a prohibition against
    > is actually #ifdefs in the .c files. If our security.h header file has
    > two different definitions for the hooks, along these lines:
    > 
    > #ifdef CONFIG_LSM_SCAFFOLD
    >  #define foo_hook(x,y,z) _foo_hook((x),(y),(z))
    > #else
    >  #define foo_hook(x,y,z) do { } while(0)
    > #endif
    > 
    > I'm sure gregkh will correct me if I am wrong, but my understanding is
    > that ifdefs for the config options is fine in headers, but is verboten
    > in kernel code. (An excellent example is spinlocks: under SMP, they are
    > spinlocks. Under UP, they are nothing.)
    
    Seth is correct.  Please see Documentation/SubmittingPatches for more
    info on this.
    
    greg k-h
    
    _______________________________________________
    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 : Mon Oct 08 2001 - 09:31:34 PDT