From owner-freebsd-current@FreeBSD.ORG Sun Apr 30 11:24:29 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B5B216A403 for ; Sun, 30 Apr 2006 11:24:29 +0000 (UTC) (envelope-from rosti.bsd@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9272443D46 for ; Sun, 30 Apr 2006 11:24:28 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: by uproxy.gmail.com with SMTP id m3so1783701ugc for ; Sun, 30 Apr 2006 04:24:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:x-mailer:mime-version:content-type:content-transfer-encoding; b=r25qSXV/1LTJlfV9blm3cwzkcKeN3Xa84KBqcBbvaO2MxJl/PrgSut3xQZ6W28ms3FyEWEPaJ+6wkuC++mNBeQQ5M70QD8i9ZL1HpJxQfzd2ZOncssEoSIWJAyndFdwKFwC1hxzBJS4ckP9w4U8T1iRRhMsnOdKD6up7IShgMJY= Received: by 10.66.255.16 with SMTP id c16mr95157ugi; Sun, 30 Apr 2006 04:24:27 -0700 (PDT) Received: from saturn.lan ( [212.143.154.227]) by mx.gmail.com with ESMTP id j1sm3584361ugf.2006.04.30.04.24.25; Sun, 30 Apr 2006 04:24:27 -0700 (PDT) Date: Sun, 30 Apr 2006 14:24:08 +0300 From: Rostislav Krasny To: David Xu , Igor Sysoev Message-Id: <20060430142408.fcd60069.rosti.bsd@gmail.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: FreeBSD-SA-06:14.fpu 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: Sun, 30 Apr 2006 11:24:29 -0000 David Xu wrote: > Igor Sysoev wrote: > > > > The last security advisory FreeBSD-SA-06:14.fpu > > ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-06:14.fpu.asc > > that fixes very doubtful security bug in AMD CPUs, also > > adds unnecessary penalty in FPU context switch for all other > > SSE-enabled CPUs. > > Probably it should only be applied to AMD CPU but not Intel and others, > it is easy to check cpu vendor and put a > if (bug_fxsave) > fpu_clean_state(); > > in file npx.c. Other possible solution is making the fpu_clean_state() optional by something like following: #ifdef BUG_FXSAVE #define fpu_clean_state() __fpu_clean_state() #else #define fpu_clean_state() ; #endif ... and including "options BUG_FXSAVE" to GENERIC.