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

From: Dragan Stancevic (visitorat_private)
Date: Mon Dec 02 2002 - 18:37:52 PST

  • Next message: James Morris: "Re: [RFC] LSM fix for stupid "empty" functions"

    On Sunday 01 December 2002 10:26, Greg KH wrote:
    > On Sun, Dec 01, 2002 at 05:21:56PM +0000, Christoph Hellwig wrote:
    > > On Sun, Dec 01, 2002 at 10:12:27AM -0800, Greg KH wrote:
    > > > Does the kernel work if data structures are in ROM?  I would think that
    > > > lots of variables in the kernel would have this problem :)
    > >
    > > The nommu ports support .text in rom.
    >
    > But doesn't initialized variables live in .bss?  So we should be ok,
    > right?
    
    Greg-
    
    not that I am trying to be a PITA but where did you get the information that 
    initialized variables live in .bss?
    
    Initialized variables live in .data, the .bss (Block Started by Symbol) is 
    reserved for non-initialized variables.
    
    Look:
    visitor@satelite:~> cat a.c
    int first_var;
    int second_var = 5;
    visitor@satelite:~> gcc -S a.c
    visitor@satelite:~> cat a.s
            .file   "a.c"
    .globl second_var
            .data
            .align 4
            .type   second_var,@object
            .size   second_var,4
    second_var:
            .long   5
            .comm   first_var,4,4
            .ident  "GCC: (GNU) 3.2"
    visitor@satelite:~>
    
    -- 
    Peace can only come as a natural consequence
    of universal enlightenment. -Dr. Nikola Tesla
    _______________________________________________
    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 Dec 02 2002 - 18:42:49 PST