<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Hello <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">​I would like to ask a question about Kernel Address Space Layout Randomization - a mechanism, which can help to accomplish more security and prevent kernel vulnerabilies exploits. KASLR is also randomizing the location of the kernel code in RAM during boot time etc. However, this feature has a conflict with Hibernation, right? (I'm using a desktop computer, as a tester for various things, so it's not a problem for me.) <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">Last year, Mr Kees Cook created a bug report about enabling KASLR, by default on x86 architecture (see 1.) It seems, that for x86/x86_64 systems, this feature will be turned on, by default, in Linux kernel v4.12. For now, I'm using v4.4.X and I would like to do some tests. One of the options to enable Kernel Address Space Layout Randomization is to use "kaslr" as a kernel command line option. I would like to make it another way. <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">I'm thinking about GRUB and '/etc/default/grub' file - that controls the operation of grub-mkconfig(8).<code></code> Generally, I want to skip pressing 'e' button when menu shows up etc. There is one option: "GRUB_CMDLINE_LINUX_DEFAULT=" containing "quiet splash" options. Can I simply add "kaslr"at the very end? Then, I'll get: "quiet splash kaslr". Is that OK? <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">If this is a good way to enable KASLR, then I have to automatically re-generate the 'grub.cfg' file, right? I know, that there are two commands to do this: update-grub(8) and grub-mkconfig(8). <br><br>First one, is stub for grub-mkconfig (by the way; it uses "grub-mkconfig -o /boot/grub/grub.cfg" command to automatically re-generate a config file.) Second one, is used to generate a GRUB configuration file. That's all. <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">What do you think about this? Is this a correct way to enable "kaslr" feature? Pretty naive question. Sorry, but I do not have the ability to check this on my own - I do not have an access to any virtual machine right now. <br><br></div><div style="font-family:verdana,sans-serif" class="gmail_default">Thanks, best regards. <br></div><div style="font-family:verdana,sans-serif" class="gmail_default">_____________________ <br>1. <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1573848">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1573848</a><br></div></div>