Date: Fri, 14 Nov 1997 19:32:10 -0800 From: Joe Eykholt <jre@ipsilon.com> To: jlemon@americantv.com Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD Pentium Bug fix (proposed) Message-ID: <346D17BA.1B37ADEA@ipsilon.com> References: <199711150115.RAA18627@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Lemon wrote: > My ``fix'' is to have the IDT descriptor reference a segemnt which has > a length of 0. This has the effect of mapping SIGILL into SIGBUS, so that > the `cmpxchg8' crash now generates a Bus error. (I didn't bother returning > the correct signal; it can probably be added if it is important) Cool fix! It should work and seems much nicer than the two-page IDT fix. One point, though. The segment length is at least one byte since the limit in the descriptor is the last valid offset in the segment, not the length. That means that the address might be referenced. The granularity should be 0 for bytes. I think a user can map address 0 (at least on one OS) containing a single-byte instruction that might be run in ring 0, so another, guaranteed-invalid address might be better, or you might leave the P bit off in that segment or (better) in the IDT entry 6 descriptor, causing a segment-not-present fault. (I haven't tried any of this). Joe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?346D17BA.1B37ADEA>