Date: Wed, 12 May 2010 10:29:35 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/amd64/amd64 apic_vector.S exception.S Message-ID: <201005121029.o4CATkac084610@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2010-05-12 10:29:35 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 apic_vector.S exception.S
Log:
SVN rev 207958 on 2010-05-12 10:29:35Z by kib
Route all returns from the interrupts and faults through the doreti_iret
labeled iretq instruction.
Suppose that multithreaded process executes two threads, currently
scheduled on different processors. Let assume that thread A executes
using %cs or %ss pointing into the descriptor from LDT. If IPI comes
which handler does not return by jump to doreti, and meantime thread B
invalidates descriptor pointed to by %cs or %ss, then iretq from IPI
handler could fault.
Routing the return by doreti_iret allows kernel to catch the situation
and recover from it by sending signal to the usermode.
Tested by: pho
MFC after: 1 week
Revision Changes Path
1.114 +7 -6 src/sys/amd64/amd64/apic_vector.S
1.146 +1 -1 src/sys/amd64/amd64/exception.S
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005121029.o4CATkac084610>
