public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: 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: Sun, 7 Dec 2008 20:18:51 -0500	[thread overview]
Message-ID: <20081208011850.GA10289@mit.edu> (raw)
In-Reply-To: <ac3eb2510812071426n2bd1bbefjd4fcdcd0e2efff80@mail.gmail.com>

Let's take a step back, shall we?  Fundamentally, what's going on here
is that a particular distribution's initrd (Debian's, to be precise)
is running into an error in response to a modprobe request for
char-major-5-1, and it is attempting to write to the console, which is
resulting in another modprobe request.... ad infinitum.

There is a dispute about whether it is looping forever, or whether it
should be getting caught by kernel/kmod.c's modprobe recursion
detector.  Alan has checked the recursion detector and reports that it
works just fine; Evgeniy and Kay are claiming that it in fact loops
forever, and the recursion detector is not working.  I'm going to
guess that Alan tested on Fedora, where it did work just fine, and
reason why people using a Debian-derived initrd is seeing a recursive
loop is because the recursive loop detector works by detecting up to
five concurrent calls to modprobe.  That is, while the userspace
helper process is running, another userspace helper is invoked, and so
on, so that there are five userspace helpers piled up on one another,
this will trigger the automatic recursion detector.  I'm guessing why
it isn't working given Debian's initrd setup is that whatever is
ultimately opening /dev/console isn't being called until after the
helper script has exited.

Given that the general purpose recursion detector is apparently not
working at least in this case, Kay has proposed that we special case a
kludge wihch prevents the userspace helper be called in the case of
5:1.  His argument in favor of doing this is that /dev/console is
never a module, so requesting char-major-5-1 will never be helpful,
and this error can only happen in early userspace, when the tty
subsystem hasn't been initialized yet.  Alan claims this could also
happen if the appropriate low-level console driver hasn't been loaded,
and so perhaps the right thing in response to the request for
char-major-5-1 is to load 8250_pci.  Here, I think Alan is wrong, and
Kay is right.  From looking at the source, if there is no low-level
console driver loaded, there is no call to request_module(); the only
time this can happen is when tty driver hasn't been initialized in
early startup.

On the other hand, Alan is right that in general it is the usermode
helper and initrd's responsibility not create a recursive dependency.
This is in general true, not just for /dev/console.  So based on that,
it can be argued that the recursion kludge checking for 5:1 should
just as much be put in userspace.  In addition, the fact that
recursion detection isn't working also seems to indicate that initrd
in question is also doing something very wrong.

So I would think the best thing to do is to figure out what Debian's
initrd is doing that is evading the recursion detection.  Fixing that
is going to make things much more robust.

Regards,

						- Ted

  reply	other threads:[~2008-12-08  1:19 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 18:03 Runaway loop with the current git 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 [this message]
2008-12-08  3:35                                                                         ` Kay Sievers
2008-12-09  1:09                                                                           ` Theodore Tso
2008-12-09  2:00                                                                             ` Kay Sievers
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=20081208011850.GA10289@mit.edu \
    --to=tytso@mit.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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