Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2007 18:16:40 +0200
From:      des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=)
To:        freebsd-current@FreeBSD.ORG
Cc:        freebsd-fs@FreeBSD.ORG, craig@xfoil.gank.org, rick-freebsd@kiwi-computer.com, bde@zeta.org.au
Subject:   Re: ZFS committed to the FreeBSD base.
Message-ID:  <8664801c7r.fsf@dwp.des.no>
In-Reply-To: <200704131452.l3DEqjXv040099@lurza.secnetix.de> (Oliver Fromme's message of "Fri, 13 Apr 2007 16:52:45 %2B0200 (CEST)")
References:  <200704131452.l3DEqjXv040099@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme <olli@lurza.secnetix.de> writes:
> Using cmpxchg8b with a lock prefix wouldn't be a good idea anyway.
> If I remember correctly, the lock cmpxchg8b combination was the
> cause of the infamous "F00F" bug of old Pentium processors.  It
> causes them to freeze.

Only when the operand is invalid.  This causes an invalid opcode
exception which can not be handled because the memory bus is locked,
preventing the handler from beig loaded into cache.

> (FreeBSD has a hack to work around the problem, as you certainly
> know ...  I don't know exactly how it works.)

By marking the interrupt descriptor table read-only, the invalid
opcode exception triggers a page fault, which unlocks the bus.  The
page fault handler examines the state of the CPU, determine that an
invalid opcode exception occurred, and passes control to the
appropriate handler (which sends SIGILL to the offending process).

Additionally, to avoid penalizing other exceptions, the IDT is aligned
such that it crosses a page boundary immediately after the entry for
the invalid opcode exception, so only the first six entries in the IDT
needs to be read-only.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8664801c7r.fsf>