Re: Entering password at GELI prompt using USB keyboard

2014-02-09 Thread perox
Arg, cheered too soon :( It actually wasn't the cngets()/gets() change. I also
tried enabling the APIC again (by hint.apic.0.disabled=0, hint.apic.1.disabled=0
in loader.conf) at the same time. The password entering seems to work as long
as the APIC is enabled. I have been keeping it disabled since 8.1 or so because 
my system would freeze after a few days with the APIC enabled, probably some
interrupt storm, never checked this in detail

So now, I'm stuck between a rock and a hard place: When the APIC is enabled,
I can enter the GELI password and by system boots but hard freezes after two
days. If the APIC is disabled I cannot enter the password but the system
would run without problems.

It's probably time to investigate further on the interrupt storm issue in
order to be able to use the APIC in future. However, I'm not particularly
knowledegable in this area. Will probably start with vmstat -i :) Any other
hints?

Regards
 -



---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
http://email.freenet.de/basic/Informationen

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Re: RE: Entering password at GELI prompt using USB keyboard

2014-02-08 Thread Eitan Adler
[ Andriy, see quoted paragraph below ]

On Sat, Feb 8, 2014 at 9:12 AM,   wrote:
> Hello again,
>
> finally I was able to "solve" my problem. The culprit was - as suspected - 
> that
> GELI uses cngets() instead of gets() since 9.1. I used the old gets() as well 
> as
> the related cngetc() and cncheckc() implementations from 9.0 and changed the
> call in GELI from cngets() to gets_old(). As a result of this, I can now enter
> the password at the GELI prompt again. Now, I am not sure what really causes 
> my
> problem as cngets() is not that different from gets() except for the new
> cngrab() and cnungrab() calls as well as the the cpu_spinwait() in cngetc() 
> that
> wasn't present before. Perhaps cpu_spinwait() is buggy on my system? Or the
> grab/ungrab things don't work correctly?
>
> If I see it correctly, Andriy Gapon is responsible for these last changes so I
> suppose it would be best to contact him directly and work out a solution?

Just add him on CC (done) and work out the solution on a public list:
this way it helps more than just you and people could learn from how
the debugging is done too. :-)


-- 
Eitan Adler
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


RE: RE: Entering password at GELI prompt using USB keyboard

2014-02-08 Thread perox
Hello again,

finally I was able to "solve" my problem. The culprit was - as suspected - that
GELI uses cngets() instead of gets() since 9.1. I used the old gets() as well as
the related cngetc() and cncheckc() implementations from 9.0 and changed the
call in GELI from cngets() to gets_old(). As a result of this, I can now enter
the password at the GELI prompt again. Now, I am not sure what really causes my
problem as cngets() is not that different from gets() except for the new
cngrab() and cnungrab() calls as well as the the cpu_spinwait() in cngetc() that
wasn't present before. Perhaps cpu_spinwait() is buggy on my system? Or the
grab/ungrab things don't work correctly?

If I see it correctly, Andriy Gapon is responsible for these last changes so I
suppose it would be best to contact him directly and work out a solution?

Regards
 -




---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
http://email.freenet.de/basic/Informationen
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

RE: RE: Entering password at GELI prompt using USB keyboard

2014-02-03 Thread Lars Engels

Am 2014-02-02 16:06, schrieb pe...@freenet.de:

I reverted to GEOM from 9.0 (with the rest of the kernel from 10.0)
and the problem persists. However after pressing a lot of keys, there
indeed was some response from GELI telling my 'wrong passphrase'.


Set "kern.geom.eli.visible_passphrase=2" to see "*" for every keypress.
Maybe some keys are not recognized.
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


RE: RE: Entering password at GELI prompt using USB keyboard

2014-02-02 Thread perox
I reverted to GEOM from 9.0 (with the rest of the kernel from 10.0) and the 
problem persists. However after pressing a lot of keys, there indeed was some 
response from GELI telling my 'wrong passphrase'. 

Intermittently, but not from the beginning, I saw a lot of ukbd polling 
messages. Due to a previous error I have set the polling rate to 
hw.usb.ukbd.pollrate=100. Changing this has no effect whatsoever.

The first ten or so seconds, GELI doesn't respond at all. Then, for no apparent 
reason, a polling loop commences that somehow sparsely passes through 
individual key presses.

