diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-05-03 01:56:18 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-05-03 01:56:18 +0800 |
| commit | 511da6d35e778aa709571fb48772212567377f0c (patch) | |
| tree | a11545e0b23bb2a25798928576dec00723a43b54 /na/include | |
| parent | 2b237b24c4db5513f8046e15d24501257e7feeaa (diff) | |
| download | lume-511da6d35e778aa709571fb48772212567377f0c.tar.gz lume-511da6d35e778aa709571fb48772212567377f0c.tar.xz | |
feat: enhance KASLR support with early seed metadata and validation checks
Co-authored-by: Copilot <copilot@github.com>
Diffstat (limited to 'na/include')
| -rw-r--r-- | na/include/lume/random.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/na/include/lume/random.h b/na/include/lume/random.h index 0705b1b..740b060 100644 --- a/na/include/lume/random.h +++ b/na/include/lume/random.h @@ -5,6 +5,13 @@ #include <lume/types.h> +enum class RandomSeedSource : uint8 { + Unknown = 0, + FdtProvided, + HwRandom, + CycleFallback, +}; + /* * MI: Machine-Independent Random Number Generator API * @@ -24,3 +31,8 @@ void get_random_bytes(void* buf, size_t len); /* Inject entropy (for future interrupt/device mixing) */ void add_device_randomness(const void* buf, size_t len); + +/* Early-seed metadata (for boot diagnostics/KASLR logs). */ +RandomSeedSource random_early_seed_source(); +uint64 random_early_seed_value(); +const char* random_seed_source_name(RandomSeedSource source); |
