• Ernie Petrides's avatar
    [PATCH] minor conceptual fix for /proc/kcore header size · bcba0212
    Ernie Petrides authored
    While investigating the 2.4 memory corruption problem fixed by the patch
    previously posted, it was noticed that the 2.6 version of get_kcore_size()
    inappropriately uses sizeof(struct memelfnote) in its calculation of the
    /proc/kcore ELF header size.  What is actually stored in the header is an
    "elf_note" structure plus the 4 ASCII chars "CORE".
    
    It just so happens that on 32-bit arches, both calculations result in the
    same value (16).  But on 64-bit arches, the allocated size (24) is larger
    than necessary (16).  This does not result in any possible data corruption,
    but it might be nice to correct this "conceptual" error.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    bcba0212
kcore.c 9.81 KB