All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, mario.limonciello@dell.com
Cc: linux-efi@vger.kernel.org
Subject: efistub: EFI_RNG_PROTOCOL on Dell Inc. Latitude 7390
Date: Mon, 28 Oct 2019 08:20:36 +0100	[thread overview]
Message-ID: <20191028072036.GA113601@owl.dominikbrodowski.net> (raw)
In-Reply-To: <20191005113753.GA77634@light.dominikbrodowski.net>

Ard, Mario,

in theory, invoking EFI_RNG_PROTOCOL on a Dell Inc. Latitude 7390/09386V,
BIOS 1.9.2 04/03/2019, should work fine as the system provides EFI v2.60.
Using my patch from a few weeks ago[1], efi_random_get_seed() is called from
arch/x86/boot/compressed/eboot.c::efi_main(). In efi_random_get_seed(), the
calls to

	status = efi_call_early(locate_protocol, &rng_proto, NULL,
				(void **)&rng);

and

	status = efi_call_early(allocate_pool, EFI_RUNTIME_SERVICES_DATA,
				sizeof(*seed) + EFI_RANDOM_SEED_SIZE,
				(void **)&seed);

succeed. However,

	status = rng->get_rng(rng, &rng_algo_raw, EFI_RANDOM_SEED_SIZE,
			      seed->bits);

returns EFI_INVALID_PARAMETER, though I can't see why one of these
parameters is invalid. When trying to use the default rng algorithm (by
modifying the test to "(status != EFI_SUCCESS)"),

		status = rng->get_rng(rng, NULL, EFI_RANDOM_SEED_SIZE,
				      seed->bits);

the call doesn't seem to return.

Any ideas?

Best,
	Dominik


[1] https://lore.kernel.org/lkml/20191005113753.GA77634@light.dominikbrodowski.net/

  parent reply	other threads:[~2019-10-28  7:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05 11:37 [RFC PATCH] arch/x86: efistub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table Dominik Brodowski
2019-10-09 13:18 ` Ard Biesheuvel
2019-10-28  7:20 ` Dominik Brodowski [this message]
2019-10-28  7:46   ` efistub: EFI_RNG_PROTOCOL on Dell Inc. Latitude 7390 Ard Biesheuvel
2019-10-28  8:40     ` Dominik Brodowski
2019-10-28  8:56       ` Ard Biesheuvel
2019-10-28 10:51         ` Ard Biesheuvel
2019-10-28 11:47           ` Dominik Brodowski
2019-10-28 12:02             ` Ard Biesheuvel
2019-10-31 15:30         ` Mario.Limonciello
2019-10-31 13:33   ` Mario.Limonciello

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=20191028072036.GA113601@owl.dominikbrodowski.net \
    --to=linux@dominikbrodowski.net \
    --cc=ard.biesheuvel@linaro.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=mario.limonciello@dell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.