The problem seems therefore not to be in GEOM and not in ukbd but rather in the 
interplay of both (via syscons?). Have there been any significant changes from 
9.0 to >= 9.1?

off-topic: Please excuse this terrible webmail stuff, I cannot even respond to 
the proper message. Going to change my provider soon :/




---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
http://email.freenet.de/basic/Informationen
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

RE: RE: Entering password at GELI prompt using USB keyboard

2014-02-02 Thread perox
First results after enabling debug output for ukbd:

My key presses are being processed, I see various ukbd_intr... and key_pressed 
messages. So you were right - the USB driver is not to blame.

Apparentlyhowever, GELI  doesn't receive any key events. I enabled 
kern.geom.eli.visible_passphrase but the GELI prompt doesn't show anything. 
Quite strange...

I'll check geom_eli.c again to maybe identify the changes from 9.0 to 9.1 that 
could be responsible. If anyone has a better suggestion, I'd gladly give it a 
try.

 -



---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
http://email.freenet.de/basic/Informationen
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Re: Entering password at GELI prompt using USB keyboard

2014-02-01 Thread Hans Petter Selasky

On 02/01/14 15:36, pe...@freenet.de wrote:

yep, mountroot is working. That's unfortunately too late for me to enter the 
password:)  If you say USB is most likely not the problem,

> is there a more appropriate mailing list for this? -geli? -stable?

Hi,

You can discuss your findings here too. Else I suggest -current or -hackers.

--HPS

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


RE: RE: Entering password at GELI prompt using USB keyboard

2014-02-01 Thread perox
Hi,

> The problem is not in the USB subsystem. Last time I looked into
> this, the problem was that syscons was going in a terrible polling
> loop, leaving no CPU for other subsystems.
>
> Does the mountroot prompt work?

yep, mountroot is working. That's unfortunately too late for me to enter the 
password :) If you say USB is most likely not the problem, is there a more 
appropriate mailing list for this? -geli? -stable?

> Polling for characters during early boot is a special mode of
> operation for the UKBD driver and it might conflict if there are
> multiple threads trying to get characters from the keyboard.
>
> hw.usb.ukbd.debug=15
>
> Might give you some clues. You might need to hack this into the
> ukbd.c driver when building the kernel.

will do this and report back. Thanks.

 -




---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
http://email.freenet.de/basic/Informationen
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

RE: Entering password at GELI prompt using USB keyboard

2014-02-01 Thread Hans Petter Selasky
Hi,

The problem is not in the USB subsystem. Last time I looked into this, the 
problem was that syscons was going in a terrible polling loop, leaving no CPU 
for other subsystems.

Does the mountroot prompt work?

Polling for characters during early boot is a special mode of operation for the 
UKBD driver and it might conflict if there are multiple threads trying to get 
characters from the keyboard.

hw.usb.ukbd.debug=15

Might give you some clues. You might need to hack this into the ukbd.c driver 
when building the kernel.

--HPS

 
 
-Original message-
> From:pe...@freenet.de     >
> Sent: Saturday 1st February 2014 13:10
> To: freebsd-usb@freebsd.org  
> Subject: Entering password at GELI prompt using USB keyboard
> 
> Hello,
> 
> I have been encountering this problem for almost a year now and I'd really 
> like
> help fixing it. My system only has USB ports and no ps/2 for a keyboard. I'm
> running FreeBSD 9 with an encrypted GELI container for the whole system. The
> kernel resides on a USB key and with 8.1 - 9.0 I was able to enter the GELI
> password using a USB keyboard at the GELI prompt during booting. Since 9.1 
> this
> is not possible anymore and still isn't with 10.0. The GELI prompt either
> doesn't accept any key press or ignores Enter (I can't tell the difference
> because the password is not shown). I already looked at the code but could
> not find significant changes in ukbd.c or the likes from 9.0 to 9.1. However,
> since the GELI code was changed even less I post the question here. Is there
> a possibility to get more debug output except for verbose boot? Can I provide
> other information to help fix the problem?
> 
> Thanks a lot!
> 
> 
> 
> 
> ---
> Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
> http://email.freenet.de/basic/Informationen 
>  
> ___
> freebsd-usb@freebsd.org   mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-usb 
>  
> To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org 
>  "

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"