mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Pavel Machek <pavel@suse.cz>
Cc: Jesper Juhl <jju@dif.dk>,
	linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: [PATCH] console_loglevel broken on ia64 (and possibly other archs)
Date: Tue, 25 Dec 2001 21:20:46 +1100	[thread overview]
Message-ID: <388.1009275646@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Mon, 24 Dec 2001 23:35:15 BST." <20011224233515.B3932@elf.ucw.cz>

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.


  reply	other threads:[~2001-12-25 10:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-21 22:52 Jesper Juhl
2001-12-24 22:35 ` Pavel Machek
2001-12-25 10:20   ` Keith Owens [this message]
2001-12-25 11:41 ` Kai Henningsen
2001-12-29 15:02 ` Jesper Juhl

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=388.1009275646@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=jju@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=pavel@suse.cz \
    /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

Powered by JetHome