Re: 2.4.19 lsm kernel patch

From: Chris Wright (chrisat_private)
Date: Mon Aug 05 2002 - 18:15:51 PDT

  • Next message: Russell Coker: "Re: 2.4.19 lsm kernel patch"

    * Russell Coker (russellat_private) wrote:
    > 
    > Error: ./security/selinux/hooks.o .text.init refers to 000000bf R_386_PC32
    >   .text.exit
    
    The problem was introduced when the netfilter glue was removed from LSM
    after OLS.  The SElinux module_init()  code references the call
    selinux_nf_ip_exit(), which is marked as __exit, meaning it is thrown
    away if the module is compiled statically into the kernel.
    
    I committed the patch below, which fixes the problem.  Thanks for
    pointing this out.
    
    cheers,
    -chris
    
    # This is a BitKeeper generated patch for the following project:
    # Project Name: Linux Security Module
    # This patch format is intended for GNU patch command version 2.5 or higher.
    # This patch includes the following deltas:
    #	           ChangeSet	1.344   -> 1.345  
    #	security/selinux/hooks.c	1.26    -> 1.27   
    #
    # The following is the BitKeeper ChangeSet Log
    # --------------------------------------------
    # 02/08/05	chrisat_private	1.345
    # remove __exit attribute from selinux_nf_ip_exit call as it can
    # be called from selinux_plug_init and shouldn't be discarded.
    # problem discovered by Russell Coker.
    # --------------------------------------------
    #
    diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c
    --- a/security/selinux/hooks.c	Mon Aug  5 18:15:41 2002
    +++ b/security/selinux/hooks.c	Mon Aug  5 18:15:41 2002
    @@ -4827,7 +4827,7 @@
     	return 0;
     }
     
    -static void __exit selinux_nf_ip_exit(void)
    +static void selinux_nf_ip_exit(void)
     {
     	unsigned int i;
     
    -- 
    Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
    _______________________________________________
    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 Aug 05 2002 - 18:18:30 PDT