summaryrefslogtreecommitdiff
path: root/arch/mips/rb532/time.c
diff options
context:
space:
mode:
authorJinyang He <hejinyang@loongson.cn>2020-11-25 13:07:46 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-11-27 12:20:25 +0300
commita307a4ce9ecd2e23c71318201330d9d648b3f818 (patch)
treee2b26a56a7076629a7e05e6ecb560466641b8dec /arch/mips/rb532/time.c
parent74a2810b7c1fcd60c87a8c47f95660628e00e97c (diff)
downloadlinux-a307a4ce9ecd2e23c71318201330d9d648b3f818.tar.xz
MIPS: Loongson64: Add KASLR support
Provide a weak plat_get_fdt() in relocate.c in case some platform enable USE_OF while plat_get_fdt() is useless. 1MB RELOCATION_TABLE_SIZE is small for Loongson64 because too many instructions should be relocated. 2MB is enough in present. Add KASLR support for Loongson64. KASLR(kernel address space layout randomization) To enable KASLR on Loongson64: First, make loongson3_defconfig. Then, enable CONFIG_RELOCATABLE and CONFIG_RANDOMIZE_BASE. Finally, compile the kernel. To test KASLR on Loongson64: Start machine with KASLR kernel. The first time: # cat /proc/iomem 00200000-0effffff : System RAM 02f30000-03895e9f : Kernel code 03895ea0-03bc7fff : Kernel data 03e30000-04f43f7f : Kernel bss The second time: # cat /proc/iomem 00200000-0effffff : System RAM 022f0000-02c55e9f : Kernel code 02c55ea0-02f87fff : Kernel data 031f0000-04303f7f : Kernel bss We see that code, data and bss sections become randomize. Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/rb532/time.c')
0 files changed, 0 insertions, 0 deletions