Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp141524pxb; Thu, 21 Jan 2021 03:34:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwATqam91zVeyF/eDTHSE692QEOULc1hdelUJs8zfo3hPQKoQwZcY7dB8/vd1UIisk3MXrf X-Received: by 2002:a17:907:68c:: with SMTP id wn12mr9267155ejb.41.1611228869252; Thu, 21 Jan 2021 03:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611228869; cv=none; d=google.com; s=arc-20160816; b=MDaepGiynppn9E2mi/4GSf8nx0bEPDnuJFbnuAcnbfPpDJhRllwgLVeARb3IlTeRdA kYtgXNYszTOODum/YU1uP6uR/mee+oOtuSpVzdBM3EGm6IbFbSa74YMCK//FwIpMZdXu qJ3YoDydml5HEplQcFSjh0wBXMhHXHRRO88QPk1vb/YfNE5Nqa0873gGaTO9DJcRI6MK 7Y35uXFKBMt2xEFuloDgUvGmK8hTnUUAbPDjcJjZwqSmAJAraqCmwEy0jWWtldPOHAfD wl2KKdyrmQt9KDNGYfapgLi9CvUTP4efaF9v3OVW3X0AZoYIORF4OglPyB9oQmOeyhXw 3OXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ckQHtJVQKyP1YO2DBVpRZsa/aeOpCW8S6PcDP12tG78=; b=C9Z6uGdBL86WBMDQlEE42eiEXMAEpDkxCtNJbLvMsfyzI0u7+v3Az6UGNBlDgmUsz6 XwcwXXC2EhrS+wodfv81/p4QweMD3JxaE0hWWhaUCO1AYgE7aFgZ8DUn2Ws1/6eCazFJ IiciVSA9lwespetVN4bwSladhHoEcjtjE0tmagX5yDLXCuxlXdRbVLDn/LCqG+iXLYxU KRRixh23Q3QUggG9IFTHldEauwJ+h53PqN0BiBx6fXlwA41UBI3LowPZiUwJjOuktOxN 3zuKwPV7+2K+a6PCv6zrR3/0bAZgWmsPgRC8JoBXz21JDvfu5AplhAe+vHe19HFRITXu dq4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=podlesie.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si2054332ede.192.2021.01.21.03.34.06; Thu, 21 Jan 2021 03:34:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=podlesie.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730364AbhAULbY (ORCPT + 99 others); Thu, 21 Jan 2021 06:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730087AbhAULas (ORCPT ); Thu, 21 Jan 2021 06:30:48 -0500 Received: from shrek.podlesie.net (shrek-3s.podlesie.net [IPv6:2a00:13a0:3010::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 00D15C061575; Thu, 21 Jan 2021 03:29:59 -0800 (PST) Received: by shrek.podlesie.net (Postfix, from userid 603) id 05D2A7BD; Thu, 21 Jan 2021 12:29:57 +0100 (CET) Date: Thu, 21 Jan 2021 12:29:57 +0100 From: Krzysztof Mazur To: Andy Lutomirski Cc: x86@kernel.org, LKML , Krzysztof =?iso-8859-2?Q?Ol=EAdzki?= , Arnd Bergmann , stable@vger.kernel.org Subject: Re: [PATCH v3 2/4] x86/mmx: Use KFPU_387 for MMX string operations Message-ID: <20210121112957.GA16586@shrek.podlesie.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 09:09:49PM -0800, Andy Lutomirski wrote: > The default kernel_fpu_begin() doesn't work on systems that support XMM but > haven't yet enabled CR4.OSFXSR. This causes crashes when _mmx_memcpy() is > called too early because LDMXCSR generates #UD when the aforementioned bit > is clear. > > Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly. > > Fixes: 7ad816762f9b ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()") > Cc: > Reported-by: Krzysztof Mazur > Signed-off-by: Andy Lutomirski > --- > arch/x86/lib/mmx_32.c | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-) Thanks, 5.10 + this patch series boots on K7 with SSE. Tested-by: Krzysztof Mazur Regards, Krzysiek