From owner-freebsd-current@FreeBSD.ORG Sun Apr 12 15:03:47 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25CF106564A for ; Sun, 12 Apr 2009 15:03:47 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.18.43]) by mx1.freebsd.org (Postfix) with ESMTP id 7147C8FC16 for ; Sun, 12 Apr 2009 15:03:47 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [62.143.131.114] (helo=localhost) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Lt1Dm-0003mN-3Y; Sun, 12 Apr 2009 17:03:46 +0200 Date: Sun, 12 Apr 2009 17:03:35 +0200 From: Fabian Keil To: Maksim Yevmenkin Message-ID: <20090412170335.5a8a3169@fabiankeil.de> In-Reply-To: <200904082052.n38KqU9p075633@svn.freebsd.org> References: <200904082052.n38KqU9p075633@svn.freebsd.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-portbld-freebsd8.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/XF.egAMdjwX/4xA+pOVvpeE"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Df-Sender: 775067 Cc: freebsd-current@freebsd.org Subject: Re: svn commit: r190857 - head/sys/dev/kbdmux X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 15:03:48 -0000 --Sig_/XF.egAMdjwX/4xA+pOVvpeE Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Maksim Yevmenkin wrote: > Author: emax > Date: Wed Apr 8 20:52:30 2009 > New Revision: 190857 > URL: http://svn.freebsd.org/changeset/base/190857 >=20 > Log: > Undo SVN rev 183283 > =20 > Do not use Giant for kbdmux(4) locking. This is wrong and apparently > causing more problems than it solves. This will re-open the issue > where interrupt handlers may race with kbdmux(4) in polling mode. > Typical symptoms include (but not limited to) duplicated and/or > missing characters when low level console functions (such as gets) > are used while interrupts are enabled (for example geli password > prompt, mountroot prompt etc.) > =20 > MFC after: 3 days >=20 > Modified: > head/sys/dev/kbdmux/kbdmux.c >=20 > Modified: head/sys/dev/kbdmux/kbdmux.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/kbdmux/kbdmux.c Wed Apr 8 20:43:19 2009 (r190856) > +++ head/sys/dev/kbdmux/kbdmux.c Wed Apr 8 20:52:30 2009 (r190857) > @@ -104,10 +104,10 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, " > =20 > #define KBDMUX_LOCK_DESTROY(s) > =20 > -#define KBDMUX_LOCK(s) \ > - mtx_lock(&Giant) > -#define KBDMUX_UNLOCK(s) \ > - mtx_unlock(&Giant) > +#define KBDMUX_LOCK(s) > + > +#define KBDMUX_UNLOCK(s) > + > #define KBDMUX_LOCK_ASSERT(s, w) > =20 > #define KBDMUX_SLEEP(s, f, d, t) \ How about turning this into a compile-time or sysctl option or at least mentioning the change in /usr/src/UPDATING? With this commit, providing the geli key phrase on boot is impossible on my AMD64 dual core system. Not even enabling the "visible characters" option helps because obviously backspace is broken too. Before theses locks were introduces I worked around the problem with this gets() hack (which forced me to reduce the key entropy): http://www.fabiankeil.de/sourcecode/freebsd/gets-no-duplicates.diff and now I will simply revert your commit locally, but I assume I'm not the only geli user who prefers to be able to boot the system without local patches. Fabian --Sig_/XF.egAMdjwX/4xA+pOVvpeE Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkniAtEACgkQBYqIVf93VJ3sowCfcIFWYNTuYq59ZHML1CnpeH78 WC8AnRh1Elv1zZ/lRpKQ46QJhz2skWiL =KY0+ -----END PGP SIGNATURE----- --Sig_/XF.egAMdjwX/4xA+pOVvpeE--