Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3725125pxf; Mon, 29 Mar 2021 09:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzldZUgiz43ESSWBLFBiAugfXt+uWPJEqH7ZqCLGT2WTrotAnAGa+EM2zzCFq7xL8zVgN7v X-Received: by 2002:a17:906:b80c:: with SMTP id dv12mr29623603ejb.110.1617036063927; Mon, 29 Mar 2021 09:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617036063; cv=none; d=google.com; s=arc-20160816; b=B9H+fR2rwv6JwLIdiolNu00foP7tn2FiTz5WWjLv5zF0+XTgSjGXr9uDvKcmXk5cea uDQuLMpaFX7DfIFHpSTg8IWGrh21rmRivIv04DwKEe8lbfsKGHsApqwgEKjhEEltM3kN oFKuMSjOgFX06sjLkKZTtl/o1fiWW7njsJaLWOfni8mlX8ZUcvzcQOpfIiCUwtFjFIxq FwKnRlxTwoFKvbyEU0x503Nr7PbatgsOXE9+uYEpkBIvZRa9HU0vYwP06IMfZLccsXGE 6Yexhk8sKEnK00clhAG8yItr7ggYyWqPEcwkaTwVUiI7nKyViq08zDGlKle9boCdP887 lzmQ== 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; bh=HQBzHMmoWkQcaprrOUSdhejJEll5+CAI/Ph1n47/PJw=; b=aI2nNV6ubFLUkK6h9MmNtryLPyEKhTKlrFh8JDhxdopdKpVBQIBrCZbD4XpT+4vy3P OC2FZDmG2tVm7g5kUjXGCiSoSeYPDiSpkANgGv/zycWZcX9BIei7UFamf7WRUBBTTFHg AY7SBxjQXRPvU4agbKVIkyf+Sw/mF0J78D1qI/z9rrBlKb8SHhXvRAilrWKqLs3ST3ec v4u2GHOHn3X8jq4i7KOo7SabWZM9mHIzSnyxER2i3UKg6OtluVjAzXegntWxWLb/t9Ur nCUkyrPoIyQG821SD81Q47/Pe281C264qj00qWv4KinlTiht+Iw6OFT9R5QtCJcufAJq n70A== ARC-Authentication-Results: i=1; mx.google.com; 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 w14si12820985edu.225.2021.03.29.09.40.41; Mon, 29 Mar 2021 09:41:03 -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; 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 S230482AbhC2Qjd (ORCPT + 99 others); Mon, 29 Mar 2021 12:39:33 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:37675 "EHLO mail-ej1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbhC2QjL (ORCPT ); Mon, 29 Mar 2021 12:39:11 -0400 Received: by mail-ej1-f45.google.com with SMTP id w3so20495664ejc.4; Mon, 29 Mar 2021 09:39:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HQBzHMmoWkQcaprrOUSdhejJEll5+CAI/Ph1n47/PJw=; b=aXJ6nCTAcMIUUMfsjlCRMqOemgfASMfudMfr7pYVFUEMyEBV/+LeHqigFZfZdvxrx/ G/e5DSOIO7PvgAktIN6k+obCdE50ru9Q2qDUT2hnC6o0XSRN2/3HlkwKnCR8/skY3kbv 8UOEasyunFwOpPsONnLoan9/oM47R3DSnSO/R+FPUaRslhn2xpqkBoJFwY93s64l1Q67 n9M1DFjKdyOnrL5mE8fsK5k3pi+PRLFfK8AtvIRV3IuXVuplBlPqddrO1ps0O/IZseu5 QLY8IumlWe9lORgVZ/y0FMRV/VwKSMf+zVCMoZRrLPcbmQceubJOR/Szw+OE8NskVQKY nFUg== X-Gm-Message-State: AOAM530e/ZF0fOAQGIM3T7hmJ/KD2eivh9PxhmpvvFxbBRsdK2/TF/D9 tvTwGXzL/CwboXRDFuROkjdbUAkNuMUhvUyMVkZ19Jvr X-Received: by 2002:a17:906:b4c:: with SMTP id v12mr29508059ejg.330.1617035950748; Mon, 29 Mar 2021 09:39:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Len Brown Date: Mon, 29 Mar 2021 12:38:59 -0400 Message-ID: Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features To: Greg KH Cc: Andy Lutomirski , "Bae, Chang Seok" , Dave Hansen , X86 ML , LKML , libc-alpha , Florian Weimer , Rich Felker , Kyle Huey , Keno Fischer , Linux API Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > In particular, the library may use instructions that main() doesn't know exist. And so I'll ask my question another way. How is it okay to change the value of XCR0 during the run time of a program? I submit that it is not, and that is a deal-killer for a request/release API. eg. main() doesn't know that the math library wants to use AMX, and neither does the threading library. So main() doesn't know to call the API before either library is invoked. The threading library starts up and creates user-space threads based on the initial value from XCR0. Then the math library calls the API, which adds bits to XCRO, and then the user-space context switch in the threading library corrupts data because the new XCR0 size doesn't match the initial size. -Len