From: Herbert Poetzl <herbert@13thfloor.at>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Olaf Hering <olaf@aepfle.de>, Andy Whitcroft <apw@shadowen.org>,
Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, Steve Fox <drfickle@us.ibm.com>
Subject: Re: 2.6.19-git13: uts banner changes break SLES9 (at least)
Date: Mon, 11 Dec 2006 19:29:08 +0100 [thread overview]
Message-ID: <20061211182908.GC7256@MAIL.13thfloor.at> (raw)
In-Reply-To: <Pine.LNX.4.64.0612111022140.12500@woody.osdl.org>
On Mon, Dec 11, 2006 at 10:26:13AM -0800, Linus Torvalds wrote:
>
>
> On Mon, 11 Dec 2006, Olaf Hering wrote:
> >
> > Hmm, even moving this to linux_banner doesnt work, just because
> > __initdata is in a different section.
>
> Heh. Let's just change the "version_read_proc" string to not trigger.
>
> Something like this instead (which replaces the "Linux" with "%s" in
> /proc, and just takes it from "utsname()->sysname" instead. So now you can
> lie and call yourself "OS X" in your virtual partition if you want to ;)
cool!
should definitely work for all 'known' cases
thanks,
Herbert
> Linus
>
> diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
> index dc3e580..92ea774 100644
> --- a/fs/proc/proc_misc.c
> +++ b/fs/proc/proc_misc.c
> @@ -47,6 +47,7 @@
> #include <linux/vmalloc.h>
> #include <linux/crash_dump.h>
> #include <linux/pid_namespace.h>
> +#include <linux/compile.h>
> #include <asm/uaccess.h>
> #include <asm/pgtable.h>
> #include <asm/io.h>
> @@ -253,8 +254,15 @@ static int version_read_proc(char *page, char **start, off_t off,
> {
> int len;
>
> - len = sprintf(page, linux_banner,
> - utsname()->release, utsname()->version);
> + /* FIXED STRING! Don't touch! */
> + len = snprintf(page, PAGE_SIZE,
> + "%s version %s"
> + " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
> + " (" LINUX_COMPILER ")"
> + " %s\n",
> + utsname()->sysname,
> + utsname()->release,
> + utsname()->version);
> return proc_calc_metrics(page, start, off, count, eof, len);
> }
>
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index e8bfac3..b0c4a05 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -17,8 +17,6 @@
> #include <asm/byteorder.h>
> #include <asm/bug.h>
>
> -extern const char linux_banner[];
> -
> #define INT_MAX ((int)(~0U>>1))
> #define INT_MIN (-INT_MAX - 1)
> #define UINT_MAX (~0U)
> diff --git a/init/main.c b/init/main.c
> index 036f97c..c783695 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -483,6 +483,12 @@ void __init __attribute__((weak)) smp_setup_processor_id(void)
> {
> }
>
> +static char __initdata linux_banner[] =
> + "Linux version " UTS_RELEASE
> + " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
> + " (" LINUX_COMPILER ")"
> + " " UTS_VERSION "\n";
> +
> asmlinkage void __init start_kernel(void)
> {
> char * command_line;
> @@ -509,7 +515,7 @@ asmlinkage void __init start_kernel(void)
> boot_cpu_init();
> page_address_init();
> printk(KERN_NOTICE);
> - printk(linux_banner, UTS_RELEASE, UTS_VERSION);
> + printk(linux_banner);
> setup_arch(&command_line);
> unwind_setup();
> setup_per_cpu_areas();
> diff --git a/init/version.c b/init/version.c
> index 2a5dfcd..9d96d36 100644
> --- a/init/version.c
> +++ b/init/version.c
> @@ -33,8 +33,3 @@ struct uts_namespace init_uts_ns = {
> },
> };
> EXPORT_SYMBOL_GPL(init_uts_ns);
> -
> -const char linux_banner[] =
> - "Linux version %s (" LINUX_COMPILE_BY "@"
> - LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n";
> -
next prev parent reply other threads:[~2006-12-11 18:29 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-11 15:11 2.6.19-git13: uts banner changes break SLES9 (at least) Andy Whitcroft
2006-12-11 16:33 ` Olaf Hering
2006-12-11 16:44 ` Linus Torvalds
2006-12-11 16:52 ` Linus Torvalds
2006-12-11 18:04 ` Olaf Hering
2006-12-11 18:18 ` Olaf Hering
2006-12-11 18:26 ` Linus Torvalds
2006-12-11 18:29 ` Herbert Poetzl [this message]
2006-12-11 18:43 ` Linus Torvalds
2006-12-11 18:55 ` Olaf Hering
2006-12-11 19:11 ` Linus Torvalds
2006-12-11 22:04 ` Paul Mackerras
2006-12-12 0:05 ` David Miller
2006-12-12 9:10 ` Gerd Hoffmann
2006-12-11 19:20 ` Andy Whitcroft
2006-12-11 19:36 ` Linus Torvalds
2006-12-11 22:42 ` Andy Whitcroft
2006-12-11 19:37 ` Herbert Poetzl
2006-12-11 19:56 ` Olaf Hering
2006-12-11 20:05 ` Linus Torvalds
2006-12-11 20:09 ` Linus Torvalds
2006-12-11 20:21 ` Greg KH
2006-12-11 20:16 ` Olaf Hering
2006-12-11 20:15 ` Theodore Tso
2006-12-11 20:23 ` Arjan van de Ven
2006-12-11 21:16 ` H. Peter Anvin
2006-12-11 18:49 ` Olaf Hering
2006-12-12 12:23 ` Mach-O binary format support and Darwin syscall personality [Was: uts banner changes] Kyle Moffett
2006-12-12 16:23 ` Linus Torvalds
2006-12-12 17:56 ` Kyle Moffett
2006-12-12 18:20 ` Linus Torvalds
2006-12-12 22:34 ` Kyle Moffett
2006-12-12 22:38 ` Benjamin Herrenschmidt
2006-12-12 22:57 ` Linus Torvalds
2006-12-12 22:21 ` Benjamin Herrenschmidt
2006-12-15 12:53 ` Pavel Machek
2006-12-11 17:50 ` 2.6.19-git13: uts banner changes break SLES9 (at least) Olaf Hering
2006-12-11 17:57 ` Arjan van de Ven
2006-12-11 18:00 ` Olaf Hering
2006-12-11 18:08 ` Arjan van de Ven
2006-12-11 18:14 ` Olaf Hering
2006-12-11 19:03 ` Arjan van de Ven
2006-12-11 19:37 ` Jan Engelhardt
2006-12-11 18:19 ` Linus Torvalds
2006-12-11 18:40 ` Olaf Hering
2006-12-11 18:52 ` Linus Torvalds
2006-12-11 19:34 ` Jan Engelhardt
2006-12-11 21:15 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061211182908.GC7256@MAIL.13thfloor.at \
--to=herbert@13thfloor.at \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=drfickle@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox