diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2018-09-09 22:09:37 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2018-09-09 22:09:37 +0000 |
commit | d25059bff339b8a2dbf35ecc9a8ed74fb9fa98ec (patch) | |
tree | 9bdf43dceb9cabe7d8bd00feed23118f1e4c1d41 /sys/arch/amd64/conf | |
parent | 5521731e156dcd43760afa91e52643926d0a947f (diff) |
Calculate automatically the padding necessary for lining up the
iretq instruction used when Meltdown mitigation is effect. It got
pushed off when an lfence was added in locore.S rev 1.107, resulting
in two signals being sent instead of one when iretq faulted, and
neither signal had the correct sigcontext info. Update the makefile
rule for locore.o to verify that things are correct.
ok mlarkin@
Diffstat (limited to 'sys/arch/amd64/conf')
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index bd1d63d12c5..270559f14f3 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.101 2018/08/21 18:06:12 anton Exp $ +# $OpenBSD: Makefile.amd64,v 1.102 2018/09/09 22:09:36 guenther Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -125,6 +125,12 @@ mcount.o: $S/lib/libkern/mcount.c Makefile ioconf.o: ioconf.c ${NORMAL_C} +locore.o: assym.h + ${NORMAL_S} + @[[ -n `objdump -D $@ | grep -A1 doreti_iret | sort | uniq -d` ]] || \ + { rm -f $@; echo "ERROR: overlaid iretq instructions don't line up"; \ + echo "#GP-on-iretq fault handling would be broken"; exit 1; } + ld.script: ${_machdir}/conf/ld.script cp ${_machdir}/conf/ld.script $@ @@ -155,7 +161,7 @@ cleandir: clean depend obj: locore0.o: ${_machdir}/${_mach}/locore0.S assym.h -locore.o mutex.o vector.o copy.o spl.o: assym.h +mutex.o vector.o copy.o spl.o: assym.h mptramp.o acpi_wakecode.o vmm_support.o: assym.h hardlink-obsd: |