Skip to content

Seed entropy using arm rng#2528

Open
sbutz wants to merge 1 commit into
hermit-os:mainfrom
sbutz:sb/seed_arm_rng
Open

Seed entropy using arm rng#2528
sbutz wants to merge 1 commit into
hermit-os:mainfrom
sbutz:sb/seed_arm_rng

Conversation

@sbutz

@sbutz sbutz commented Jul 6, 2026

Copy link
Copy Markdown

Implement missing entropy seeding on ARM.
ArmRng Implentation
ARM Doc

For RISC-V we could leverage the optional Zkr extension.
RISC-V Doc
Changes follow in separate PR.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 9f0a752 Previous: 496a427 Performance Ratio
startup_benchmark Build Time 81.54 s 80.41 s 1.01
startup_benchmark File Size 0.80 MB 0.80 MB 1.00
Startup Time - 1 core 0.73 s (±0.02 s) 0.73 s (±0.02 s) 1.00
Startup Time - 2 cores 0.74 s (±0.03 s) 0.73 s (±0.02 s) 1.01
Startup Time - 4 cores 0.75 s (±0.02 s) 0.74 s (±0.02 s) 1.01
multithreaded_benchmark Build Time 82.38 s 81.45 s 1.01
multithreaded_benchmark File Size 0.86 MB 0.86 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 86.06 % (±6.13 %) 89.19 % (±7.29 %) 0.96
Multithreaded Pi Efficiency - 4 Threads 43.62 % (±2.90 %) 43.23 % (±2.22 %) 1.01
Multithreaded Pi Efficiency - 8 Threads 25.31 % (±1.09 %) 25.70 % (±1.35 %) 0.98
micro_benchmarks Build Time 80.50 s 80.50 s 1.00
micro_benchmarks File Size 0.86 MB 0.86 MB 1.00
Scheduling time - 1 thread 62.80 ticks (±2.41 ticks) 61.77 ticks (±3.53 ticks) 1.02
Scheduling time - 2 threads 36.69 ticks (±6.19 ticks) 34.80 ticks (±4.41 ticks) 1.05
Micro - Time for syscall (getpid) 3.26 ticks (±0.52 ticks) 3.24 ticks (±0.53 ticks) 1.01
Memcpy speed - (built_in) block size 4096 83131.48 MByte/s (±57643.58 MByte/s) 82518.62 MByte/s (±57031.72 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 30811.11 MByte/s (±24881.04 MByte/s) 30748.73 MByte/s (±24797.64 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 26551.08 MByte/s (±21961.00 MByte/s) 26790.22 MByte/s (±22121.79 MByte/s) 0.99
Memset speed - (built_in) block size 4096 82937.08 MByte/s (±57507.83 MByte/s) 82944.82 MByte/s (±57257.89 MByte/s) 1.00
Memset speed - (built_in) block size 1048576 31549.46 MByte/s (±25331.06 MByte/s) 31513.05 MByte/s (±25249.82 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 27256.00 MByte/s (±22390.87 MByte/s) 27578.05 MByte/s (±22634.55 MByte/s) 0.99
Memcpy speed - (rust) block size 4096 74555.22 MByte/s (±52060.91 MByte/s) 77062.45 MByte/s (±53546.55 MByte/s) 0.97
Memcpy speed - (rust) block size 1048576 30489.75 MByte/s (±24701.75 MByte/s) 30445.41 MByte/s (±24660.75 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 25407.43 MByte/s (±21008.45 MByte/s) 27553.35 MByte/s (±22787.50 MByte/s) 0.92
Memset speed - (rust) block size 4096 74921.52 MByte/s (±52341.94 MByte/s) 77521.43 MByte/s (±53878.01 MByte/s) 0.97
Memset speed - (rust) block size 1048576 31250.07 MByte/s (±25169.27 MByte/s) 31217.22 MByte/s (±25122.56 MByte/s) 1.00
Memset speed - (rust) block size 16777216 26152.79 MByte/s (±21499.91 MByte/s) 28357.26 MByte/s (±23299.40 MByte/s) 0.92
alloc_benchmarks Build Time 75.15 s 75.20 s 1.00
alloc_benchmarks File Size 0.87 MB 0.87 MB 1.00
Allocations - Allocation success 91.31 % 91.31 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.44 % 61.44 % 1
Allocations - Average Allocation time 5746.48 Ticks (±216.02 Ticks) 5199.04 Ticks (±177.30 Ticks) 1.11
Allocations - Average Allocation time (no fail) 6383.51 Ticks (±212.67 Ticks) 5969.39 Ticks (±137.74 Ticks) 1.07
Allocations - Average Deallocation time 1373.38 Ticks (±384.48 Ticks) 1612.60 Ticks (±268.46 Ticks) 0.85
mutex_benchmark Build Time 80.18 s 76.02 s 1.05
mutex_benchmark File Size 0.86 MB 0.86 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 12.18 ns (±0.52 ns) 11.94 ns (±0.37 ns) 1.02
Mutex Stress Test Average Time per Iteration - 2 Threads 40.32 ns (±2.69 ns) 40.06 ns (±2.30 ns) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@sbutz sbutz force-pushed the sb/seed_arm_rng branch from e279038 to 414125f Compare July 6, 2026 11:50
@mkroening mkroening self-assigned this Jul 6, 2026
@sbutz sbutz marked this pull request as ready for review July 6, 2026 12:46

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great! :)

Comment thread src/arch/aarch64/kernel/processor.rs Outdated
Comment thread src/arch/aarch64/kernel/processor.rs Outdated
Comment thread src/arch/aarch64/kernel/processor.rs Outdated
@mkroening

Copy link
Copy Markdown
Member

I have opened #2544 to enable the CPU feature in CI.

Tested successfully on qemu with `-cpu neoverse-v1`.
@sbutz sbutz force-pushed the sb/seed_arm_rng branch from 414125f to 9f0a752 Compare July 10, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants