<div dir="ltr">Hi,<br><br>I'm developing a kernel module for an ARM machine, while debugging I found addresses <br>printed are all randomized and useless for debugging.<br><br>To prove I was not crazy I wrote this small program:<br><br>---------------------------------<br>#include <linux/init.h><br>#include <linux/module.h><br>#include <linux/kernel.h><br>#include <linux/slab.h><br><br>MODULE_LICENSE("GPL");<br>MODULE_AUTHOR("Somebody");<br>MODULE_DESCRIPTION("A simple example Linux module.");<br>MODULE_VERSION("0.01");<br><br>static int __init example_init(void) {<br>    uint32_t a;<br>    uint32_t b;<br>    uint32_t c;<br>    uint8_t d[10];<br>    uint8_t *e;<br><br>    printk(KERN_INFO "Hello, World!\n");<br>    printk(KERN_INFO "&a %p\n",&a);<br>    printk(KERN_INFO "&b %p\n",&b);<br>    printk(KERN_INFO "&c %p\n",&c);<br>    printk(KERN_INFO "&d %p\n",d);<br>    printk(KERN_INFO "&d[0] %p\n",&d[0]);<br>    printk(KERN_INFO "&d[1] %p\n",&d[1]);<br><br>    e = kmalloc(10, GFP_KERNEL);<br>    printk(KERN_INFO "&e[0] %p\n",&e[0]);<br>    printk(KERN_INFO "&e[1] %p\n",&e[1]);<br><br>    kfree(e);<br><br> return 0;<br>}<br><br>static void __exit example_exit(void) {<br> printk(KERN_INFO "Goodbye, World!\n");<br>}<br><br>module_init(example_init);<br>module_exit(example_exit);<br>---------------------------------<br>And it gave me this output:<br><br>Hello, World!<br>&a b3f9fa31<br>&b 27e1c68a<br>&c da50d287<br>&d 9f9aec2b<br>&d[0] 9f9aec2b<br>&d[1] cc627580<br>&e[0] 98b8c9eb<br>&e[1] 45f248f8<br><br>Then I tested on my debian host machine which gave me the same kind of randomized addresses.<br><br>When I search randomization the only thing I found is KASLR which I don't think is the same thing.<br><br></div>