Re: [RFC] LSM fix for stupid "empty" functions

From: Greg KH (gregat_private)
Date: Sun Dec 01 2002 - 22:57:37 PST

  • Next message: Greg KH: "Re: [RFC] LSM fix for stupid "empty" functions"

    On Mon, Dec 02, 2002 at 01:00:27PM +1100, James Morris wrote:
    > On Sun, 1 Dec 2002, Greg KH wrote:
    > 
    > > > I think we still want to make sure that the module author has explicitly
    > > > accounted for all of the hooks, in case new hooks are added.
    > > 
    > > But with this patch, if the module author hasn't specified a hook, they
    > > get the "dummy" ones.  So the structure should always be full of
    > > pointers, making the VERIFY_STRUCT macro pointless.
    > 
    > Yes, but defaulting unspecified hooks to dummy operations could be
    > dangerous.  A module might appear to compile and run perfectly well, but 
    > be missing some important new hook.
    
    One could argue that a "important new hook" would provide a sane dummy
    operation, or that if the module doesn't need it, why would it want to
    provide it?  :)
    
    Anyway, there's no way to resolve both this percieved problem, and the
    "smaller and easier" patch that I proposed, right?  Unless we want to
    export all dummy operation functions for all modules to use?  I could do
    that, but it's pretty messy...
    
    thanks,
    
    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 : Sun Dec 01 2002 - 21:58:45 PST