Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp235008rdg; Tue, 10 Oct 2023 08:49:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGs0u1QRmc+T0WzWWaPGts+Cd1E1HLgeuWiiBRSm9/8Lwc3di2Ua8n0hMTf1Dg4waEB+DaP X-Received: by 2002:a17:903:41c4:b0:1c6:294c:f89c with SMTP id u4-20020a17090341c400b001c6294cf89cmr21311564ple.63.1696952979270; Tue, 10 Oct 2023 08:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696952979; cv=none; d=google.com; s=arc-20160816; b=txgKjv+yu2X/8VIUIwLYsK3t4fDS1bwJGO/ohM1Nr1vwU2TyMeE/86/KvpPdzbaCLz Q150TxiuhEnw5Y1RUhjNv0AhrGEZxzcjssVvGfoMPjz71oLN4GY9J7yDHTrpWLQnf7ir 955aMdHpd5B6jJ3yqEN6Ep6yyMOOz2ata4LDQLAMwon3qLHmE6XmFSddhKRumIvkRIno +oLryRUyK6WJfYX/9vy7ShU2Jb4Kxtjhi8YXuB62/ZMhCnWNViChjHlfxy5LjHwS7X5K LaJkMcWQUSuRAoQXuXzXV1MSfZSIzhv0O5EU+Dr1cTnX/Qwt9W4ECbfN1WPqENNoDved Jhqg== 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=hcO6nbqUQCaTitXMmYutkN0cL6Et6mB9aV0MG0pJiLk=; fh=3o6ZDlEebuF3cHsqV8nqx64NKtTFeCGun21hfSieELw=; b=F7kv+iRc7AE4L71qCFvaGYJBEvCxRlaC6IL4pJSMWBQTKz/D/1cLFHcVn2mVgjf9Qg a6NJ5pBhYDq6v8J8JvuQ4MdOi2VSiOQ+LN0CkJaCu0S9LXUPLMX1/0BIWZriaiwlwGv1 lpRITIVPmCX74/N/LO1C/DBb5tPqCj5voUqS1+iuHygIwKpgP4+sQwngRjGcy4l0bbNF l+Z4jJ4lg5GT9QukRvdsZZP4e6ZR1TYf0HPtWtkPR8VwIopT121bfCnXSzTHwTlYjLDg c7cLv/V2YrLkQdGZlbNt5EQco5JBA+3UR79Qv8o4JTaAgYTSe1ouh145n6+YOgFPF91E ttHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mg8IuD3m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h13-20020a170902f54d00b001c3b4eb2135si12882652plf.463.2023.10.10.08.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 08:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mg8IuD3m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6FBDE80B1A01; Tue, 10 Oct 2023 08:49:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232601AbjJJPtZ (ORCPT + 99 others); Tue, 10 Oct 2023 11:49:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232441AbjJJPtY (ORCPT ); Tue, 10 Oct 2023 11:49:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0198B0; Tue, 10 Oct 2023 08:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=hcO6nbqUQCaTitXMmYutkN0cL6Et6mB9aV0MG0pJiLk=; b=mg8IuD3mWYwtoSxIe0694DSttk h9BJQEuppRy+URK+6LfaihMRw0WJDU2QDbIIqzprRjAof3NRISqdKdrBzRNjp0u11f0yILgiwFtGk n7o9Vsek58Irbon9f4KcFpCE3iBlQgraRch16NRv656pEi1qC9nm9eHlBIbLPzt5VJKyGhCPeUTnd mkD+Xq4M/RyQ4LY867kuGUBFmamYMCBeko+dynwJaxg3KWkHq14CKEcGHzMiJ6pPAvOTHi3eSoMJk SN4rvt1A0ymaYo7gDY1GDjVAueWWPv1lnjwOj86MXjC3Pz2q1vv2H/DiKUedfKc4fkK+Bix3XbOA4 LrPWE7ng==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qqEyY-005RGN-Uu; Tue, 10 Oct 2023 15:48:51 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 9C5B03006DD; Tue, 10 Oct 2023 17:48:50 +0200 (CEST) Date: Tue, 10 Oct 2023 17:48:50 +0200 From: Peter Zijlstra To: Nick Desaulniers Cc: Matthew Maurer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , "H. Peter Anvin" , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH] x86: Enable IBT in Rust if enabled in C Message-ID: <20231010154850.GR377@noisy.programming.kicks-ass.net> References: <20231009224347.2076221-1-mmaurer@google.com> <20231010081220.GD377@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 08:49:36 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 08:38:58AM -0700, Nick Desaulniers wrote: > On Tue, Oct 10, 2023 at 1:13 AM Peter Zijlstra wrote: > > > > On Mon, Oct 09, 2023 at 10:42:54PM +0000, Matthew Maurer wrote: > > > These flags are not made conditional on compiler support because at the > > > moment exactly one version of rustc supported, and that one supports > > > these flags. > > > > > > Building without these additional flags will manifest as objtool > > > printing a large number of errors about missing ENDBR and if CFI is > > > enabled (not currently possible) will result in incorrectly structured > > > function prefixes. > > > > Well, I would also imagine running it on actual IBT enabled hardware > > will get you a non-booting kernel. > > Do you know what machine type in QEMU first supports IBT? I'm not sure QEMU has IBT support at all atm -- the whole CET virtualization stuff is a bit of a mess. But hardware wise it's Tigerlake (11) and everything after that - so Alderlake (12) and Saphire Rapids (4th gen scalable -- or somesuch nonsense).