public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jju@dif.dk>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: [PATCH] console_loglevel broken on ia64 (and possibly other archs)
Date: 29 Dec 2001 16:02:27 +0100	[thread overview]
Message-ID: <1009638152.11066.0.camel@jju> (raw)
In-Reply-To: <20011224233515.B3932@elf.ucw.cz>
In-Reply-To: <3C23BD30.F8C3B2E1@dif.dk>  <20011224233515.B3932@elf.ucw.cz>

On Mon, 2001-12-24 at 23:35, Pavel Machek 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.
> 									Pavel

if you do 

echo 6 4 1 7 > /proc/sys/kernel/printk

then you will overwrite console_loglevel and the next 3 ints. If the
next 3 ints are default_message_loglevel, minimum_console_loglevel &
default_console_loglevel then all is fine, but if these are not stored
in consecutive memory then you will corrupt other data instead - which
is a bug. By turning those into an array of ints then you guarantee that
the variables will occupy consecutive storage and thus the bug is no
more!
That is the purpose of the patch.

Keith Owens has confirmed this to be a problem on IA64 and that the
patch fixes the problem. I'm not aware of other architectures having
that problem, but with this patch it is impossible for them to have a
problem, and it has no ill effects as far as I can tell.

Thank you for your feedback!


-- 
Mvh. / Best regards
Jesper Juhl - jju@dif.dk



      parent reply	other threads:[~2001-12-29 15:01 UTC|newest]

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

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=1009638152.11066.0.camel@jju \
    --to=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