grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>, kernel-team@fb.com
Subject: Re: [PATCH] efi term: open input console exlusively
Date: Sat, 30 Apr 2016 09:39:34 +0300	[thread overview]
Message-ID: <57245326.80808@gmail.com> (raw)
In-Reply-To: <1461867273-6292-1-git-send-email-jbacik@fb.com>

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 <jbacik@fb.com>
> ---
>  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;
> 



      reply	other threads:[~2016-04-30  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 18:14 [PATCH] efi term: open input console exlusively Josef Bacik
2016-04-30  6:39 ` Andrei Borzenkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57245326.80808@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=kernel-team@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).