Module Name: src Committed By: yamt Date: Thu Oct 21 11:39:45 UTC 2010
Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Xsyscall: save %es before enabling interrupts. otherwise it can be clobbered by preemption. PR/43903. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.58 src/sys/arch/amd64/amd64/locore.S:1.59 --- src/sys/arch/amd64/amd64/locore.S:1.58 Wed Jul 7 01:14:52 2010 +++ src/sys/arch/amd64/amd64/locore.S Thu Oct 21 11:39:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.58 2010/07/07 01:14:52 chs Exp $ */ +/* $NetBSD: locore.S,v 1.59 2010/10/21 11:39:45 yamt Exp $ */ /* * Copyright-o-rama! @@ -1085,12 +1085,12 @@ pushq $(LSEL(LUDATA_SEL, SEL_UPL)) /* Known to be user ss */ pushq %r15 /* User space rsp */ movq CPUVAR(SCRATCH),%r15 - sti subq $TF_REGSIZE+(TF_RSP-TF_TRAPNO),%rsp + movw %es,TF_ES(%rsp) + sti INTR_SAVE_GPRS movw %fs,TF_FS(%rsp) movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) movw $(LSEL(LUDATA_SEL, SEL_UPL)),TF_DS(%rsp) movq %r11, TF_RFLAGS(%rsp) /* old rflags from syscall insn */ movq $(LSEL(LUCODE_SEL, SEL_UPL)), TF_CS(%rsp)