From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F17CC49EA2 for ; Sun, 20 Jun 2021 08:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 682C16108E for ; Sun, 20 Jun 2021 08:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229594AbhFTIrH (ORCPT ); Sun, 20 Jun 2021 04:47:07 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:46466 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbhFTIrF (ORCPT ); Sun, 20 Jun 2021 04:47:05 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3D48021A5A; Sun, 20 Jun 2021 08:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624178692; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PKKoanJ4wshGQOfupMu8RrjtMJrud3LH2EHotYJr5Aw=; b=RUNTtrhYxwi2NHaSk8fIGdULsk4i3T9cMDasoaPvr+a2OIzLRxMyX4IU+YBrayBZbpXFpf frsltXfIg82tNpVdsTM8Bcd9mCysABirKnQVhEVEzhpfzmpj2z9+aL6NKHmVzKYeGAM/1B FC4fy4nUnmC0tV18m3YTgfyTPObxYdc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624178692; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PKKoanJ4wshGQOfupMu8RrjtMJrud3LH2EHotYJr5Aw=; b=Y3HEywzcIS61NpUf/q3jDvU2WkEDfdCyJtw2+GF8B+jhk+HVomCZzqJ3HY0eCsZRCOXWJs mV77JYTxDTWS7vDQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 2872C118DD; Sun, 20 Jun 2021 08:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624178692; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PKKoanJ4wshGQOfupMu8RrjtMJrud3LH2EHotYJr5Aw=; b=RUNTtrhYxwi2NHaSk8fIGdULsk4i3T9cMDasoaPvr+a2OIzLRxMyX4IU+YBrayBZbpXFpf frsltXfIg82tNpVdsTM8Bcd9mCysABirKnQVhEVEzhpfzmpj2z9+aL6NKHmVzKYeGAM/1B FC4fy4nUnmC0tV18m3YTgfyTPObxYdc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624178692; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PKKoanJ4wshGQOfupMu8RrjtMJrud3LH2EHotYJr5Aw=; b=Y3HEywzcIS61NpUf/q3jDvU2WkEDfdCyJtw2+GF8B+jhk+HVomCZzqJ3HY0eCsZRCOXWJs mV77JYTxDTWS7vDQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id WTFhCQQAz2BsbQAALh3uQQ (envelope-from ); Sun, 20 Jun 2021 08:44:52 +0000 Date: Sun, 20 Jun 2021 10:44:40 +0200 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , Andy Lutomirski , Dave Hansen , Fenghua Yu , Tony Luck , Yu-cheng Yu , Sebastian Andrzej Siewior , Peter Zijlstra , Kan Liang Subject: Re: [patch V3 06/66] x86/fpu: Make xfeatures_mask_all __ro_after_init Message-ID: References: <20210618141823.161158090@linutronix.de> <20210618143445.104177935@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210618143445.104177935@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 04:18:29PM +0200, Thomas Gleixner wrote: > Nothing has to modify this after init. > > But of course there is code which unconditionaly masks xfeatures_mask_all WARNING: 'unconditionaly' may be misspelled - perhaps 'unconditionally'? #71: But of course there is code which unconditionaly masks xfeatures_mask_all ^^^^^^^^^^^^^^ > @@ -896,8 +888,18 @@ void __init fpu__init_system_xstate(void > setup_init_fpu_buf(); > setup_xstate_comp_offsets(); > setup_supervisor_only_offsets(); > - print_xstate_offset_size(); > > + /* > + * Paranoia check whether something in the setup modified the > + * xfeatures mask. > + */ > + if (xfeatures != xfeatures_mask_all) { > + pr_err("x86/fpu: xfeatures modified during init %016llx %016llx, disabling XSAVE\n", Let's make that: pr_err("x86/fpu: xfeatures modified from 0x%016llx to 0x%016llx during init, disabling XSAVE\n", so that it is clear which is which. With those: Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg