Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2266498pxb; Mon, 12 Apr 2021 20:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvPbKEWqSaVZbHIDRlNlHSs24Le3esUb/w53GdW63g/e/c8A1fVOkLUrsBnSEsYFpx080T X-Received: by 2002:a17:906:130a:: with SMTP id w10mr14848274ejb.71.1618283263392; Mon, 12 Apr 2021 20:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618283263; cv=none; d=google.com; s=arc-20160816; b=sgSgSyetLtxT5BzXNy4TvmW4RDotw3+0x+haN1Egf5b2Vr1wW4rjDNhk643z/uGCtH js5C98GkUe/FJyvYykXwlfRuXUnNnDhw+6K1nbwsQ6pQ1HT66d+WYhyaKDMsk2v1mXku Gm5Pa+5vp8ERGnQuiEBxkHXwHHqACwh+fRC1bNmTXegTUnFuMSO0DIT4nu7OEPWCyCgv mCXnDsFPbObSLdZR8kf+sv9yNj3LdlMCLpj9YuYwDla5iAueY5+W+GLFEP+uELXl2ZU7 fXaSNWJdvTjPO5VrGv+ImQ0duB8bZl35kcvtByc294NnNv1KY5x7fDndazfTrkcIaYt6 qQiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=jPyzOJSADw1ugiLVGR/0etGoaBvM2CULjUgMo7FWp2A=; b=rjnhBHdW1qPmV58haC7xYIWQXLGMvGM5b0x1TGfGIMpbGbtHHI2vLV5IXx5mPbqhyg DQOkYx1NHtwvpBrN06YvhK+INLUnnrUZfE16LC4poQejKPWUXRJdXeNx6Waj/gd5op5K opd3CrltCDmpIhaVx62MUBQJFtG1G/8vkKQOD9oYd8urrq/ux3nRjZCrC67KM1jXbEvV nrfqqdElDUzGrEiN6qIZQiOo25z/di+LhdKhe/bONDox0waGRFZf7bqBuKu/DdJ2U+no A2T+JvXUmJ8uwmtyj7bkgtt284Woki1bMtzh0YcVDRCzegO0eEgHe6BMITxoD8/HeccA lRRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AaMK0Rct; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si5458558ejs.621.2021.04.12.20.07.19; Mon, 12 Apr 2021 20:07:43 -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=@redhat.com header.s=mimecast20190719 header.b=AaMK0Rct; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239682AbhDLOid (ORCPT + 99 others); Mon, 12 Apr 2021 10:38:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51526 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237558AbhDLOid (ORCPT ); Mon, 12 Apr 2021 10:38:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618238294; 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: in-reply-to:in-reply-to:references:references; bh=jPyzOJSADw1ugiLVGR/0etGoaBvM2CULjUgMo7FWp2A=; b=AaMK0Rctb67BgNJrcRQHT8rbVNSEXb6MoVnQztkgRC3xO/AGNL38bsU0CB7cyc/u9UntoU eeXbKk7bq+tT1VScnnJqs5MsYkpFcxIXTZPITR9LibtgJ5FxDCbLUSi1mPwa4vUgMApKGH 8gGsFAPmCCOtnH8qPP5qL1QGGJRmrJM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-48-k7kdLMMmMvesWyhYmho-bA-1; Mon, 12 Apr 2021 10:38:09 -0400 X-MC-Unique: k7kdLMMmMvesWyhYmho-bA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C7CB189C44E; Mon, 12 Apr 2021 14:38:08 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-148.ams2.redhat.com [10.36.112.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF6D75D6B1; Mon, 12 Apr 2021 14:38:05 +0000 (UTC) From: Florian Weimer To: Borislav Petkov Cc: Andy Lutomirski , "Bae, Chang Seok" , Dave Hansen , X86 ML , LKML , linux-abi@vger.kernel.org, "libc-alpha@sourceware.org" , Rich Felker , Kyle Huey , Keno Fischer Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features References: <87lf9nk2ku.fsf@oldenburg.str.redhat.com> <20210412143139.GE24283@zn.tnic> Date: Mon, 12 Apr 2021 16:38:15 +0200 In-Reply-To: <20210412143139.GE24283@zn.tnic> (Borislav Petkov's message of "Mon, 12 Apr 2021 16:31:39 +0200") Message-ID: <878s5nk1pk.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov: > On Mon, Apr 12, 2021 at 04:19:29PM +0200, Florian Weimer wrote: >> Maybe we could have done this in 2016 when I reported this for the first >> time. Now it is too late, as more and more software is using >> CPUID-based detection for AVX-512. > > So as I said on another mail today, I don't think a library should rely > solely on CPUID-based detection of features especially if those features > need kernel support too. IOW, it should ask whether the kernel can > handle those too, first. Yes, that's why we have the XGETBV handshake. I was imprecise. It's CPUID + XGETBV of course. Or even AT_HWCAP2 (for FSGSBASE). > And the CPUID-faulting thing would solve stuff like that because then > the kernel can *actually* get involved into answering something where it > has a say in, too. But why wouldn't we use a syscall or an entry in the auxiliary vector for that? Why fault a potentially performance-critical instruction? Thanks, Florian