Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1004441pxb; Thu, 19 Nov 2020 21:10:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqXB0d/l4BnfOiM0uLsmnlT0KYhPzypmh9eCWkRpxh9YOB6AUn1Wkoy+86KzeJ67lImjp4 X-Received: by 2002:aa7:d351:: with SMTP id m17mr34535178edr.215.1605849032715; Thu, 19 Nov 2020 21:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605849032; cv=none; d=google.com; s=arc-20160816; b=vxswy5akz/qEhJqmigikN0geHYZsLwDUnpsqc88dDs5LjE9SrKVw2QXZEt+nBdPfik Ad6R2OcmJFGNK6VuOCR1r1/tvjeL3wK2XYlVDqICasTrF6XF+BNKtUQhJztvAPDwCkE8 IzjGEogKoOV+Iou35ylBOhMpDHQzgF7+Qs9NPR+RxzRtAegNwPQnVAtpBdg09tjEVe4g m39seDjcSobpZusiqmsjdJYHr6sLcQe3rQXgJXt6WHUWLvM0rz6WOfCXnI+jJ9wTGdqp YlBCsyU3RJiK5ECxDRqbzd5gjC8X+M8neuuNB7ZwcCEYnAfzRIMXGroNFBYo9UJrQwDM 2J+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cwPc3cKs7JyiGw18FIPOi6+k6loqyKrhskq+kIGUNSg=; b=We42eJUg1AT0FwQc9HQgvl/kf+OZorfxKoeFvXqlDOGHFyLoP921NoQtbEaFp4vMmZ 9Zl1AC0nubPhImuhdSsfyFuz7Mi0NtiwocL4rj2HsMs2KjX84OhCH0daYcJqhfG1Tg26 0k6MYifdXHHpWtGziXH6Qa+WZnbUEIKLJYWwm6wMOeOVQXh0+XcJ5mOlC8gSBYDL/A2E Fd2N5/gI4Q8TJKtn40U6Sspu/OvIW2ni95JzyzJ1LrUqlGIgW3ZrvNFFSczr0YbCFuBW 2siIQZEQLmFuxLcbDWMOzWhwBCfQXOgxW0VDqSELm/pVoorxoP4RHR2eFktHOb3Z8nMH oIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P005jFr+; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si1140269edx.415.2020.11.19.21.10.09; Thu, 19 Nov 2020 21:10:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=P005jFr+; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725974AbgKTFIU (ORCPT + 99 others); Fri, 20 Nov 2020 00:08:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:55888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbgKTFIU (ORCPT ); Fri, 20 Nov 2020 00:08:20 -0500 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D288223AC for ; Fri, 20 Nov 2020 05:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605848899; bh=EMPOwX+GM6nne2Kxd6eTK1Le8OOHUrcl7eJBCN+OBc4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=P005jFr+rlVpGC65OoFhYcVpvQb1/lm0eauhhQ1gOh7avXZy4cy1MtYdM3Mp1nzFS d74xYGvlEOsBpW9ppN680m2IC2boGMvV3ONktSHDyrjFwL9wwE3A6fSf15MS8YuX6n JnAAAE9tjC5vv0TbQ38d9Sg1VO5dvTLU7xU5gGHk= Received: by mail-wr1-f48.google.com with SMTP id 23so8698599wrc.8 for ; Thu, 19 Nov 2020 21:08:19 -0800 (PST) X-Gm-Message-State: AOAM530so0qyPQnczfxR/xtzwf1dYcITVE91QsT60+8Nl2Z6AOHSj720 3n7YgqgR2LdYPvIoxC1nSMYQdYjvy4Wptxxhtxb7QA== X-Received: by 2002:adf:f0c2:: with SMTP id x2mr13572183wro.184.1605848897708; Thu, 19 Nov 2020 21:08:17 -0800 (PST) MIME-Version: 1.0 References: <20201119233257.2939-1-chang.seok.bae@intel.com> <20201119233257.2939-15-chang.seok.bae@intel.com> In-Reply-To: <20201119233257.2939-15-chang.seok.bae@intel.com> From: Andy Lutomirski Date: Thu, 19 Nov 2020 21:08:03 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 14/22] x86/fpu/xstate: Inherit dynamic user state when used in the parent To: "Chang S. Bae" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andrew Lutomirski , X86 ML , Len Brown , Dave Hansen , "Liu, Jing2" , "Ravi V. Shankar" , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 3:37 PM Chang S. Bae wrote: > > When a new task is created, the kernel copies all the states from the > parent. If the parent already has any dynamic user state in use, the new > task has to expand the XSAVE buffer to save them. Also, disable the > associated first-use fault. This seems like a mistake. If init uses AMX for some misguided reason, ever task on the whole system will end up with AMX state allocated.