lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091028100318.GA4861@suse.cz>
Date:	Wed, 28 Oct 2009 11:03:18 +0100
From:	Vojtech Pavlik <vojtech@...e.cz>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Dave Young <hidave.darkstar@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH][RFC] input: remove bios I8042_CTR_XLATE check to make
	keyboard usable

On Tue, Oct 27, 2009 at 10:43:10PM -0700, Dmitry Torokhov wrote:
> Hi Dave,
> 
> On Tue, Oct 27, 2009 at 01:34:04PM +0800, Dave Young wrote:
> > 
> > Pressing somekey at early booting phase cause keyboard to be not usable
> > (The hardware is DELL latitude e5400):

Does early booting mean while the BIOS is coming up? Does the keyboard
work in GRUB then? Or is it during the early init of the Linux kernel?
 
> > atkbd.c: Unknown key pressed (raw set 2, code 0xd3 on isa0060/serio0).
> > atkbd.c: Use 'setkeycodes e053 <keycode>' to make it known.
> > atkbd.c: Unknown key pressed (raw set 2, code 0x1d3 on isa0060/serio0).
> > atkbd.c: Use 'setkeycodes e053 <keycode>' to make it known.
> > 
> > i8042.c set i8042_direct to true when the controller init. But the result
> > is keyboard not usable, The only option is press the power button to shutdown. 
> > 
> > So here remove the bios check to fix it.

My question would be: Why this happens? Could it be that the probe is
confused by the keypress and reads the CTR incorrectly? Or is it just
that the keyboard controller is in fact in translating mode, yet the CTR
indicates otherwise?

A i8042.debug=1 log of the bad init would be good.

> I would be a little hesitant to force translation by default on all
> architectures, although it may make sense on x86...

The old 2.4 kernel sources say that there are some IBM PowerPC portables
that don't support translation at all. I wouldn't be surprised if there
were more examples like that in the embedded space.

I'm not aware of any x86 machine that wouldn't support the translated
mode.

> Vojtech, you wrote the thing, do you see any issues with forcing
> translation? I think most of the x86 boxes work in translated mode and
> the only time it is in raw is when BIOS screwed up initialization.
> 
> > Signed-off-by: Dave Young <hidave.darkstar@...il.com>
> > ---
> >  drivers/input/serio/i8042.c |    8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > --- linux-2.6.orig/drivers/input/serio/i8042.c	2009-10-13 08:57:07.000000000 +0800
> > +++ linux-2.6/drivers/input/serio/i8042.c	2009-10-27 13:15:13.000000000 +0800
> > @@ -869,14 +869,6 @@ static int i8042_controller_init(void)
> >  	spin_unlock_irqrestore(&i8042_lock, flags);
> >  
> >  /*
> > - * If the chip is configured into nontranslated mode by the BIOS, don't
> > - * bother enabling translating and be happy.
> > - */
> > -
> > -	if (~i8042_ctr & I8042_CTR_XLATE)
> > -		i8042_direct = true;
> > -
> > -/*
> >   * Set nontranslated mode for the kbd interface if requested by an option.
> >   * After this the kbd interface becomes a simple serial in/out, like the aux
> >   * interface is. We don't do this by default, since it can confuse notebook

-- 
Vojtech Pavlik
Director SuSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