Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2006256rdb; Mon, 9 Oct 2023 09:31:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6XbEw89wgktlX9kTArOar3LfM7TOeRPMk/Gf69ydhsdqLtjgdpSXUbUmSO35zfAQQYx+6 X-Received: by 2002:a05:6358:921:b0:143:8f7f:9150 with SMTP id r33-20020a056358092100b001438f7f9150mr17693934rwi.13.1696869102857; Mon, 09 Oct 2023 09:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696869102; cv=none; d=google.com; s=arc-20160816; b=k0PDW++Mb+UMtpfDr5907A/Tn3t0yNSpsflpG81hWfcrAlJl18VhjI44Vo0TOo65my 0/nPfqXU5yeXacMugAJuc9Ovho88tvF731lgl2BDtxzfJxZ9k3BrfeUSbkb8epytG7xG fDa7LN6hsZG/9gnDkNXJGMAyNf3IIyAM6Jnv3AO4oGICBSe2K1KYPZELRF/g2hZ5erMH xEgaaLxAlUacu1pr/KdEiJHLn+m8u27J5RPkk8CVUpO3vjAEcDAezWbxp/MtujfnAeRU Qasrc+otJY20w+XNe6s+bWtUUvAQ19vwpoK44E/jtCluAz+0Ta+Gfy3Nq0pc2++q3Ul8 YMPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Eze8ie+K0Fy5Qmq0xuinAFfSz+bncxmLAfx+2FZzmLY=; fh=veNqCPfP++SBBi5W4XwojNFihSv+PAh8rtGdATF2cU8=; b=S6zNA14vxALtNgGdt4JukjhdcI1ebMBVQBmS5G99M2oyluoGkDLM6Hy3kg6kOE45Rt N1F3dQzO5siOG/c401BFfrg8TqW79vVPu1fSgFwYLDHLXohOQIG3sudAhL/zOZFBRonY 2m3Zqqg6WLG9ndx29bAJIQItA9sLLm+cmFT/iZbCYM1JoiXFhVCUFABhYWaZ4FRu5Pjy 2oCg/tZbDoy8ANlNwOa5WK5EXSPCfcpKjtP8+N3iej/E8aF/VfNHVPJxnhZaHvOn7+uh 3+StMd1p4FhcRNGnvHQ7WLybVZqqZ4FDZ5xEW0E1PLqCsidjCWTZZWWLitw04xCBhx6y 4kJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fh0Iwjkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id om14-20020a17090b3a8e00b0027768e7a9aesi10364501pjb.120.2023.10.09.09.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fh0Iwjkp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 43FD08114EFD; Mon, 9 Oct 2023 09:31:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377242AbjJIQb3 (ORCPT + 99 others); Mon, 9 Oct 2023 12:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376996AbjJIQb1 (ORCPT ); Mon, 9 Oct 2023 12:31:27 -0400 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E0A6B6; Mon, 9 Oct 2023 09:31:25 -0700 (PDT) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-5a7ad24b3aaso4990367b3.2; Mon, 09 Oct 2023 09:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696869085; x=1697473885; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Eze8ie+K0Fy5Qmq0xuinAFfSz+bncxmLAfx+2FZzmLY=; b=fh0Iwjkp3lUPfApI9wvmu3/DeF6vSshCH0DaX4/iIqQcje/GmQTbSkPRSQXrlesMhO 5Y2Mg++TwPyaZdO4EsNkplLTBHlzm7BZUA5lYYbWHHqaMEyPdiOzFGqS+88T5qvK8NXZ YbA75pDu67NXLXU7YOlpBbiKjMDTwxZCSW0EYxhXQWL0ifl5IG1QYljbOcfSkqsgkNCw CHxJ60iE23KYf7WfLnfrWtaBw/BjgjlQy3FJhVXuswCrajCTj382fGdD48Ocr3f0Sx9d mctnpHNpfPSUH5UiV8AqBmpXvqMMGgBjFTnjLqXgUR0lrM7z5LQxNLDRYmkRTuQ9ntp/ XV2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869085; x=1697473885; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eze8ie+K0Fy5Qmq0xuinAFfSz+bncxmLAfx+2FZzmLY=; b=aFvAtjPbppvg0hNd1YaVHoS3f2XU8Yg6rrfXwbWYBUcb5H6xT6znQ9+FgieagZXXF4 ZliKoB3G5MyWrNZScCCPZvrKrJLjcS5itbW/ebk4EwSABXH3NrJDRd9dIkoARlZSGMaE YrdYJUeNpp9mhI3p0nh/fsLy+FZU5RQntfTK5gbbAbm0fn9H6QLP8v7SImsLner9QN1S ZLZsHUlmD9pWNO2h0fxRZeuzm+jDalOhT6DFn3H4RyVXvPRixQ4/XFShTM+bUf8PU+Dn DDAuwA31HTuG7HXUM7uVSL5ZOZjyFRF9341gOP0TBOzJW5ummLwEBb8GaR6bXBLZdkP3 cYsw== X-Gm-Message-State: AOJu0Yw+1NZxylhtr7SMZzjyBeu8Hs0GgtMQlQoxGGb+GojyT75Q3ZuK 2HpmPoUgrrMntReFvLoW5/1ea8xpfnlduKNuYro= X-Received: by 2002:a81:a1ca:0:b0:5a7:b516:6eab with SMTP id y193-20020a81a1ca000000b005a7b5166eabmr598674ywg.15.1696869084836; Mon, 09 Oct 2023 09:31:24 -0700 (PDT) MIME-Version: 1.0 References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-26-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Mon, 9 Oct 2023 18:31:13 +0200 Message-ID: Subject: Re: [PATCH v10 25/27] x86: enable initial Rust support To: Matthew Maurer Cc: Sami Tolvanen , Peter Zijlstra , rcvalle@google.com, Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Kees Cook , Alex Gaynor , Wedson Almeida Filho , David Gow , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-doc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 09:31:40 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 9, 2023 at 6:01=E2=80=AFPM Matthew Maurer = wrote: > > If the IBT part would be helpful by itself immediately, I can split > that out - it's only the KCFI portion that won't currently work. Thanks Matthew. I don't think we are in a rush, but if it is not too much work to split it, that would be great, instead of adding the restriction. For retthunk, by the way, I forgot to mention to Greg above that (in the original discussion with PeterZ) that I did a quick test back then to hack the equivalent of `-mfunction-return=3Dthunk-extern` into `rustc` to show that the compiler could use it via LLVM (by passing the attribute in the IR). At least at a basic level it seemed to work: I got a userspace program to count the times that it went through the return thunk. I didn't try to do anything on the kernel side, but at least for the compiler side, it seemed OK. So it may be way easier (on the compiler side) than the CFI work? Cheers, Miguel