public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	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:44:35 +0300	[thread overview]
Message-ID: <20081207174435.GB1687@ioremap.net> (raw)
In-Reply-To: <20081207172855.55fee78f@lxorguk.ukuu.org.uk>

On Sun, Dec 07, 2008 at 05:28:55PM +0000, Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
> > > /dev/console is a logical mapping to a device which may well be
> > > different, loaded after PCI is initialised and dependant on PCI.
> > 
> > So wrong. If no driver is associated, like early, in that case, we
> > must return -ENODEV, instead of calling modprobe in a loop. It's a
> > built-in device, and it's easy to fix.
> 
> You've clearly no idea how initrd even works have you ? If it just
> returned -ENODEV you wouldn't be able to open the console and you
> wouldn't trigger the loading of the module to get the console running. So
> you've now completely buggered the boot process.
> 
> The correct sequence is
> 
> 	Open device
> 		Kernel issues hotplug message
> 			Hotplug script loads drivers to policy
> 
> 
> The problem case you have due to initrd bugs is
> 
> 	Open device
> 		Kernel issues hotplug message
> 			Hotplug script opens same device (BUG)

Everyone understands that, what you do not want to get, is that this
case can be handled by the kernel so that there would be no recursion.
And instead of thinking how to fix it, you just try to shut it up.

There may be another case, when the same happens inside the kernel, i.e.
module being loaded requires console and the same happens again. Similar
problem exists for network console, when there is no underlying device
yet, but it is handled.

Fortunately console is the most common example (maybe even the only
one), so this case can be fixed easily. Moreover, because of subtle
tty ordering, when everything is in kernel, it still may be triggered,
as was shown previously.

And while having dumb console device sounds awful for you, it is a
bulletprof solution even for non-expected userspace behaviout. And so
far the only objection was that it may break something, which you
believe may happen not even being tested.

Alan, let's make some progress on this fingerpointing. If Herbert's
patch fixes the crypto loading problem, it will find its way upstream
for the current tree, and in the merge window Kay's patch may be applied
and widely tested. Thoughts?

-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2008-12-07 17:44 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 [this message]
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
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=20081207174435.GB1687@ioremap.net \
    --to=zbr@ioremap.net \
    --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 \
    /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