• L
    Make SLES9 "get_kernel_version" work on the kernel binary again · 8993780a
    Linus Torvalds 提交于
    As reported by Andy Whitcroft, at least the SLES9 initrd build process
    depends on getting the kernel version from the kernel binary.  It does
    that by simply trawling the binary and looking for the signature of the
    "linux_banner" string (the string "Linux version " to be exact. Which
    is really broken in itself, but whatever..)
    
    That got broken when the string was changed to allow /proc/version to
    change the UTS release information dynamically, and "get_kernel_version"
    thus returned "%s" (see commit a2ee8649:
    "[PATCH] Fix linux banner utsname information").
    
    This just restores "linux_banner" as a static string, which should fix
    the version finding.  And /proc/version simply uses a different string.
    
    To avoid wasting even that miniscule amount of memory, the early boot
    string should really be marked __initdata, but that just causes the same
    bug in SLES9 to re-appear, since it will then find other occurrences of
    "Linux version " first.
    
    Cc: Andy Whitcroft <apw@shadowen.org>
    Acked-by: NHerbert Poetzl <herbert@13thfloor.at>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Andrew Morton <akpm@osdl.org>
    Cc: Steve Fox <drfickle@us.ibm.com>
    Acked-by: NOlaf Hering <olaf@aepfle.de>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    8993780a
main.c 18.9 KB