smuellerDD / lrng

Linux Random Number Generator
http://www.chronox.de/lrng
68 stars 11 forks source link

v51 failing build on arm64 kernel 5.4.191 #35

Closed jancheta closed 9 months ago

jancheta commented 9 months ago

Hello Stephan,

Appreciate all the help you gave earlier this year when I was porting LRNG to one of our devices.

We are not working on another device here. linux kernel version:

root:/# uname -a
Linux 5.4.191-perf #1 SMP PREEMPT Tue Dec 12 12:33:46 UTC 2023 aarch64 GNU/Linux

I applied all the appropriate patches under tag v51 (this must have been just before you released v52) Unrelated to my issue, but would you recommend moving over to v52?

I noticed in another issue (https://github.com/smuellerDD/lrng/issues/32) you mentioned I would be able to remove the archrandom.h include and remove the _early suffix from arch_get_random_seed_long_early and arch_get_random_long_early since I was running into those same issues.

The next build issue I am running into is the below:

In file included from drivers/char/lrng/lrng_drng_mgr.c:17:
drivers/char/lrng/lrng_drng_chacha20.h: In function 'lrng_cc20_init_rfc7539':
drivers/char/lrng/lrng_drng_chacha20.h:31:9: error: implicit declaration of function 'chacha_init_consts' [-Werror=implicit-function-declaration]
   31 |         chacha_init_consts(chacha20->constants);
      |         ^~~~~~~~~~~~~~~~~~

My LRNG kernel configs:

CONFIG_LRNG=y

#
# Linux Random Number Generator Configuration
#
CONFIG_LRNG_SHA256=y
CONFIG_LRNG_COMMON_DEV_IF=y
CONFIG_LRNG_DRNG_ATOMIC=y

#
# Specific DRNG seeding strategies
#
# CONFIG_LRNG_AIS2031_NTG1_SEEDING_STRATEGY is not set
# end of Specific DRNG seeding strategies

#
# LRNG Interfaces
#
CONFIG_LRNG_KCAPI_IF=y
CONFIG_LRNG_HWRAND_IF=y
CONFIG_LRNG_DEV_IF=y
# end of LRNG Interfaces

#
# Entropy Source Configuration
#
# CONFIG_LRNG_RUNTIME_ES_CONFIG is not set

#
# Common Timer-based Entropy Source Configuration
#
CONFIG_LRNG_RCT_CUTOFF=31
CONFIG_LRNG_RCT_CUTOFF_PERMANENT=81
CONFIG_LRNG_APT_CUTOFF=325
CONFIG_LRNG_APT_CUTOFF_PERMANENT=371

#
# Interrupt Entropy Source
#

#
# Jitter RNG Entropy Source
#
CONFIG_LRNG_JENT=y
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_DISABLED is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_32 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_64 is not set
CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_128=y
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_256 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_512 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_1024 is not set
CONFIG_LRNG_JENT_ENTROPY_BLOCKS=128
CONFIG_LRNG_JENT_ENTROPY_RATE=256

#
# CPU Entropy Source
#
# CONFIG_LRNG_CPU is not set
CONFIG_LRNG_CPU_FULL_ENT_MULTIPLIER=1

#
# Scheduler Entropy Source
#
# CONFIG_LRNG_SCHED is not set

#
# Kernel RNG Entropy Source
#
# CONFIG_LRNG_KERNEL_RNG is not set
# end of Entropy Source Configuration

CONFIG_LRNG_DRNG_CHACHA20=y
CONFIG_LRNG_DRBG=m
CONFIG_LRNG_DRNG_KCAPI=m
CONFIG_LRNG_SWITCH=y
CONFIG_LRNG_SWITCH_HASH=y
CONFIG_LRNG_HASH_KCAPI=y
CONFIG_LRNG_SWITCH_DRNG=y
CONFIG_LRNG_SWITCH_DRBG=m
CONFIG_LRNG_SWITCH_DRNG_KCAPI=m
CONFIG_LRNG_DFLT_DRNG_CHACHA20=y
# CONFIG_LRNG_DFLT_DRNG_DRBG is not set
# CONFIG_LRNG_DFLT_DRNG_KCAPI is not set
# CONFIG_LRNG_TESTING_MENU is not set
CONFIG_LRNG_SELFTEST=y
# CONFIG_LRNG_SELFTEST_PANIC is not set
# end of Linux Random Number Generator Configuration
jancheta commented 9 months ago

I have no idea if this is right but I made the below change to see if there would be any more build errors. I just copied the constants that were part of the #define LRNG_CC20_INIT_RFC7539

static inline void lrng_cc20_init_rfc7539(struct chacha20_block *chacha20)
{
    // chacha_init_consts(chacha20->constants);
    chacha20->constants[0] = 0x61707865;
    chacha20->constants[1] = 0x3320646e;
    chacha20->constants[2] = 0x79622d32;
    chacha20->constants[3] = 0x6b206574;
}

This seem to work as expected then:

root@D:/# dmesg | grep -i lrng
[    2.114624] lrng_selftest: LRNG self-tests passed
[    3.493373] lrng_drng_mgr: Initial DRNG initialized triggering first seeding
[    3.500628] lrng_es_mgr: LRNG fully operational
[    3.505285] lrng_es_mgr: LRNG fully seeded with 256 bits of entropy
[    3.511733] lrng_hash_kcapi: Hash sha512 allocated
[    3.516660] lrng_switch: Conditioning function allocated for DRNG for NUMA node 0
smuellerDD commented 9 months ago

Am Donnerstag, 14. Dezember 2023, 03:45:55 CET schrieb jancheta:

Hi jancheta,

Hello Stephan,

Appreciate all the help you gave earlier this year when I was porting LRNG to one of our devices.

We are not working on another device here. linux kernel version:


root:/# uname -a
Linux 5.4.191-perf #1 SMP PREEMPT Tue Dec 12 12:33:46 UTC 2023 aarch64
GNU/Linux ```
I applied all the appropriate patches under tag v51 (this must have been
just before you released v52) Unrelated to my issue, but would you
recommend moving over to v52?

There is not any difference between the two, so there is no need to move.

I noticed in another issue (https://github.com/smuellerDD/lrng/issues/32) you mentioned I would be able to remove the archrandom.h include and remove the _early suffix from arch_get_random_seed_long_early and arch_get_random_long_early since I was running into those same issues.

The next build issue I am running into is the below:


In file included from drivers/char/lrng/lrng_drng_mgr.c:17:
drivers/char/lrng/lrng_drng_chacha20.h: In function
'lrng_cc20_init_rfc7539': drivers/char/lrng/lrng_drng_chacha20.h:31:9:
error: implicit declaration of function 'chacha_init_consts'
[-Werror=implicit-function-declaration] 31 |        
chacha_init_consts(chacha20->constants);

Really, the function chacha_init_consts is not present? That is truly strange, because it ought to be present. At least when I test the LTS kernels, I never saw any issue here.

In any case you can apply the patch backports/v45-5.4/v45-08- chacha_constants.patch which replaces this function with the actual initialization.

Ciao Stephan

smuellerDD commented 9 months ago

Am Donnerstag, 14. Dezember 2023, 04:06:57 CET schrieb jancheta:

Hi jancheta,

I have no idea if this is right but I made the below change to see if there would be any more build errors. I just copied the constants that were part of the #define LRNG_CC20_INIT_RFC7539 ``` static inline void lrng_cc20_init_rfc7539(struct chacha20_block *chacha20) { // chacha_init_consts(chacha20->constants); chacha20->constants[0] = 0x61707865; chacha20->constants[1] = 0x3320646e; chacha20->constants[2] = 0x79622d32; chacha20->constants[3] = 0x6b206574; }

Exactly, that is the content of the patch I mentioned in the other email.

This seem to work as expected then:


***@***.***:/# dmesg | grep -i lrng
[    2.114624] lrng_selftest: LRNG self-tests passed
[    3.493373] lrng_drng_mgr: Initial DRNG initialized triggering first
seeding [    3.500628] lrng_es_mgr: LRNG fully operational
[    3.505285] lrng_es_mgr: LRNG fully seeded with 256 bits of entropy
[    3.511733] lrng_hash_kcapi: Hash sha512 allocated
[    3.516660] lrng_switch: Conditioning function allocated for DRNG for
NUMA node 0 ```

Ciao Stephan

jancheta commented 9 months ago

Great thanks for the help!

jancheta commented 9 months ago

So somehow the kernel side development I was working with is different than building it our CI pipeline. I am still trying to figure out what that is but I was wondering if you could provide any insight on what I can do to fix the below issues? Are my configs not quite right?

| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:120:6: error: conflicting types for 'add_hwgenerator_randomness'
| void add_hwgenerator_randomness(const void *buffer, size_t count,
|      ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/hw_random.h:64:13: note: previous declaration is here
| extern void add_hwgenerator_randomness(const char *buffer, size_t count, size_t entropy);
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:149:13: error: conflicting types for 'add_bootloader_randomness'
| void __init add_bootloader_randomness(const void *buf, size_t size)
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/random.h:22:13: note: previous declaration is here
| extern void add_bootloader_randomness(const void *, unsigned int);
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:184:6: error: conflicting types for 'add_device_randomness'
| void add_device_randomness(const void *buf, size_t size)
|      ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/random.h:21:13: note: previous declaration is here
| extern void add_device_randomness(const void *, unsigned int);
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:197:6: error: conflicting types for 'add_interrupt_randomness'
| void add_interrupt_randomness(int irq) { }
|      ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/random.h:36:13: note: previous declaration is here
| extern void add_interrupt_randomness(int irq, int irq_flags) __latent_entropy;
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:297:6: error: conflicting types for 'get_random_bytes'
| void get_random_bytes(void *buf, size_t nbytes)
|      ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/random.h:38:13: note: previous declaration is here
| extern void get_random_bytes(void *buf, int nbytes);
|             ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kernel.c:338:21: error: conflicting types for 'get_random_bytes_arch'
| size_t __must_check get_random_bytes_arch(void *buf, size_t nbytes)
|                     ^
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/include/linux/random.h:44:25: note: previous declaration is here
| extern int __must_check get_random_bytes_arch(void *buf, int nbytes);
|                         ^
| 6 errors generated.
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/scripts/Makefile.build:288: recipe for target 'drivers/char/lrng/lrng_interface_random_kernel.o' failed
| make[4]: *** [drivers/char/lrng/lrng_interface_random_kernel.o] Error 1
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/scripts/Makefile.build:558: recipe for target 'drivers/char/lrng' failed
| make[3]: *** [drivers/char/lrng] Error 2
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/work-shared/janus/kernel-source/scripts/Makefile.build:558: recipe for target 'drivers/char' failed
| make[2]: *** [drivers/char] Error 2
| make[2]: *** Waiting for unfinished jobs....

These are the current LRNG configs I have ended up with so far:

# CONFIG_RANDOM_DEFAULT_IMPL is not set
CONFIG_LRNG_AUTO_SELECTED=y
CONFIG_LRNG=y

#
# Linux Random Number Generator Configuration
#
CONFIG_LRNG_SHA256=y
CONFIG_LRNG_COMMON_DEV_IF=y
CONFIG_LRNG_DRNG_ATOMIC=y
CONFIG_LRNG_SYSCTL=y
CONFIG_LRNG_RANDOM_IF=y

#
# Specific DRNG seeding strategies
#
# CONFIG_LRNG_AIS2031_NTG1_SEEDING_STRATEGY is not set
# end of Specific DRNG seeding strategies

#
# LRNG Interfaces
#
CONFIG_LRNG_KCAPI_IF=y
CONFIG_LRNG_HWRAND_IF=y
CONFIG_LRNG_DEV_IF=y
# end of LRNG Interfaces

#
# Entropy Source Configuration
#
CONFIG_LRNG_RUNTIME_ES_CONFIG=y

#
# Common Timer-based Entropy Source Configuration
#
CONFIG_LRNG_RCT_CUTOFF=31
CONFIG_LRNG_RCT_CUTOFF_PERMANENT=81
CONFIG_LRNG_APT_CUTOFF=325
CONFIG_LRNG_APT_CUTOFF_PERMANENT=371

#
# Interrupt Entropy Source
#
# CONFIG_LRNG_IRQ is not set

#
# Jitter RNG Entropy Source
#
CONFIG_LRNG_JENT=y
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_DISABLED is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_32 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_64 is not set
CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_128=y
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_256 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_512 is not set
# CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_1024 is not set
CONFIG_LRNG_JENT_ENTROPY_BLOCKS=128
CONFIG_LRNG_JENT_ENTROPY_RATE=16

#
# CPU Entropy Source
#
# CONFIG_LRNG_CPU is not set
CONFIG_LRNG_CPU_FULL_ENT_MULTIPLIER=1

#
# Scheduler Entropy Source
#
# CONFIG_LRNG_SCHED is not set

#
# Kernel RNG Entropy Source
#
# end of Entropy Source Configuration

CONFIG_LRNG_DRNG_CHACHA20=y
CONFIG_LRNG_DRBG=y
CONFIG_LRNG_SWITCH=y
# CONFIG_LRNG_SWITCH_HASH is not set
CONFIG_LRNG_SWITCH_DRNG=y
CONFIG_LRNG_SWITCH_DRBG=y
CONFIG_LRNG_DFLT_DRNG_CHACHA20=y
# CONFIG_LRNG_TESTING_MENU is not set
CONFIG_LRNG_SELFTEST=y
# CONFIG_LRNG_SELFTEST_PANIC is not set
# end of Linux Random Number Generator Configuration

Thanks for any help you can provide! -Justin

smuellerDD commented 9 months ago

Am Dienstag, 19. Dezember 2023, 04:10:06 CET schrieb jancheta:

Hi jancheta,

So somehow the kernel side development I was working with is different than building it our CI pipeline. I am still trying to figure out what that is but I was wondering if you could provide any insight on what I can do to fix the below issues? Are my configs not quite right?

See below



| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:120:6: error: conflicting types for 'add_hwgenerator_randomness' void
| add_hwgenerator_randomness(const void *buffer, size_t count,
| 
|      ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/hw_random.h:64:13: note:
| previous declaration is here extern void add_hwgenerator_randomness(const
| char *buffer, size_t count, size_t entropy);| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:149:13: error: conflicting types for 'add_bootloader_randomness' void
| __init add_bootloader_randomness(const void *buf, size_t size)| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/random.h:22:13: note: previous
| declaration is here extern void add_bootloader_randomness(const void *,
| unsigned int);| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:184:6: error: conflicting types for 'add_device_randomness' void
| add_device_randomness(const void *buf, size_t size)
| 
|      ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/random.h:21:13: note: previous
| declaration is here extern void add_device_randomness(const void *,
| unsigned int);
| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:197:6: error: conflicting types for 'add_interrupt_randomness' void
| add_interrupt_randomness(int irq) { }
| 
|      ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/random.h:36:13: note: previous
| declaration is here extern void add_interrupt_randomness(int irq, int
| irq_flags) __latent_entropy;| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:297:6: error: conflicting types for 'get_random_bytes' void
| get_random_bytes(void *buf, size_t nbytes)
| 
|      ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/random.h:38:13: note: previous
| declaration is here extern void get_random_bytes(void *buf, int nbytes);
| 
|             ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/drivers/char/lrng/lrng_interface_random_kern
| el.c:338:21: error: conflicting types for 'get_random_bytes_arch' size_t
| __must_check get_random_bytes_arch(void *buf, size_t nbytes)| 
|                     ^
| 
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/include/linux/random.h:44:25: note: previous
| declaration is here extern int __must_check get_random_bytes_arch(void
| *buf, int nbytes);| 
|                         ^
| 
| 6 errors generated.
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/scripts/Makefile.build:288: recipe for
| target 'drivers/char/lrng/lrng_interface_random_kernel.o' failed make[4]:
| *** [drivers/char/lrng/lrng_interface_random_kernel.o] Error 1
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/w
| ork-shared/janus/kernel-source/scripts/Makefile.build:558: recipe for
| target 'drivers/char/lrng' failed make[3]: *** [drivers/char/lrng] Error
| 2
| /home/jenkins/janus/apps_proc/build-qti-distro-fullstack-perf/tmp-glibc/wo
| rk-shared/janus/kernel-source/scripts/Makefile.build:558: recipe for
| target 'drivers/char' failed make[2]: *** [drivers/char] Error 2
| make[2]: *** Waiting for unfinished jobs....

All these errors are due to the fact that random.c is compiled at the same time the LRNG interfaces are compiled.


These are the current LRNG configs I have ended up with so far:

CONFIG_RANDOM_DEFAULT_IMPL is not set

This very option should imply that random.c ought to be not compiled.

But since it is compiled, you need to check why it is compiled.

CONFIG_LRNG_AUTO_SELECTED=y CONFIG_LRNG=y

#

Linux Random Number Generator Configuration

# CONFIG_LRNG_SHA256=y CONFIG_LRNG_COMMON_DEV_IF=y CONFIG_LRNG_DRNG_ATOMIC=y CONFIG_LRNG_SYSCTL=y CONFIG_LRNG_RANDOM_IF=y

This option compiles the LRNG interfaces of add_hwgenerator_randomness and similar.

#

Specific DRNG seeding strategies

#

CONFIG_LRNG_AIS2031_NTG1_SEEDING_STRATEGY is not set

end of Specific DRNG seeding strategies

#

LRNG Interfaces

# CONFIG_LRNG_KCAPI_IF=y CONFIG_LRNG_HWRAND_IF=y CONFIG_LRNG_DEV_IF=y

end of LRNG Interfaces

#

Entropy Source Configuration

# CONFIG_LRNG_RUNTIME_ES_CONFIG=y

#

Common Timer-based Entropy Source Configuration

# CONFIG_LRNG_RCT_CUTOFF=31 CONFIG_LRNG_RCT_CUTOFF_PERMANENT=81 CONFIG_LRNG_APT_CUTOFF=325 CONFIG_LRNG_APT_CUTOFF_PERMANENT=371

#

Interrupt Entropy Source

#

CONFIG_LRNG_IRQ is not set

#

Jitter RNG Entropy Source

# CONFIG_LRNG_JENT=y

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_DISABLED is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_32 is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_64 is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_128=y

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_256 is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_512 is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS_NO_1024 is not set

CONFIG_LRNG_JENT_ENTROPY_BLOCKS=128 CONFIG_LRNG_JENT_ENTROPY_RATE=16

#

CPU Entropy Source

#

CONFIG_LRNG_CPU is not set

CONFIG_LRNG_CPU_FULL_ENT_MULTIPLIER=1

#

Scheduler Entropy Source

#

CONFIG_LRNG_SCHED is not set

#

Kernel RNG Entropy Source

#

end of Entropy Source Configuration

CONFIG_LRNG_DRNG_CHACHA20=y CONFIG_LRNG_DRBG=y CONFIG_LRNG_SWITCH=y

CONFIG_LRNG_SWITCH_HASH is not set

CONFIG_LRNG_SWITCH_DRNG=y CONFIG_LRNG_SWITCH_DRBG=y CONFIG_LRNG_DFLT_DRNG_CHACHA20=y

CONFIG_LRNG_TESTING_MENU is not set

CONFIG_LRNG_SELFTEST=y

CONFIG_LRNG_SELFTEST_PANIC is not set

end of Linux Random Number Generator Configuration



Thanks for any help you can provide!
-Justin

Ciao Stephan

jancheta commented 9 months ago

I think we figured out what happened. We are actually using a kernel based off Android GKI which reverts some of the random.h in accordance with Android GKI's ABI compatibility guarantee. Reverting the commit which changed those function signatures then applying LRNG patches and building works like a charm. Thanks again for all the help!