CVSROOT:        /cvs
Module name:    src
Changes by:     dera...@cvs.openbsd.org 2017/06/05 11:49:06

Modified files:
        sys/arch/alpha/alpha: autoconf.c locore.s 
        sys/arch/alpha/conf: Makefile.alpha files.alpha 
        sys/arch/alpha/include: param.h 
Added files:
        sys/arch/alpha/alpha: locore0.S 

Log message:
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 alpha (insecurely in my view) runs in the KSEG0 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.  The only known offsets are in the startup code,
which is gone.

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.

Reply via email to