Hi,
According to Linux documentation, if I want to use kASLR I should add on my device tree, on the chosen node a kaslr-seed entry ( https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt). I'm running uvmm and I want to use the dt-modify argument to change the value on dtb to a value that comes from an HW random generator at runtime. I have written an application which reads a random sequence from the HW. How can I pass the random value from that application and pass the u64 value to the ned script which I can use as a seed? I can use the application exit code to read 32-bit and run it twice, but seems to be overkill to do that. I was thinking of sending a newer allocatted Dataspace to the application, it will fill it with random data, but I have no idea if it is possible to read this Dataspace and concatenate the result to the arguments to uvmm. Do you have any other suggestions?
Thanks for your help, Flavio
_______________________________________________ l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
Hi,
On Tue Feb 04, 2025 at 21:59:24 +0200, Flavio Erlich wrote:
Hi,
According to Linux documentation, if I want to use kASLR I should add on my device tree, on the chosen node a kaslr-seed entry ( https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt). I'm running uvmm and I want to use the dt-modify argument to change the value on dtb to a value that comes from an HW random generator at runtime. I have written an application which reads a random sequence from the HW. How can I pass the random value from that application and pass the u64 value to the ned script which I can use as a seed? I can use the application exit code to read 32-bit and run it twice, but seems to be overkill to do that. I was thinking of sending a newer allocatted Dataspace to the application, it will fill it with random data, but I have no idea if it is possible to read this Dataspace and concatenate the result to the arguments to uvmm. Do you have any other suggestions?
Just give uvmm a 'rng' capability talking L4Re::Random protocol and it will update the kaslr-seed value in the DT itself. For that your program will need to implement a L4Re::Random server.
Adam _______________________________________________ l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
Thanks Adam for your prompt response!
On Tue, 4 Feb 2025, 22:16 Adam Lackorzynski, adam@l4re.org wrote:
Hi,
On Tue Feb 04, 2025 at 21:59:24 +0200, Flavio Erlich wrote:
Hi,
According to Linux documentation, if I want to use kASLR I should add on
my
device tree, on the chosen node a kaslr-seed entry ( https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt
).
I'm running uvmm and I want to use the dt-modify argument to change the value on dtb to a value that comes from an HW random generator at
runtime.
I have written an application which reads a random sequence from the HW. How can I pass the random value from that application and pass the u64 value to the ned script which I can use as a seed? I can use the application exit code to read 32-bit and run it twice, but seems to be overkill to do that. I was thinking of sending a newer allocatted Dataspace to the
application,
it will fill it with random data, but I have no idea if it is possible to read this Dataspace and concatenate the result to the arguments to uvmm. Do you have any other suggestions?
Just give uvmm a 'rng' capability talking L4Re::Random protocol and it will update the kaslr-seed value in the DT itself. For that your program will need to implement a L4Re::Random server.
Adam
_______________________________________________ l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
l4-hackers@os.inf.tu-dresden.de