From owner-freebsd-current@FreeBSD.ORG Thu Nov 5 11:18:56 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B2AC1065693; Thu, 5 Nov 2009 11:18:56 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 271E98FC16; Thu, 5 Nov 2009 11:18:55 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 220CC6D41C; Thu, 5 Nov 2009 11:18:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E516C84503; Thu, 5 Nov 2009 12:18:53 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Giovanni Trematerra References: <4e6cba830911050302k56bed35aj5ca9fa16379ab325@mail.gmail.com> Date: Thu, 05 Nov 2009 12:18:53 +0100 In-Reply-To: <4e6cba830911050302k56bed35aj5ca9fa16379ab325@mail.gmail.com> (Giovanni Trematerra's message of "Thu, 5 Nov 2009 12:02:39 +0100") Message-ID: <86k4y5fcde.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , FreeBSD Current Subject: Re: [PATCH] AMD Opteron Rev. E hack X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2009 11:18:56 -0000 Giovanni Trematerra writes: > I have a quick and dirty patch to address the problem as discussed on > commit r198868 in svn-src-head@ > I introduced BROKEN_OPTERON_E kernel option for i386/amd64 arch. > The patch isn't tested yet, I only successfully compiled on i386. > Can you let me know if the patch is on the right direction to resolve the= issue? > style(9) tips are welcomed. We should probably call it OPTERON_E_LFENCE_HACK or something, cf. NO_F00F_HACK (which has the opposite semantics - the f00f hack is enabled by default, though at this point we should probably reverse it and just print a warning if we detect a vulnerable CPU), and the wording of those printfs needs work, but it looks OK overall. BTW, you should use the text/x-patch MIME type for patches, instead of application/octet-stream. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no