Project

General

Profile

Bug #7608

boot2 will deadlock if extended keys are used on text input

Added by Toomas Soome almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2016-12-04
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:
Medium
Tags:
needs-triage

Description

The boot2 stage (gptzfsboot) does present ~5 second time window to interrupt automatic boot and get boot: prompt, unfortunately this text entry has problem, allowing to trigger infinite loop.

See also: https://reviews.freebsd.org/D8608


Subtasks

Feature #7643: loader: gptzfsboot getstr() should process extended keysResolvedToomas Soome

Actions
Bug #7644: loader: gptzfsboot getchar() should return ascii codes from xgetc()ResolvedToomas Soome

Actions

History

#1

Updated by Toomas Soome almost 3 years ago

The problem is about avoiding the noise from some systems, generating
false key events with scan code 1 and ascii code 00, so the code
does attempt to filter such cases out. Unfortunately the extended keys
also set ascii 0, and therefore the pressed key event is ignored and
the keypress is never read, resulting in infinite loop.

The solution is to move the check to keyhit() function and to allow
the rest of the code to process the extended keys.

#2

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed

git commit fcd334223a4d858a57152c6578a93eb8791a634f

commit  fcd334223a4d858a57152c6578a93eb8791a634f
Author: Toomas Soome <tsoome@me.com>
Date:   2016-12-13T21:54:06.000Z

    7608 boot2 will deadlock if extended keys are used on text input
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF