All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [Query] ARM64 kaslr support - randomness, seeding and kdump
Date: Wed, 18 Apr 2018 12:52:26 +0100	[thread overview]
Message-ID: <20180418115225.7hvhsua25rhfqvjs@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <CACi5LpNKbSejFecV+G8X53t4VDwsTvJywWLgLVw9qsD7u6REvg@mail.gmail.com>

On Sun, Apr 15, 2018 at 01:44:16AM +0530, Bhupesh Sharma wrote:
> 4. Accordingly, I wanted to get opinions on whether arm64 timer count is a good
> entropy source on platforms which indeed support EFI_RNG_PROTOCOL?

On its own, the timer is not a good entropy source.

If we have the EFI_RNG_PROTOCOL, we can use that directly.

> And whether we should  be looking to extend 'arch_get_random_*' or
> 'random_get_entropy' for arm64, to provide seed/entropy using APIs
> like 'efi_random_get_seed'?

The EFI RNG protocol is only available during boot services, so we can't
call this during the usual operation of the kernel. The seed the stub
generates into the RNG table is already thrown into the entropy pool by
efi_config_parse_tables(). Look for LINUX_EFI_RANDOM_SEED_TABLE_GUID.

So any attemps to acquire a random number via the usual APIs will in
part be affects by this entropy, and nothing needs to be done to
arch_get_random_* to use this entropy.

Thanks,
Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Bhupesh Sharma <bhsharma@redhat.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Bhupesh SHARMA <bhupesh.linux@gmail.com>,
	kexec@lists.infradead.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [Query] ARM64 kaslr support - randomness, seeding and kdump
Date: Wed, 18 Apr 2018 12:52:26 +0100	[thread overview]
Message-ID: <20180418115225.7hvhsua25rhfqvjs@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <CACi5LpNKbSejFecV+G8X53t4VDwsTvJywWLgLVw9qsD7u6REvg@mail.gmail.com>

On Sun, Apr 15, 2018 at 01:44:16AM +0530, Bhupesh Sharma wrote:
> 4. Accordingly, I wanted to get opinions on whether arm64 timer count is a good
> entropy source on platforms which indeed support EFI_RNG_PROTOCOL?

On its own, the timer is not a good entropy source.

If we have the EFI_RNG_PROTOCOL, we can use that directly.

> And whether we should  be looking to extend 'arch_get_random_*' or
> 'random_get_entropy' for arm64, to provide seed/entropy using APIs
> like 'efi_random_get_seed'?

The EFI RNG protocol is only available during boot services, so we can't
call this during the usual operation of the kernel. The seed the stub
generates into the RNG table is already thrown into the entropy pool by
efi_config_parse_tables(). Look for LINUX_EFI_RANDOM_SEED_TABLE_GUID.

So any attemps to acquire a random number via the usual APIs will in
part be affects by this entropy, and nothing needs to be done to
arch_get_random_* to use this entropy.

Thanks,
Mark.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2018-04-18 11:52 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 20:14 [Query] ARM64 kaslr support - randomness, seeding and kdump Bhupesh Sharma
2018-03-12 20:14 ` Bhupesh Sharma
2018-03-12 20:58 ` Ard Biesheuvel
2018-03-12 20:58   ` Ard Biesheuvel
2018-03-13  1:54   ` Dave Young
2018-03-13  1:54     ` Dave Young
2018-03-13 10:22   ` AKASHI Takahiro
2018-03-13 10:22     ` AKASHI Takahiro
2018-03-13 10:47     ` Mark Rutland
2018-03-13 10:47       ` Mark Rutland
2018-03-13 11:07       ` AKASHI Takahiro
2018-03-13 11:07         ` AKASHI Takahiro
2018-03-13 11:20         ` Mark Rutland
2018-03-13 11:20           ` Mark Rutland
2018-03-13 19:48           ` Bhupesh Sharma
2018-03-13 19:48             ` Bhupesh Sharma
2018-03-14  2:10             ` AKASHI Takahiro
2018-03-14  2:10               ` AKASHI Takahiro
2018-03-14  5:03               ` Bhupesh Sharma
2018-03-14  5:03                 ` Bhupesh Sharma
2018-03-14  6:40                 ` AKASHI Takahiro
2018-03-14  6:40                   ` AKASHI Takahiro
2018-03-14 18:24               ` Mark Rutland
2018-03-14 18:24                 ` Mark Rutland
2018-03-16  9:35                 ` Bhupesh Sharma
2018-03-16  9:35                   ` Bhupesh Sharma
2018-04-06  2:09                   ` AKASHI Takahiro
2018-04-06  2:09                     ` AKASHI Takahiro
2018-04-09  4:01                     ` Bhupesh Sharma
2018-04-09  4:01                       ` Bhupesh Sharma
2018-04-09  4:31                       ` AKASHI Takahiro
2018-04-09  4:31                         ` AKASHI Takahiro
2018-04-09  9:28                         ` Ard Biesheuvel
2018-04-09  9:28                           ` Ard Biesheuvel
2018-04-09  9:39                           ` Baoquan He
2018-04-09  9:39                             ` Baoquan He
2018-04-09 18:28                           ` Bhupesh Sharma
2018-04-09 18:28                             ` Bhupesh Sharma
2018-04-10  0:47                             ` AKASHI Takahiro
2018-04-10  0:47                               ` AKASHI Takahiro
2018-04-14 20:14   ` Bhupesh Sharma
2018-04-14 20:14     ` Bhupesh Sharma
2018-04-18 11:52     ` Mark Rutland [this message]
2018-04-18 11:52       ` Mark Rutland
2018-04-23 20:34       ` Bhupesh Sharma
2018-04-23 20:34         ` Bhupesh Sharma

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=20180418115225.7hvhsua25rhfqvjs@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.