From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1awOZc-0001yA-CL for mharc-grub-devel@gnu.org; Sat, 30 Apr 2016 02:40:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awOZT-0001aw-Gf for grub-devel@gnu.org; Sat, 30 Apr 2016 02:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awOZH-0002Fx-Ru for grub-devel@gnu.org; Sat, 30 Apr 2016 02:40:02 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:34914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awOZG-00029k-Ib for grub-devel@gnu.org; Sat, 30 Apr 2016 02:39:55 -0400 Received: by mail-lf0-x233.google.com with SMTP id j8so7958709lfd.2 for ; Fri, 29 Apr 2016 23:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=oM6LY5vrhOf58/s9dGqV1UH9e9f/B0bT+FcFUl8D7iE=; b=zBFN4e60JmFI6HlS0sa2hczNIOP159CgCiaUj+5tprxXo6bT2WbJv2ILt3rB4XYKf3 BEBi0GCYZWU652yQRweehUBXt9pe3O4ISRQRX1eoIPIHicXh67wcqzf118IwMO2dwvlT kJR0KlGmwtu8pyU8E5rBmEQd0B8yVFtHLr8TgV1F/i6Bmz0UqwXYfIact4XZOyhyaUcK lkq+SUzx4zPnP5fwFocQcPnJW4RnOyayRsy/ttsVqR12n6GeeVa/Bl0u0vZV8RWomTab +mOImk6WeE8iCYsdrVgo0KnPM0cFq9rpr8j0xnClttLBrueHZ6aeMfS+6hgDjpbXIVzq 9D1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=oM6LY5vrhOf58/s9dGqV1UH9e9f/B0bT+FcFUl8D7iE=; b=NqG5JuGaKH0pBEjzH6Mh5cSnUU+JPy3GoZuVuAcoGyoJeWrn0YAPQyG9HHAV3d7Q58 ltUGPnGqwdMkLdiMrnwA+rsNQLUTiVUVu016SYClK4fmuFYFLcOIsM9kI0mJ/4TPvlwO jQfnR0yJ10Eeq/cyREiFsEtDuSxnSmT7HEwbUKvWinxT8yu5m56PxeHp5NoBd4xtKCBk hSLAaXYxNI3Oo4dKfsG8Lczm2UkB8Zp4lUKirxRSWr2FMxSBPOr5oevtS7UEoTzhKboz Amlx550Xjp5Gq9hXlED71O81CsQAcFerPCLFm8cz07YgH+M9xbU/f5xjhnFone11d668 5eMg== X-Gm-Message-State: AOPr4FVM3gEz6qV1+I972oIP67u4rMnMUGo+W0l4fVsJjPKdx1P1m6WXiCxk4BeZ2AcJDw== X-Received: by 10.25.169.144 with SMTP id s138mr10792394lfe.108.1461998376611; Fri, 29 Apr 2016 23:39:36 -0700 (PDT) Received: from [192.168.1.42] (ppp109-252-90-74.pppoe.spdop.ru. [109.252.90.74]) by smtp.gmail.com with ESMTPSA id u133sm2264290lff.5.2016.04.29.23.39.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Apr 2016 23:39:35 -0700 (PDT) Subject: Re: [PATCH] efi term: open input console exlusively To: The development of GNU GRUB , kernel-team@fb.com References: <1461867273-6292-1-git-send-email-jbacik@fb.com> From: Andrei Borzenkov X-Enigmail-Draft-Status: N1110 Message-ID: <57245326.80808@gmail.com> Date: Sat, 30 Apr 2016 09:39:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1461867273-6292-1-git-send-email-jbacik@fb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2016 06:40:13 -0000 28.04.2016 21:14, Josef Bacik пишет: > We've had issues with a bunch of our EFI machines getting random console input > from God knows where. This stops our provisioning because the timeout countdown > stops as it thinks we pressed a button, which we most certaintly did not. So > open the input console in exclusive mode to make sure only the guy behind the > wheel gets to type. I do not understand how it can fix your issue except by unintentional side effect, sorry. Exclusive open will (attempt to) detach other *consumers* of this protocol, but he problem is related to suppliers. While it is possible that some driver that opens console also somehow feeds input into it, it looks like too heavy hammer, sorry. We really need better understanding what happens here. > With this patch we can no provision these weird machines. > Thanks, > > Signed-off-by: Josef Bacik > --- > grub-core/term/efi/console.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c > index 7d31095..5be8530 100644 > --- a/grub-core/term/efi/console.c > +++ b/grub-core/term/efi/console.c > @@ -201,7 +201,7 @@ grub_efi_console_input_init (struct grub_term_input *term) > > text_input = grub_efi_open_protocol(grub_efi_system_table->console_in_handler, > &text_input_ex_guid, > - GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); > + GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); > term->data = (void *)text_input; > > return 0; >