All of lore.kernel.org
 help / color / mirror / Atom feed
* shell outputs anything typed when the kernel thinks@100%
@ 2008-03-21 21:11 Madhou
  2008-03-21 21:31 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Madhou @ 2008-03-21 21:11 UTC (permalink / raw)
  To: linux-kernel

Kernel: 2.6.21.5
OS: Slackware12.0


This is a long time annoying misconception i'm reporting here:

When a command is run from a shell and drives the kernel to use 100% of cpu 
for a while, linux lets printing on screen anything that is typed.
This doesn't sound too much annoying at first sight, but actually this 
confronts the users to a problem:
When logging in a shell, one will type his username, 'return' and then his 
password...
But just after 'return' the kernel is launched into thinking for long enough 
to the point that users who do everything fast including logging in a shell 
let the shell display the first letters of their passwords.
This problem tends to be critical when the user makes a demonstration to a 
bunch of people thanks to an overhead projector.

The time that the kernel takes for checking usernames is about one second on 
my laptop which is equipped with an intel centrino 1,7GHz.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell outputs anything typed when the kernel thinks@100%
  2008-03-21 21:11 shell outputs anything typed when the kernel thinks@100% Madhou
@ 2008-03-21 21:31 ` Alan Cox
  2008-03-21 21:37 ` Jan Engelhardt
  2008-04-03 23:13 ` Nick Andrew
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2008-03-21 21:31 UTC (permalink / raw)
  To: Madhou; +Cc: linux-kernel

> The time that the kernel takes for checking usernames is about one second on 
> my laptop which is equipped with an intel centrino 1,7GHz.

The kernel doesn't do anything with usernames. Most likely your user
space login programs are configured with an intentional delay to stop
dictionary attacks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell outputs anything typed when the kernel thinks@100%
  2008-03-21 21:11 shell outputs anything typed when the kernel thinks@100% Madhou
  2008-03-21 21:31 ` Alan Cox
@ 2008-03-21 21:37 ` Jan Engelhardt
  2008-04-03 23:13 ` Nick Andrew
  2 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2008-03-21 21:37 UTC (permalink / raw)
  To: Madhou; +Cc: linux-kernel


On Mar 21 2008 22:11, Madhou wrote:
>
> This is a long time annoying misconception i'm reporting here:
>
> When a command is run from a shell and drives the kernel to use 100% of cpu
> for a while, linux lets printing on screen anything that is typed.

[For techies: "But I can type text on the tty even if I run sleep 
1000!"]

Oh yeah wow. It's been like that for what, 15+ years?
This is a shell feature - or bug, depending on how you look at it,
the kernel merely does what the shell did to the tty.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell outputs anything typed when the kernel thinks@100%
  2008-03-21 21:11 shell outputs anything typed when the kernel thinks@100% Madhou
  2008-03-21 21:31 ` Alan Cox
  2008-03-21 21:37 ` Jan Engelhardt
@ 2008-04-03 23:13 ` Nick Andrew
  2 siblings, 0 replies; 4+ messages in thread
From: Nick Andrew @ 2008-04-03 23:13 UTC (permalink / raw)
  To: Madhou; +Cc: linux-kernel

On Fri, Mar 21, 2008 at 10:11:43PM +0100, Madhou wrote:
> When logging in a shell, one will type his username, 'return' and then his 
> password...

It sounds like you are describing behaviour of getty, not the
shell. That's because the tty device is set to echo typed characters at
the 'login:' prompt.  After getty receives your username either it or
/bin/login will turn off the echo flag and prompt for your password.

If it's a problem for you, patch getty to turn off echo (and cooked
mode) before the 'login:' prompt and perform all keyboard input
processing and echoing in the program.

> But just after 'return' the kernel is launched into thinking for long enough 
> to the point that users who do everything fast including logging in a shell 
> let the shell display the first letters of their passwords.
> This problem tends to be critical when the user makes a demonstration to a 
> bunch of people thanks to an overhead projector.

I don't think the kernel can be blamed for this behaviour, particularly
when your password is 'qwerty'. When demonstrating, setup a demo
username so you don't have to type your own password in front of a
roomful of people.

Nick.
-- 
PGP Key ID = 0x418487E7                      http://www.nick-andrew.net/
PGP Key fingerprint = B3ED 6894 8E49 1770 C24A  67E3 6266 6EB9 4184 87E7

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-03 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-21 21:11 shell outputs anything typed when the kernel thinks@100% Madhou
2008-03-21 21:31 ` Alan Cox
2008-03-21 21:37 ` Jan Engelhardt
2008-04-03 23:13 ` Nick Andrew

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.