From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 4 15:40:39 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECD2B16AA9E for ; Sun, 4 Jun 2006 15:40:39 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84A8843D48 for ; Sun, 4 Jun 2006 15:40:34 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k54FeX3X035826 for ; Sun, 4 Jun 2006 15:40:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k54FeX5v035825; Sun, 4 Jun 2006 15:40:33 GMT (envelope-from gnats) Date: Sun, 4 Jun 2006 15:40:33 GMT Message-Id: <200606041540.k54FeX5v035825@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Rostislav Krasny Cc: Subject: Re: kern/98460 : [kernel] [patch] fpu_clean_state() cannot be disabled for not AMD processors, those are not vulnerable to FreeBSD-SA-06:14.fpu X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rostislav Krasny List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2006 15:40:45 -0000 The following reply was made to PR kern/98460; it has been noted by GNATS. From: Rostislav Krasny To: Bruce Evans Cc: bug-followup@FreeBSD.org Subject: Re: kern/98460 : [kernel] [patch] fpu_clean_state() cannot be disabled for not AMD processors, those are not vulnerable to FreeBSD-SA-06:14.fpu Date: Sun, 4 Jun 2006 18:36:23 +0300 On Sun, 4 Jun 2006, Bruce Evans wrote: > >> Description: > > When FreeBSD is running on any non AMD processor an fpu_clean_state() function > > adds unneeded operations to a context switch. My patch makes it possible > > to disable the fpu_clean_state() by rebuilding a kernel with > > "options CPU_FXSAVE_NO_LEAK". > > > > Colin Percival has nothing against my idea in general: > > Hrmph. My review implied that this should be done (not be me :-) before > committing anything. > > The configuration should be dynamic and automatic, so that it doesn't > take changes to zillions of configuration files to implement and > document an option that almost no one will know to set. I think there > is a simple feature test for the AMD misfeature. David Xu had proposed something like that. But from Colin Percival's reply I understood that it is hard to be done effectively. See their discussion by the first URL in this PR. > On i386's, this > should be combined with the cpu_fxsr test so that only a single test > is needed at runtime. On amd64's, the test would be 1 unnecessary > compare-and-branch. I think it is not useful to have a configuration > option to avoid this compare-and-branch. Future amd64 processors may be changed back, to the classical behavior of FXSAVE and FXRSTOR instructions.