summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/include
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-06-08 11:47:26 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-06-08 11:47:26 +0000
commitdd08d581e8b7a42a91f1e92428d375b67cf547d7 (patch)
tree8574af5f678ede88774431ff224775a2b0e56e19 /sys/arch/mips64/include
parent112a22e42b2e6368a5fc567af404ca56359ce080 (diff)
Split early startup code out of locore.S into locore0.S. Adjust link
run so that this locore0.o is always at the start of the executable. But randomize the link order of all other .o files in the kernel, so that their exec/rodata/data/bss segments land all over the place. Late during kernel boot, smash the startup code with traps so that it does not point to the other randomly placed code. It has be smashed, because sgi runs in the kseg0 or xkphys space. As a result, the internal layout of every newly build bsd kernel is different from past kernels. Internal relative offsets are not known to an outside attacker. Ramdisk kernels cannot be compiled like this, because they are gzip'd. When the internal pointer references change, the compression dictionary bloats and results in poorer compression.
Diffstat (limited to 'sys/arch/mips64/include')
0 files changed, 0 insertions, 0 deletions