Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1588pxb; Wed, 18 Aug 2021 14:18:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsoIhqK3wcAd8dN8p3YVadcuYVIdqQhp13j2iRv7zj/+E9RdWKyEbVTZ8J/+LghHBbcCgr X-Received: by 2002:a05:6602:d9:: with SMTP id z25mr8774534ioe.154.1629321513140; Wed, 18 Aug 2021 14:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629321513; cv=none; d=google.com; s=arc-20160816; b=TVDlM1JjpWzuWihbYQv9Y5BZH2dIxqPnUHivQW0xEXa2tdUEQy69uWHSdoxJMDUDgX 8DYUd5dZVkrl2FwcSmwag8NUQXFxPVRLBZgZ3jnXlff/EahvEFrY6KUdbvurqabi6wle ZUgxeX/zibhh0dW8SBB5khavPBD6M0Pt72uGQeevvM8D27OYrW1zcJF9RF+RUczgGLzj z99xKoT0++4df3n1ej2qCsco9mCplYklVzthqPzS2Sv2zCWE6pc0l23QdDEZdwPJmQxu Jf/Q0AAVf0QchTE+ZqbMJ1cFn9mEjohJKkL0j6I9xu17b2UEHDI5900qhEaNYMQeQX08 wEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=F5Jw2kveDM2SS417lKpAjkrYFkktjHudu0c3Pm4p+Ug=; b=tVEiyfMPGdl3etQ5+HyKbZwhNulHKWy1KfSxgR6o+iNZyxTp5YXjuE8RQxCbG/3K7Z zoS2188WjppXfU0JyYMpl1l2UTTCbLnb688heyOpg5KRjYkhOvkOK7oz/ndlkYiCcSZJ /ucV3qemleyi239FbLMc+d3yW3ja3NLa7ov6/LOwjB6hh2WbI8+nb+7bMM1oBEO9tLHM Pqb8y6tqGU4V0Ds+YpnOEvNIbh4vvN7j59h/nJ7TEDVTGU5c5wiCk3F9buigEguWbP2w fotZaH1nnxL8tVbnyY19EBy8WMmY6h40ov1A0GHvleiRVYrt3lWVEKtrru1SFNQphf8l CnLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ZeMrAReh; 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 h9si1094404ils.85.2021.08.18.14.18.21; Wed, 18 Aug 2021 14:18:33 -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=ZeMrAReh; 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 S233868AbhHRVRD (ORCPT + 99 others); Wed, 18 Aug 2021 17:17:03 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49794 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbhHRVRC (ORCPT ); Wed, 18 Aug 2021 17:17:02 -0400 Received: from zn.tnic (p200300ec2f0cc300211c4a214c0dafe3.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:c300:211c:4a21:4c0d:afe3]) (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 6457A1EC0531; Wed, 18 Aug 2021 23:16:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629321382; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F5Jw2kveDM2SS417lKpAjkrYFkktjHudu0c3Pm4p+Ug=; b=ZeMrARehJ4AK3R7C1saPV0z1UTEX4Z1L8FiiKkoziQ0IyqBl6C8djhhQQlUTb8Wq1DDLQu v+vanzbI0Oychv942XP4xdS3vVQSolVGUv20vOhpy/tO4cOP6xLVOj8mwxt4iLbbDsg5Ln KRGv6lFNMWq/mj1JKhx6oNToojfzoAs= Date: Wed, 18 Aug 2021 23:17:02 +0200 From: Borislav Petkov To: "Bae, Chang Seok" Cc: "Macieira, Thiago" , "Lutomirski, Andy" , "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 v9 12/26] x86/fpu/xstate: Use feature disable (XFD) to protect dynamic user state Message-ID: References: <20210730145957.7927-1-chang.seok.bae@intel.com> <20210730145957.7927-13-chang.seok.bae@intel.com> <3181031.RqgVF4sTRC@tjmaciei-mobl5> 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 Wed, Aug 18, 2021 at 08:43:50PM +0000, Bae, Chang Seok wrote: > Maybe I’m missing something, but I wonder what’s the difference > from reading XCR0. Wny, because adding another prctl() is too damn hard? What if this modus operandi of features userspace can use with kernel assistance but need an explicit request and are off otherwise, gets extended beyond XSAVE-managed features? You would wish then that you had defined a prctl(GET_FEATURES_WITH_KERNEL_ASSISTANCE); at the time... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette