This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7-Q1: How to enable KASLR

Part Number: AM62A7-Q1


Tool/software:

Hi TI experts

      I found that log info from dmesg: KASLR disabled due to lack of seed. And this messge is from 

kaslr_init function in ti-linux-kernel-6.6.58/arch/arm64/kernel/kaslr.c file
      I am sure that I have enabled CONFIG on KASLR, and add /chosen/kaslr-seed node in device tree.
/chosen {
      kaslr-seed = <0x10000000>;
};
      Entered into rootfs: type the command that cat /proc/sys/kernel/random/entropy_avail,  and the result is 256

      We want to  KASLR enabled

      How can We do ?

Thanks, support us

  • Hi Toby,

    The kaslr-seed property has to be a 64-bit value. Please try

    diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    index a6810c5ab02d..aab40c8a5a9a 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    @@ -29,6 +29,7 @@ chosen {
                    ranges;
     
                    stdout-path = "serial2:115200n8";
    +               kaslr-seed = <0x00000000 0x10000000>;
     
                    framebuffer0: framebuffer@0 {
                            compatible = "simple-framebuffer";

  • Thanks lot, this problem has been resolved.

    [    0.000000] KASLR enabled