Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1447180rwi; Mon, 10 Oct 2022 17:00:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vx3tx+DpFKpSlivPOX2TYSNhuD/7eTIui5ndKUI2zC66AGn5Ki1GXni+p8oXWJ+z9YjYv X-Received: by 2002:a50:ff13:0:b0:43e:76d3:63e1 with SMTP id a19-20020a50ff13000000b0043e76d363e1mr19960864edu.271.1665446442540; Mon, 10 Oct 2022 17:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665446442; cv=none; d=google.com; s=arc-20160816; b=Lu6tDDww0dxDZdfSb3ZPHZd08fV9PyRf40S8O6MozBZ39zgpnzpdoUhQFIVZUGwH8w JAyLRWryKkPdRTpgHq4Hsp9dv32I91QH8yBw1CxMDJJn9dJEs1obT28Q++2IisiMuu6P Z9LkpnTDKXiZnOsnss+11B3dW3GUFPTtaq1lzce1HYoFfqJ6+ZDRPOyNLOPNt8kw4J/u EGwrqevRRiKIffYaRnSRpNeuB+y8a/5fZ2iBwEkuiOqQQTIIxhcdpuG5Yv+g/pCA/4M6 vzpZPOuzYBk9axpSdkTxIs7qFsZ1KKiVDLRFP9gYmdFIedZ4m1cmroeEANtJnhrZUKPU GF9w== 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:dkim-signature; bh=IKLnyVJ0nNgakFSgUxLr7WhxEeqfhLp9XdGiHhrJ06w=; b=oQpNItnIxj3wogDiW0oeElj3dpMSnPMJ5tDjQ4Haud3lhmrJy4Nf9HzJcFfW52OCz5 L9eTMKO+sSFjMp4VXsw7RkW20bRvur6jRdtq9qQy4fcOsJTIBLLUk3BdPthD+Aaq3BU+ KcSFwJQFYY2yOpAChdplCyIW+M4isrvaF1Ar9GI6E2M9lC8mfrteNOVHOj2xTJ6j3/ir B2S74MGfSGNT+lwjDIrnUb4kgX8irqMRhBBW8wIyExNWyFXivfl5kwqMlJH8B4a5VbW4 erYdNhv6vDGXOZSgVco/NkhL7/lBvwnbjIAt1Jvlnse5AnbvEJZZgRuuUWBk97NSra32 zE1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ryi518lV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh10-20020a1709076e8a00b0078dcdbe650fsi2191968ejc.443.2022.10.10.17.00.11; Mon, 10 Oct 2022 17:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ryi518lV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229475AbiJJXQQ (ORCPT + 99 others); Mon, 10 Oct 2022 19:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiJJXQN (ORCPT ); Mon, 10 Oct 2022 19:16:13 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829D1748D6 for ; Mon, 10 Oct 2022 16:16:11 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a26so27859969ejc.4 for ; Mon, 10 Oct 2022 16:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IKLnyVJ0nNgakFSgUxLr7WhxEeqfhLp9XdGiHhrJ06w=; b=Ryi518lVq+timi1Kqu+idgXmjtgi4HCtGXEwjzHDXXl5PQ9749Qk6algii3a0SO5OQ W5+ghws/D6+LGX63grCrAsJAZ2X73rWnGpEuNTgF+0sG4sOILzGhkGX1Eatnq4XDuO+X 4WKk/7sX2kSc1WGM8iPo6ZmmMKzUwbF6T44FNfCuG0gwQwGTs5Cd0CnlMBZ05MB3LQLt Z2/G8pNFwZcsBymYsai2ltCRH53PQ0EAi/LOGc4vOAYVbdKHShVKFSmog4D9gs7kJNwO DViA4/Du1iDndpYP/18p9ZZjR1R6GgtV0QQVFLT8YhigXRqJo5/XQWzaAym5gYK8HDex ABKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=IKLnyVJ0nNgakFSgUxLr7WhxEeqfhLp9XdGiHhrJ06w=; b=H4rzPuTAEPkifa8cPH4Q/5HFDOpKZBOb2+j9xt5hkd/Z9uKcVihEiSM4E7Oq8UYnE2 co3DwsY75+sCiy/TjSTLiKo4EvJngMXiGr0l3n747Nhx3k/7IsKEzfRNMTtwJKe9g1CX qJrGQsuK9/LkXtAuc05E1RmJOal9KQFef8JVtWR6Y+vnFbQ53bO3VB71qgfA/xI3xUoH S87OXKZ/8P62v+5kmK48p+VXz9QBCXQ8fbFUvUO2Rsdk7TA83Vv1oLtrEHtuHehkz7MR 88eqH7jP9OI9bu9epMh+NPESwvPOWvoN7rVxHRRp154877EPiy5w9kMoJgADTSeKucCZ bHzw== X-Gm-Message-State: ACrzQf2ORu1ByzXy1AOUEGCPAXZmn0aMofQLBbwhFdAFhY/czN5mKv/X 4mWbdeSPo8J9cgpNp/EXrsVYF/LjqHq/xG2LDSWM0g== X-Received: by 2002:a17:906:5a44:b0:78d:4c17:9856 with SMTP id my4-20020a1709065a4400b0078d4c179856mr16889557ejc.477.1665443769407; Mon, 10 Oct 2022 16:16:09 -0700 (PDT) MIME-Version: 1.0 References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-26-ojeda@kernel.org> In-Reply-To: From: Sami Tolvanen Date: Mon, 10 Oct 2022 16:15:33 -0700 Message-ID: Subject: Re: [PATCH v10 25/27] x86: enable initial Rust support To: Peter Zijlstra Cc: 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" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 7, 2022 at 10:18 AM Peter Zijlstra wrote: > > On Tue, Sep 27, 2022 at 03:14:56PM +0200, Miguel Ojeda wrote: > > Note that only x86_64 is covered and not all features nor mitigations > > are handled, but it is enough as a starting point and showcases > > the basics needed to add Rust support for a new architecture. > > Does it fail the build if required options are missing? Specifically are > things like kCFI and IBT enabled? Silently not handling those will > result in an unbootable image. Rust supports IBT with -Z cf-protection=branch, but I don't see this option being enabled in the kernel yet. Cross-language CFI is going to require a lot more work though because the type systems are not quite compatible: https://github.com/rust-lang/rfcs/pull/3296 Sami