mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Theodore Tso" <tytso@mit.edu>,
	"Kay Sievers" <kay.sievers@vrfy.org>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	"Evgeniy Polyakov" <zbr@ioremap.net>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	linux-kernel@vger.kernel.org,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>
Subject: Re: Runaway loop with the current git.
Date: Tue, 9 Dec 2008 03:00:01 +0100	[thread overview]
Message-ID: <ac3eb2510812081800id4b1a88je311fcbbf574e06b@mail.gmail.com> (raw)
In-Reply-To: <20081209010937.GL2501@mit.edu>

On Tue, Dec 9, 2008 at 02:09, Theodore Tso <tytso@mit.edu> wrote:
> On Mon, Dec 08, 2008 at 04:35:20AM +0100, Kay Sievers wrote:
>> Sure, if we can make userspace behave nicely, I'm all for doing it. On
>> the other hand, I think it's a good thing to provide a sane
>> environment by the kernel for any "non-initramfs-optimized" helper.
>> Writing to /dev/console is a usual behavior for tools used in
>> initramfs, to be able to debug bootup problems. In many cases it is
>> just glibc's fallback LOG_CONS, if syslog is not available.
>
> Well, can we agree that (a) there is a generalized modprobe recursion
> detector already in the kernel, and (b) for some reason, Debian isn't
> triggering it?  That seems like a bug, and while it may not be 100%
> clear whether the bug is on the userspace side or the kernel side, it
> would seem that finding and fixing *that* would be a Good Thing, and
> it could be argued that a specific don't request char-major-5-1 would
> be papering over this bug (whether it is in Debian's initrd or in the
> kernel side code).  It would be good to make sure we understand what
> the root causes for while the modprobe recursion detector is
> apparently not triggering, since it could be that Debian's initrd
> might cause some other uncaught recursion loop if we don't drive this
> problem determination to root cause.

Right, it would be good to know for sure what's going on.

In my test script it was just a simple access to /dev/console, so it
might just be that modprobe wants to log something on Debian. At least
that would match the behavior I've seen here.

And we really rely on these tools to be able to print debug messages
sometimes to find other bugs (at least at the time it's theoretically
possible to log). And I don't see how modprobe could find out, that it
is not allowed to access /dev/console.

As an ideal solution, I would like to have /dev/console working before
_any_ userspace is called, and it would put all the stuff that is
written to it the kernel "dmesg buffer" as long as the console isn't
working, just to be able to see what's going on, if needed. As the
second choice, it would return -ENODEV. The current looping is
definitely not what we want. :)

>> That's why I still think it's a good thing, to connect the core tty
>> devices to their dev_t handler internally, before we init all the
>> other drivers and run userspace.
>
> Um, how early?  (/me searches lkml.org for the original patch).  Ah,
> OK, you want to do it postcore....  There may actually be a problem
> with that, because it looks like vtconsole_class_init (which is
> currently run as a postcore initcall) really wants to happen before
> the tty layer initializes itself.  So moving tty into postcore could
> potentially run into problems, depending on whether vt.c's or
> tty_io.c's initcalls are run first.

Sure, we might need to change that, if it is a problem. It was mainly
to find out what was going on, because people thought that some serial
driver is involved in the loop, which I didn't believe.

To be safer, maybe we just want to move the cdev_add(),
register_chrdev_region() call, which should prevent the "userspace
driver search".

Thanks,
Kay

  reply	other threads:[~2008-12-09  2:00 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 18:03 Evgeniy Polyakov
2008-12-05 18:16 ` Alan Cox
2008-12-05 18:32   ` Kay Sievers
2008-12-05 19:27     ` Evgeniy Polyakov
2008-12-05 19:34       ` Alan Cox
2008-12-05 21:12         ` Evgeniy Polyakov
2008-12-05 21:17           ` Kay Sievers
2008-12-05 21:24             ` Evgeniy Polyakov
2008-12-06  2:10               ` Kay Sievers
2008-12-06 16:09                 ` Evgeniy Polyakov
2008-12-06 16:16                   ` Kay Sievers
2008-12-06 16:56                     ` Evgeniy Polyakov
2008-12-06 18:11                       ` Kay Sievers
2008-12-06 19:32                         ` Kay Sievers
2008-12-06 20:26                           ` Evgeniy Polyakov
2008-12-07  3:56                             ` Kay Sievers
2008-12-07  4:31                               ` Evgeniy Polyakov
2008-12-07 11:23                               ` Alan Cox
2008-12-07 11:45                                 ` Evgeniy Polyakov
2008-12-07 11:58                                   ` Alan Cox
2008-12-07 13:10                                     ` Evgeniy Polyakov
2008-12-07 14:02                                 ` Kay Sievers
2008-12-07 15:08                                   ` Alan Cox
2008-12-07 14:49                                 ` Herbert Xu
2008-12-07 15:14                                   ` Alan Cox
2008-12-07 15:55                                   ` Herbert Xu
2008-12-07 16:03                                     ` Kay Sievers
2008-12-07 16:09                                       ` Alan Cox
2008-12-07 16:21                                         ` Kay Sievers
2008-12-07 16:57                                           ` Alan Cox
2008-12-07 17:03                                             ` Evgeniy Polyakov
2008-12-07 17:24                                               ` Alan Cox
2008-12-07 17:29                                                 ` Evgeniy Polyakov
2008-12-07 16:31                                         ` Evgeniy Polyakov
2008-12-07 17:01                                           ` Alan Cox
2008-12-07 17:13                                             ` Evgeniy Polyakov
2008-12-07 17:17                                             ` Kay Sievers
2008-12-07 17:22                                             ` Kay Sievers
2008-12-07 17:28                                               ` Alan Cox
2008-12-07 17:39                                                 ` Kay Sievers
2008-12-07 17:51                                                   ` Alan Cox
2008-12-07 18:22                                                     ` Kay Sievers
2008-12-08  3:23                                                       ` Valdis.Kletnieks
2008-12-08  3:56                                                         ` Kay Sievers
2008-12-07 17:44                                                 ` Evgeniy Polyakov
2008-12-07 17:52                                                   ` Alan Cox
2008-12-07 17:54                                                     ` Evgeniy Polyakov
2008-12-07 18:03                                                       ` Alan Cox
2008-12-07 18:13                                                         ` Kay Sievers
2008-12-07 18:15                                                           ` Alan Cox
2008-12-07 18:21                                                             ` Kay Sievers
2008-12-07 18:31                                                               ` Alan Cox
2008-12-07 19:02                                                                 ` Kay Sievers
2008-12-07 20:00                                                                   ` Alan Cox
2008-12-07 22:26                                                                     ` Kay Sievers
2008-12-08  1:18                                                                       ` Theodore Tso
2008-12-08  3:35                                                                         ` Kay Sievers
2008-12-09  1:09                                                                           ` Theodore Tso
2008-12-09  2:00                                                                             ` Kay Sievers [this message]
2008-12-09 10:13                                                                             ` Alan Cox
2008-12-07 16:33                                     ` Evgeniy Polyakov
2008-12-08 13:06                                     ` Evgeniy Polyakov
2008-12-09  0:42                                       ` Herbert Xu
2008-12-08 13:22                           ` Evgeniy Polyakov
2008-12-06  0:29           ` Alan Cox

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=ac3eb2510812081800id4b1a88je311fcbbf574e06b@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=zbr@ioremap.net \
    /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

all inboxes | Powered by JetHome®