lkml.org 
[lkml]   [2001]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] console_loglevel broken on ia64 (and possibly other archs)
Date
On Mon, 24 Dec 2001 23:35:15 +0100, 
Pavel Machek <pavel@suse.cz> wrote:
>Jesper Juhl wrote
>
>> This patch fixes the console_loglevel variable(s) so that code that
>> assumes the variables occupy continuous storage does not break (and
>> overwrite other data).
>
>It seems to me you are adding feature? And unneeded one, also.

No, it is a bug fix. The existing code in kernel/printk.c has

/* Keep together for sysctl support */
int console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
int default_message_loglevel = DEFAULT_MESSAGE_LOGLEVEL;
int minimum_console_loglevel = MINIMUM_CONSOLE_LOGLEVEL;
int default_console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;

and hopes that gcc will keep those variables together. The sysctl code
only addresses console_loglevel and assumes that the other three
variables are at the next addresses. There is no requirement for gcc
to keep unrelated variables in the order they are defined, on i386 it
does, on ia64 it does not. On ia64, doing
echo 1 2 3 4 > /proc/sys/kernel/printk
changes console_loglevel then corrupts three random words, whatever
variables gcc put after console_loglevel are destroyed.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.116 / U:5.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site