From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by sourceware.org (Postfix) with ESMTPS id 9248C3851C17 for ; Mon, 29 Mar 2021 16:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9248C3851C17 Received: by mail-ej1-f47.google.com with SMTP id u21so20422221ejo.13 for ; 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=o3sW97ZYuh89qm0tXyH4tu0morKdoTao9ugm2ytvyXMQiAweBY9puwiEBUEY0FkdYu lCtPwiXYP00IxYxgQV8f3WK+i3nVGCnPmhs1HHF1gABUkeIh1HLSKZiE9XGMqdZDKL8C UiKT70yLYMrlIM7EOrVdMqK/zOQCY4H2mIojuufkPZNfhloCPW961iTgIpUQCe5uQBal kIv4jg1Z/AzXsxzlUp4OgYoQEWOtLwUsT93h3e99RdY11ZWvK4U/wBMuETP35y6MpgMy 4Fhx51LLsVuBM+ofvP0bU0xk2ZZsfs/g1Iv6ibc5T8CJyFM9u5TOHfOo0wqW1RhqELmv tSJw== X-Gm-Message-State: AOAM531IrDZz2Z9mRE4LaJWu4qHLMqiegbZQdQahzy6mpT0Oz/8iCK9b cZ07+AUjntP9aHiQyO5Fkow+OwLPjvgP9paN07s= X-Google-Smtp-Source: ABdhPJxjNrDcuW6fqcnTahZ6x0HV9VofKao6CrqWau5z1tsA6fl+HcOu2Ky9NWP5J3t8vPib8G1j0TqQqFN0HBYRtBM= 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" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 16:39:13 -0000 > 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