freebsd-dev/sys/amd64/ia32
Konstantin Belousov f98c3ea74e - 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
2008-09-02 17:52:11 +00:00
..
ia32_exception.S Newer versions of gcc don't support treating structures passed by value 2006-12-17 06:48:40 +00:00
ia32_reg.c include opt_compat.h to unbreak the build 2005-10-24 00:00:00 +00:00
ia32_signal.c - When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386 2008-09-02 17:52:11 +00:00
ia32_sigtramp.S Stop reloading %fs and %gs, since it causes the base address from 2006-09-23 13:42:09 +00:00
ia32_syscall.c Optimize vmmeter locking. 2007-06-10 21:59:14 +00:00