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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 E3DAEC433DB for ; Tue, 9 Feb 2021 12:51:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9954D64EBA for ; Tue, 9 Feb 2021 12:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbhBIMu5 (ORCPT ); Tue, 9 Feb 2021 07:50:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:60730 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhBIMtw (ORCPT ); Tue, 9 Feb 2021 07:49:52 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 83327ADCD; Tue, 9 Feb 2021 12:49:10 +0000 (UTC) Date: Tue, 9 Feb 2021 13:49:06 +0100 From: Borislav Petkov To: "Bae, Chang Seok" Cc: Andy Lutomirski , "tglx@linutronix.de" , "mingo@kernel.org" , "x86@kernel.org" , "Brown, Len" , "Hansen, Dave" , "Liu, Jing2" , "Shankar, Ravi V" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 08/21] x86/fpu/xstate: Define the scope of the initial xstate data Message-ID: <20210209124906.GC15909@zn.tnic> References: <20201223155717.19556-1-chang.seok.bae@intel.com> <20201223155717.19556-9-chang.seok.bae@intel.com> <20210208123330.GE17908@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 06:53:23PM +0000, Bae, Chang Seok wrote: > Maybe, drop ‘for convenience’ from this sentence, since the buffer’s usage is > not much relevant in this changelog. Yes, "init_fpstate" is kinda clear what it is, from the name. > It does functional change, but it is conditional to AMX enabling. > > It includes all the initial states when AMX states not enabled. But it will > exclude the AMX state (with 8KB zeros) with the change. Those sentences "no functional change" are supposed to mean that the patch doesn't change anything and is only an equivalent code transformation. Yours does. So drop it from this one and from all the other patches as it is causing more confusion than it is trying to dispel. > I think they are in a different context. > > The helper indicates the mask for the ‘init_fpstate’ buffer. The rest is the > initial mask value for the per-task xstate buffer. Wait, what? Are you trying to tell me that that helper will return different masks depending on xfeatures_mask_user_dynamic, which changes in its lifetime? Then drop that helper altogether - that is more confusion and the xstate code is already confusing enough. > Since you suggested to introduce get_xstate_buffer_attr(), how about replacing > what you found with something like: > > get_xstate_buffer_attr(XSTATE_INIT_MASK) I'd prefer no helper at all but only comments above the usage site. Thx. -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg