Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1198469ybg; Tue, 2 Jun 2020 04:01:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRxpLncpIY8A/fbktNsLZTo9RWVSdSiZB9nNRNUpSCU9stO6H23hnoAM1UT2rCkgy9DJAJ X-Received: by 2002:aa7:db51:: with SMTP id n17mr18716672edt.241.1591095700896; Tue, 02 Jun 2020 04:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591095700; cv=none; d=google.com; s=arc-20160816; b=MhuPMNxVWmbyuf8+qEdK7yIdoBi92TrDBbM8c5GkRyQOftWfXMj8KXesVOgCG/azId v+d4vrWRIG/JgadXaTtAkXYJvUoOzrdhZK1XdmH65xkVjgHvOwB3ymgdvRMM2sjZxNsh yglOWB4Xq3BTn6Pco7meeRVHRIZirdBlNSX7cBRwn5vbQOImn0QTQxDqsDS13qcwnSFf z05zf31g0QoApycAN6tIQgvdd2LkQ2OscdjcUCoh4eJcM3RzIiKtOqAHg6nXfhRdCEcH sxMSIGcFWs3yJKr+97aZOKDzKEChN5xs65U9vF2bB077NG2lPN9dhO82aSq+AkJhwyoh EEbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=B26BaFsTDMz7FwhYbd3k5w48C6XsF0pJGiHJygBA8VU=; b=J2TO63CsW4Ch5OzuLJMp5UimCOdlWnOSH5or1vg7qA8T98+GkFTNHQWjHdhXxutYdH SwGgOFktPuhLJiwdq9m5acAR+klI1O9mdTtmS/ctxdS5q/byDOWQvXFadZEJFE0Nj8Sj VkPYrqJhKa35jJahcH2Bplr2qnGtu43g1BXKpViei1aLyMjcN8HqvlaUgFEAXKScvipQ 1Bj1t3dmiZ350jaam+QF9h/IyILOWtVlDgitIQ2V/cdD9wNfGgnVh4lE4Cmuei2RYx9Y y2YQP39wdCKcYVTY1uHidN4w5rHE/QBliSiXZutxfW0HzNqVXYIt4XZP+SI1SPwJ9PG2 Rbsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DkggYZAr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si1202038edp.99.2020.06.02.04.01.16; Tue, 02 Jun 2020 04:01:40 -0700 (PDT) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=DkggYZAr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726814AbgFBK45 (ORCPT + 99 others); Tue, 2 Jun 2020 06:56:57 -0400 Received: from mail.skyhub.de ([5.9.137.197]:60148 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbgFBK44 (ORCPT ); Tue, 2 Jun 2020 06:56:56 -0400 Received: from zn.tnic (p200300ec2f0bbb00c19a54a9b37b354f.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:bb00:c19a:54a9:b37b:354f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7EEF41EC0350; Tue, 2 Jun 2020 12:56:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1591095415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=B26BaFsTDMz7FwhYbd3k5w48C6XsF0pJGiHJygBA8VU=; b=DkggYZAr0nx9UkOGjZkE2dkpesE6t8WFOljYCaZ7E4OoyNVbwnq+3ehNVzFXggneQuH/4i iQrlStFg+okQoE4Fs9ovXGNLq8YXUiZg3E1xVDURXMv1pxd37eC5eK2nWfjnsp12H64Q0C EN1reJNYiPzFhA+hYDO5yIxIA/R38bQ= Date: Tue, 2 Jun 2020 12:56:49 +0200 From: Borislav Petkov To: Petteri Aimonen Cc: Andy Lutomirski , Dave Hansen , "H. Peter Anvin" , x86-ml , lkml Subject: Re: [PATCH] arch/x86: reset MXCSR to default in kernel_fpu_begin() Message-ID: <20200602105649.GB11634@zn.tnic> References: <20200602101119.GA11634@zn.tnic> <20200602102951.GE17423@lakka.kapsi.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200602102951.GE17423@lakka.kapsi.fi> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Jun 02, 2020 at 01:29:51PM +0300, Petteri Aimonen wrote: > The kernel module is not actually x86-specific, even though it is > currently only enabled for x86. amdgpu driver already does kernel mode > floating point operations on PPC64 also, and the same module could be > used to test the same thing there. Then make it generic please and put the user portion in, say, tools/testing/selftests/fpu/ and we can ask ppc people to test it too. People might wanna add more stuff to it in the future, which would be good. > To deterministically trigger the bug, the syscall has to come from the > same thread that has modified MXCSR. Going through /usr/sbin/modprobe > won't work, and manually doing the necessary syscalls for module loading > seems too complicated. Ok, fair enough. But put that file in debugfs pls. > The fesetround() and feenableexcept() are the portable ways to modify > MXCSR. The test module does cause Precision Exception and Denormal > Exception if those exceptions are unmasked. Ok. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette