Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch



Module Name:    src
Committed By:   maxv
Date:           Thu Feb  2 19:09:08 UTC 2017

Modified Files:
        src/sys/arch/amd64/conf: Makefile.amd64
        src/sys/arch/amd64/include: param.h
        src/sys/arch/xen/conf: Makefile.xen

Log Message:
Increase KERNTEXTOFF from 1MB to 2MB on amd64. [1MB; 2MB[ is now handled
by UVM, so there is no physical loss.

On amd64 we always remap the kernel text with 2MB pages, and because of the
1MB start address we were forced to map [0MB; 2MB[ inside the first large
page. The problem is, the lower half is used by UVM to allocate physical
pages, and it is possible that some of these could be used by userland. We
could end up with userland-controllable data mapped into the kernel text on
a privileged page, which is far from being a good idea from a security pov.

I am not fixing i386 yet, because the large page size depends on PAE, and
we probably don't want to have a text located at 4MB on low-memory systems.

(note: I didn't introduce this issue, it was already there when I came in)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/conf/Makefile.amd64
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/include/param.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/conf/Makefile.xen

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index