ARM: arm64: Add SMCCC TRNG entropy service
v6 cover ARM: arm64: Add SMCCC TRNG entropy service
Hi,
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!
Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
Cheers,
Andre
==============================
The ARM architected TRNG firmware interface, described in ARM spec DEN0098[1], defines an ARM SMCCC based interface to a true random number generator, provided by firmware.
This series collects all the patches implementing this in various
places: as a user feeding into the ARCH_RANDOM pool, both for ARM and arm64, and as a service provider for KVM guests.
Patch 1 introduces the interface definition used by all three entities. Patch 2 prepares the Arm SMCCC firmware driver to probe for the interface. This patch is needed to avoid a later dependency on *two* patches (there might be a better solution to this problem).
Patch 3 implements the ARM part, patch 4 is the arm64 version. The final patch 5 adds support to provide random numbers to KVM guests.
This was tested on:
- QEMU -kernel (no SMCCC, regression test)
- Juno w/ prototype of the h/w Trusted RNG support
- mainline KVM (SMCCC, but no TRNG: regression test)
- ARM and arm64 KVM guests, using the KVM service in patch 5/5
Based on v5.11-rc2, please let me know if I should rebase it on something else. A git repo is accessible at:
https://gitlab.arm.com/linux-arm/linux-ap/-/commits/smccc-trng/v6/
Cheers,
Andre
[1] https://developer.arm.com/documentation/den0098/latest/
Changelog v5 ... v6:
- *really* fixing order of SMCCC vs. RNDR call in the *_early() version
Changelog v4 ... v5:
- change order of SMCCC call vs. RNDR call in arch_get_random_seed_long_early
- adding Sudeep's R-b: tags
Changelog v3 ... v4:
- include cache.h to always have __ro_after_init defined
- change order of SMCCC call vs. RNDR call in arm64's archrandom.h
- adding LinusW's R-b: tags
Changelog v2 ... v3:
- ARM: fix compilation with randconfig
- arm64: use SMCCC call also in arch_get_random_seed_long_early()
- KVM: comment on return value usage
- KVM: use more interesting UUID (enjoy, Marc!)
- KVM: use bitmaps instead of open coded long arrays
- KVM: drop direct usage of arch_get_random() interface
Changelog "v1" ... v2:
- trigger ARCH_RANDOM initialisation from the SMCCC firmware driver
- use a single bool in smccc.c to hold the initialisation state for arm64
- handle endianess correctly in the KVM provider
Andre Przywara (2):
firmware: smccc: Introduce SMCCC TRNG framework
arm64: Add support for SMCCC TRNG entropy source
Ard Biesheuvel (3):
firmware: smccc: Add SMCCC TRNG function call IDs
ARM: implement support for SMCCC TRNG entropy source
KVM: arm64: implement the TRNG hypervisor call
arch/arm/Kconfig | 4 ++ arch/arm/include/asm/archrandom.h | 74 +++++++++++++++++++++++++ arch/arm64/include/asm/archrandom.h | 82 ++++++++++++++++++++++++---- arch/arm64/include/asm/kvm_host.h | 2 + arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/hypercalls.c | 6 ++ arch/arm64/kvm/trng.c | 85 +++++++++++++++++++++++++++++ drivers/firmware/smccc/smccc.c | 6 ++ include/linux/arm-smccc.h | 31 +++++++++++ 9 files changed, 281 insertions(+), 11 deletions(-) create mode 100644 arch/arm/include/asm/archrandom.h create mode 100644 arch/arm64/kvm/trng.c
Signature · 34 lines
2.17.1 *** BLURB HERE *** Andre Przywara (2): firmware: smccc: Introduce SMCCC TRNG framework arm64: Add support for SMCCC TRNG entropy source Ard Biesheuvel (3): firmware: smccc: Add SMCCC TRNG function call IDs ARM: implement support for SMCCC TRNG entropy source KVM: arm64: implement the TRNG hypervisor call arch/arm/Kconfig | 4 ++ arch/arm/include/asm/archrandom.h | 74 +++++++++++++++++++++++++ arch/arm64/include/asm/archrandom.h | 82 ++++++++++++++++++++++++---- arch/arm64/include/asm/kvm_host.h | 2 + arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/hypercalls.c | 6 ++ arch/arm64/kvm/trng.c | 85 +++++++++++++++++++++++++++++ drivers/firmware/smccc/smccc.c | 6 ++ include/linux/arm-smccc.h | 31 +++++++++++ 9 files changed, 281 insertions(+), 11 deletions(-) create mode 100644 arch/arm/include/asm/archrandom.h create mode 100644 arch/arm64/kvm/trng.c -- 2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
PATCH v6 1/5 firmware: smccc: Add SMCCC TRNG function call IDs
From: Ard Biesheuvel <[email protected]>
The ARM architected TRNG firmware interface, described in ARM spec DEN0098, define an ARM SMCCC based interface to a true random number generator, provided by firmware.
Add the definitions of the SMCCC functions as defined by the spec.
--- include/linux/arm-smccc.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
include/linux/arm-smccc.h +31 -0
@@ -102,6 +102,37 @@ ARM_SMCCC_OWNER_STANDARD_HYP, \ 0x21) +/* TRNG entropy source calls (defined by ARM DEN0098) */ +#define ARM_SMCCC_TRNG_VERSION \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + ARM_SMCCC_OWNER_STANDARD, \ + 0x50) + +#define ARM_SMCCC_TRNG_FEATURES \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + ARM_SMCCC_OWNER_STANDARD, \ + 0x51) + +#define ARM_SMCCC_TRNG_GET_UUID \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + ARM_SMCCC_OWNER_STANDARD, \ + 0x52) + +#define ARM_SMCCC_TRNG_RND32 \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + ARM_SMCCC_OWNER_STANDARD, \ + 0x53) + +#define ARM_SMCCC_TRNG_RND64 \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_64, \ + ARM_SMCCC_OWNER_STANDARD, \ + 0x53) +/* * Return codes defined in ARM DEN 0070A * ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C
Signature · 6 lines
2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
PATCH v6 2/5 firmware: smccc: Introduce SMCCC TRNG framework
In reply to Andre PrzywaraThe ARM DEN0098 document describe an SMCCC based firmware service to deliver hardware generated random numbers. Its existence is advertised according to the SMCCC v1.1 specification.
Add a (dummy) call to probe functions implemented in each architecture (ARM and arm64), to determine the existence of this interface. For now this return false, but this will be overwritten by each architecture's support patch.
--- arch/arm/include/asm/archrandom.h | 10 ++++++++++ arch/arm64/include/asm/archrandom.h | 12 ++++++++++++ drivers/firmware/smccc/smccc.c | 6 ++++++ 3 files changed, 28 insertions(+) create mode 100644 arch/arm/include/asm/archrandom.h
arch/arm/include/asm/archrandom.h new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_ARCHRANDOM_H +#define _ASM_ARCHRANDOM_H + +static inline bool __init smccc_probe_trng (void ) +{ +return false; +} + +#endif /* _ASM_ARCHRANDOM_H */
arch/arm64/include/asm/archrandom.h +12 -0
@@ -8,6 +8,11 @@#include <linux/kernel.h> #include <asm/cpufeature.h> +static inline bool __init smccc_probe_trng (void ) +{ +return false; +} +static inline bool __arm64_rndr (unsigned long *v) {bool ok;
@@ -79,5 +84,12 @@ arch_get_random_seed_long_early(unsigned long *v) }#define arch_get_random_seed_long_early arch_get_random_seed_long_early +#else /* !CONFIG_ARCH_RANDOM */ + +static inline bool __init smccc_probe_trng (void ) +{ +return false; +} +#endif /* CONFIG_ARCH_RANDOM */ #endif /* _ASM_ARCHRANDOM_H */
drivers/firmware/smccc/smccc.c +6 -0
@@ -5,16 +5,22 @@#define pr_fmt (fmt) "smccc: " fmt +#include <linux/cache.h> #include <linux/init.h> #include <linux/arm-smccc.h> +#include <asm/archrandom.h> static u32 smccc_version =ARM_SMCCC_VERSION_1_0 ;static enum arm_smccc_conduit smccc_conduit =SMCCC_CONDUIT_NONE ; +bool __ro_after_init smccc_trng_available = false; +void __init arm_smccc_version_init (u32 version,enum arm_smccc_conduit conduit) { smccc_version = version; smccc_conduit = conduit; + + smccc_trng_available =smccc_probe_trng (); }enum arm_smccc_conduit arm_smccc_1_1_get_conduit (void )
Signature · 6 lines
2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
PATCH v6 3/5 ARM: implement support for SMCCC TRNG entropy source
In reply to Andre PrzywaraFrom: Ard Biesheuvel <[email protected]>
Implement arch_get_random_seed_*() for ARM based on the firmware or hypervisor provided entropy source described in ARM DEN0098.
This will make the kernel's random number generator consume entropy provided by this interface, at early boot, and periodically at runtime when reseeding.
--- arch/arm/Kconfig | 4 ++ arch/arm/include/asm/archrandom.h | 64 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+)
arch/arm/Kconfig +4 -0
@@ -1644,6 +1644,10 @@ config STACKPROTECTOR_PER_TASK Enable this option to switch to a different method that uses a different canary value for each task. +config ARCH_RANDOM + def_bool y + depends on HAVE_ARM_SMCCC_DISCOVERY + endmenu menu "Boot options"
arch/arm/include/asm/archrandom.h +64 -0
73 lines not on this page · raw message
Signature · 6 lines
2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Re: [PATCH v6 3/5] ARM: implement support for SMCCC TRNG entropy source
Quoted 10 lines · Andre Przywara
From: Ard Biesheuvel <[email protected]>
Implement arch_get_random_seed_*() for ARM based on the firmware or hypervisor provided entropy source described in ARM DEN0098.
This will make the kernel's random number generator consume entropy provided by this interface, at early boot, and periodically at runtime when reseeding.
Quoted 6 lines
Cc Linus Walleij <[email protected]>Cc Russell King <[email protected]>Signed-off-by Ard Biesheuvel <[email protected]>[Andre: rework to be initialised by the SMCCC firmware driver]Signed-off-by Andre Przywara <[email protected]>Reviewed-by Linus Walleij <[email protected]>
I think this one could be dropped into rmk's patch tracker now, right?
Quoted 99 lines
--- arch/arm/Kconfig | 4 ++ arch/arm/include/asm/archrandom.h | 64 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+)arch/arm/Kconfig +4
-0@@ -1644,6 +1644,10 @@ config STACKPROTECTOR_PER_TASK Enable this option to switch to a different method that uses a different canary value for each task. +config ARCH_RANDOM + def_bool y + depends on HAVE_ARM_SMCCC_DISCOVERY + endmenu menu "Boot options"arch/arm/include/asm/archrandom.h +64
-1@@ -2,9 +2,73 @@#ifndef _ASM_ARCHRANDOM_H#define _ASM_ARCHRANDOM_H +#ifdef CONFIG_ARCH_RANDOM + +#include <linux/arm-smccc.h> +#include <linux/kernel.h> + +#define ARM_SMCCC_TRNG_MIN_VERSION 0x10000UL + +extern bool smccc_trng_available; + +static inline bool __init smccc_probe_trng (void ) +{ +struct arm_smccc_res res; + +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_VERSION , &res); +if ((s32 )res.a0 <0 ) +return false; +if (res.a0 >=ARM_SMCCC_TRNG_MIN_VERSION ) { +/* double check that the 32-bit flavor is available */ +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_FEATURES , +ARM_SMCCC_TRNG_RND32 , + &res); +if ((s32 )res.a0 >=0 ) +return true; + } + +return false; +} + +static inline bool __must_check arch_get_random_long (unsigned long *v) +{ +return false; +} + +static inline bool __must_check arch_get_random_int (unsigned int *v) +{ +return false; +} + +static inline bool __must_check arch_get_random_seed_long (unsigned long *v) +{ +struct arm_smccc_res res; + +if (smccc_trng_available) { +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_RND32 ,8 *sizeof (*v), &res); + +if (res.a0 !=0 ) +return false; + + *v = res.a3; +return true; + } + +return false; +} + +static inline bool __must_check arch_get_random_seed_int (unsigned int *v) +{ +return arch_get_random_seed_long ((unsigned long *)v); +} + + +#else /* !CONFIG_ARCH_RANDOM */ +static inline bool __init smccc_probe_trng (void ) {return false; } +#endif /* CONFIG_ARCH_RANDOM */ #endif /* _ASM_ARCHRANDOM_H */ --
Quoted 2 lines
2.17.1
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
PATCH v6 4/5 arm64: Add support for SMCCC TRNG entropy source
In reply to Andre PrzywaraThe ARM architected TRNG firmware interface, described in ARM spec DEN0098, defines an ARM SMCCC based interface to a true random number generator, provided by firmware.
This can be discovered via the SMCCC >=v1.1 interface, and provides up to 192 bits of entropy per call.
Hook this SMC call into arm64's arch_get_random_*() implementation, coming to the rescue when the CPU does not implement the ARM v8.5 RNG system registers.
For the detection, we piggy back on the PSCI/SMCCC discovery (which gives us the conduit to use (hvc/smc)), then try to call the ARM_SMCCC_TRNG_VERSION function, which returns -1 if this interface is not implemented.
--- arch/arm64/include/asm/archrandom.h | 72 ++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 11 deletions(-)
arch/arm64/include/asm/archrandom.h +61 -11
@@ -4,13 +4,24 @@#ifdef CONFIG_ARCH_RANDOM +#include <linux/arm-smccc.h> #include <linux/bug.h> #include <linux/kernel.h> #include <asm/cpufeature.h> +#define ARM_SMCCC_TRNG_MIN_VERSION 0x10000UL + +extern bool smccc_trng_available; +static inline bool __init smccc_probe_trng (void ) { -return false; +struct arm_smccc_res res; + +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_VERSION , &res); +if ((s32 )res.a0 <0 ) +return false; + +return res.a0 >=ARM_SMCCC_TRNG_MIN_VERSION ; }static inline bool __arm64_rndr (unsigned long *v)
@@ -43,26 +54,55 @@ static inline bool __must_check arch_get_random_int(unsigned int *v)static inline bool __must_check arch_get_random_seed_long (unsigned long *v) { +struct arm_smccc_res res; + +/* +* We prefer the SMCCC call, since its semantics (return actual +* hardware backed entropy) is closer to the idea behind this +* function here than what even the RNDRSS register provides +* (the output of a pseudo RNG freshly seeded by a TRNG). +*/ +if (smccc_trng_available) { +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_RND64 ,64 , &res); +if ((int )res.a0 >=0 ) { + *v = res.a3; +return true; + } + } +/* * Only support the generic interface after we have detected * the system wide capability, avoiding complexity with the * cpufeature code and with potential scheduling between CPUs * with and without the feature. */ -if (!cpus_have_const_cap (ARM64_HAS_RNG )) -return false; +if (cpus_have_const_cap (ARM64_HAS_RNG ) &&__arm64_rndr (v)) +return true; -return __arm64_rndr (v); +return false; } -static inline bool __must_check arch_get_random_seed_int (unsigned int *v) { +struct arm_smccc_res res;unsigned long val; -bool ok =arch_get_random_seed_long (&val); - *v = val; -return ok; +if (smccc_trng_available) { +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_RND64 ,32 , &res); +if ((int )res.a0 >=0 ) { + *v = res.a3 &GENMASK (31 ,0 ); +return true; + } + } + +if (cpus_have_const_cap (ARM64_HAS_RNG )) { +if (__arm64_rndr (&val)) { + *v = val; +return true; + } + } + +return false; }static inline bool __init __early_cpu_has_rndr (void )
@@ -77,10 +117,20 @@ arch_get_random_seed_long_early(unsigned long *v) {WARN_ON (system_state !=SYSTEM_BOOTING ); -if (!__early_cpu_has_rndr ()) -return false; +if (smccc_trng_available) { +struct arm_smccc_res res; + +arm_smccc_1_1_invoke (ARM_SMCCC_TRNG_RND64 ,64 , &res); +if ((int )res.a0 >=0 ) { + *v = res.a3; +return true; + } + } -return __arm64_rndr (v); +if (__early_cpu_has_rndr () &&__arm64_rndr (v)) +return true; + +return false; }#define arch_get_random_seed_long_early arch_get_random_seed_long_early
Signature · 6 lines
2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Re: [PATCH v6 4/5] arm64: Add support for SMCCC TRNG entropy source
Quoted 5 lines · Andre Przywara
The ARM architected TRNG firmware interface, described in ARM spec DEN0098, defines an ARM SMCCC based interface to a true random number generator, provided by firmware.
This can be discovered via the SMCCC >=v1.1 interface, and provides up to 192 bits of entropy per call.
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
PATCH v6 5/5 KVM: arm64: implement the TRNG hypervisor call
In reply to Andre PrzywaraFrom: Ard Biesheuvel <[email protected]>
Provide a hypervisor implementation of the ARM architected TRNG firmware interface described in ARM spec DEN0098. All function IDs are implemented, including both 32-bit and 64-bit versions of the TRNG_RND service, which is the centerpiece of the API.
The API is backed by the kernel's entropy pool only, to avoid guests draining more precious direct entropy sources.
--- arch/arm64/include/asm/kvm_host.h | 2 + arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/hypercalls.c | 6 +++ arch/arm64/kvm/trng.c | 85 +++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/kvm/trng.c
arch/arm64/include/asm/kvm_host.h +2 -0
@@ -748,4 +748,6 @@ bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu);#define kvm_vcpu_has_pmu (vcpu) \ (test_bit(KVM_ARM_VCPU_PMU_V3, (vcpu)->arch.features)) +int kvm_trng_call (struct kvm_vcpu *vcpu); +#endif /* __ARM64_KVM_HOST_H__ */
arch/arm64/kvm/Makefile +1 -1
@@ -16,7 +16,7 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \ inject_fault.o va_layout.o handle_exit.o \ guest.o debug.o reset.o sys_regs.o \ vgic-sys-reg-v3.o fpsimd.o pmu.o \ - arch_timer.o \ + arch_timer.o trng.o\ vgic/vgic.o vgic/vgic-init.o \ vgic/vgic-irqfd.o vgic/vgic-v2.o \ vgic/vgic-v3.o vgic/vgic-v4.o \
arch/arm64/kvm/hypercalls.c +6 -0
@@ -71,6 +71,12 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu)if (gpa !=GPA_INVALID ) val = gpa;break ; +case ARM_SMCCC_TRNG_VERSION : +case ARM_SMCCC_TRNG_FEATURES : +case ARM_SMCCC_TRNG_GET_UUID : +case ARM_SMCCC_TRNG_RND32 : +case ARM_SMCCC_TRNG_RND64 : +return kvm_trng_call (vcpu);default :return kvm_psci_call (vcpu); }
arch/arm64/kvm/trng.c new file +85 -0
85 lines not on this page · raw message
Signature · 6 lines
2.17.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Will Deacon
maintainerQuoted 10 lines · Andre Przywara
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
[...]
Applied the first patch only to arm64 (for-next/rng), thanks!
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649
What's the plan for the rest of the series, and I think the related change over at [1]?
Cheers,
Signature · 11 lines
Will [1] https://lore.kernel.org/linux-arm-kernel/[email protected]/ https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Quoted 13 lines · Will Deacon
Quoted 10 lines · Andre Przywara
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
[...]
Quoted 8 lines
Applied the first patch only to arm64 (for-next/rng), thanks!
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649What's the plan for the rest of the series, and I think the related change over at [1]?
Given that Ted seems to have lost interest in /dev/random patches, I was hoping [1] could be taken via the arm64 tree instead. Without this patch, I don't think we should expose the SMCCC RNG interface via arch_get_random_seed(), given how insanely often it will be called in that case.
Note that the KVM patch implements the opposite end of this interface, and is not affected by [1] at all, so that can be taken at any time.
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Will Deacon
maintainerQuoted 23 lines · Ard Biesheuvel
Quoted 13 lines · Will Deacon
Quoted 10 lines · Andre Przywara
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
[...]
Quoted 8 lines
Applied the first patch only to arm64 (for-next/rng), thanks!
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649What's the plan for the rest of the series, and I think the related change over at [1]?
Quoted 5 lines
Given that Ted seems to have lost interest in
/dev/randompatches, I was hoping [1] could be taken via the arm64 tree instead. Without this patch, I don't think we should expose the SMCCC RNG interface viaarch_get_random_seed(), given how insanely often it will be called in that case.
Ok, let's give that a shot -- I'll additionally pick patches 2 and 4 out of this series, and merge in the /dev/random change on its own branch in case there are any late objections.
Will
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Marc Zyngier
maintainerQuoted 10 lines · Will Deacon
Quoted 9 lines · Andre Przywara
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
Quoted 6 lines
Quoted 1 line
[...]
Applied the first patch only to arm64 (for-next/rng), thanks!
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649
I can't see how the rest of the patches can go via any other tree if all the definitions are in the first one.
Andre, can you explain what your plan is?
Thanks,
M.
Signature · 5 lines
Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
On Wed, 20 Jan 2021 13:26:26 +0000
Marc Zyngier <[email protected]> wrote:
Hi,
Quoted 17 lines · Will Deacon
Quoted 16 lines · Andre Przywara
Quoted 4 lines
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Quoted 8 lines
Will, Catalin: it would be much appreciated if you could consider taking
patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely
will need to go through different subsystems.[...]
Applied the first patch only to arm64 (for-next/rng), thanks!
Quoted 7 lines
Quoted 2 lines
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649I can't see how the rest of the patches can go via any other tree if all the definitions are in the first one.
Andre, can you explain what your plan is?
Well, I don't really have a great solution for that, other than hoping that 1/5 makes it into Linus' master at some point.
I see that it's a stretch, but pulling 1/5 into 5.11 now would prepare the stage for the others to go via any tree, into 5.12-rc1?
Or you could maybe take both 1/5 and 5/5 into your kvm-arm tree, and would hope that a git rebase later would sort this out for you?
But I think you are much more experienced in those kind of issues, so happy to hear about any other solutions.
Thanks,
Andre
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Will Deacon
maintainerQuoted 33 lines · Andre Przywara
On Wed, 20 Jan 2021 13:26:26 +0000
Marc Zyngier <[email protected]> wrote:Hi,
Quoted 17 lines · Will Deacon
Quoted 16 lines · Andre Przywara
Quoted 4 lines
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Quoted 8 lines
Will, Catalin: it would be much appreciated if you could consider taking
patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely
will need to go through different subsystems.[...]
Applied the first patch only to arm64 (for-next/rng), thanks!
Quoted 7 lines
Quoted 2 lines
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649I can't see how the rest of the patches can go via any other tree if all the definitions are in the first one.
Andre, can you explain what your plan is?
Well, I don't really have a great solution for that, other than hoping that 1/5 makes it into Linus' master at some point.
Quoted 8 lines
I see that it's a stretch, but pulling 1/5 into 5.11 now would prepare the stage for the others to go via any tree, into 5.12-rc1?
Or you could maybe take both 1/5 and 5/5 into your kvm-arm tree, and would hope that a git rebase later would sort this out for you?
But I think you are much more experienced in those kind of issues, so happy to hear about any other solutions.
for-next/rng is a stable branch, so anybody who wants the first patch can just pull it (without anything I queue on top).
Will
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Marc Zyngier
maintainerQuoted 37 lines · Will Deacon
Quoted 36 lines · Andre Przywara
On Wed, 20 Jan 2021 13:26:26 +0000
Marc Zyngier <[email protected]> wrote:Hi,
Quoted 17 lines · Will Deacon
Quoted 16 lines · Andre Przywara
Quoted 4 lines
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Quoted 8 lines
Will, Catalin: it would be much appreciated if you could consider taking
patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely
will need to go through different subsystems.[...]
Applied the first patch only to arm64 (for-next/rng), thanks!
Quoted 7 lines
Quoted 2 lines
[1/5] firmware: smccc: Add SMCCC TRNG function call IDs
https://git.kernel.org/arm64/c/67c6bb56b649I can't see how the rest of the patches can go via any other tree if all the definitions are in the first one.
Andre, can you explain what your plan is?
Well, I don't really have a great solution for that, other than hoping that 1/5 makes it into Linus' master at some point.
I see that it's a stretch, but pulling 1/5 into 5.11 now would prepare the stage for the others to go via any tree, into 5.12-rc1?
Quoted 8 lines
Quoted 5 lines
Or you could maybe take both 1/5 and 5/5 into your kvm-arm tree, and would hope that a git rebase later would sort this out for you?
But I think you are much more experienced in those kind of issues, so happy to hear about any other solutions.
for-next/rng is a stable branch, so anybody who wants the first patch can just pull it (without anything I queue on top).
OK. I'll pull that branch and stash the KVM stuff on top.
Thanks,
M.
Signature · 5 lines
Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Re: (subset) [PATCH v6 0/5] ARM: arm64: Add SMCCC TRNG entropy service
In reply to Andre PrzywaraQuoted 10 lines · Andre Przywara
a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR in
arch_get_random_seed_long_early(). Apologies for messing this up in v5 and thanks to broonie for being on the watch!Will, Catalin: it would be much appreciated if you could consider taking patch 1/5. This contains the common definitions, and is a prerequisite for every other patch, although they are somewhat independent and likely will need to go through different subsystems.
[...]
Applied to kvm-arm64/rng-5.12, thanks!
[5/5] KVM: arm64: implement the TRNG hypervisor call
commit: a8e190cdae1bf8e9e490776b8179babc1962bb25
Cheers,
M.
Signature · 7 lines
Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm