cvs commit: src/sys/amd64/amd64 cpu_switch.S machdep.c
src/sys/amd64/ia32 ia32_signal.c
Konstantin Belousov
kib at FreeBSD.org
Tue Sep 2 17:52:29 UTC 2008
kib 2008-09-02 17:52:11 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 cpu_switch.S machdep.c
sys/amd64/ia32 ia32_signal.c
Log:
SVN rev 182684 on 2008-09-02 17:52:11Z by kib
- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
processes, clear PCB_32BIT and PCB_GS32BIT bits [1].
- Reread the fs and gs bases from the msr unconditionally, not believing
the values in pcb_fsbase and pcb_gsbase, since usermode may reload
segment registers, invalidating the cache. [2].
Both problems resulted in the wrong fs base, causing wrong tls pointer
be dereferenced in the usermode.
Reported and tested by: Vyacheslav Bocharov <adeepv at gmail com> [1]
Reported by: Bernd Walter <ticsoat cicely7 cicely de>,
Artem Belevich <fbsdlist at src cx>[2]
Reviewed by: peter
MFC after: 3 days
Revision Changes Path
1.163 +18 -2 src/sys/amd64/amd64/cpu_switch.S
1.688 +1 -0 src/sys/amd64/amd64/machdep.c
1.19 +1 -0 src/sys/amd64/ia32/ia32_signal.c
More information about the cvs-src
mailing list