Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2641453rdb; Mon, 12 Feb 2024 11:12:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxjHaIbelf7TEoc5TCnz5Q5ZucE5OotgIsqam2pLJdiMmXF0qWO1PPuek1IALUmbW1ujdB X-Received: by 2002:a2e:99c2:0:b0:2d0:b3c3:d8d8 with SMTP id l2-20020a2e99c2000000b002d0b3c3d8d8mr4777659ljj.43.1707765128301; Mon, 12 Feb 2024 11:12:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707765128; cv=pass; d=google.com; s=arc-20160816; b=OoidJS6Y/HDIWRG9ZsxeH3W9DaIxULVwmu8UxFnTsgILl//fcNIK8aekOVDQLz0B80 U3JBGxNxLOrwA9HA/mtwWX1oBpFhe3PCse54fzLZavTXa8CF0uu4hISnbI/GyCXqh3xy 12z3jLbqd5+e4RQoH+7+q0cUL7UphISr5VeKr9PzNsJFdmnxLo7mB53rDR47uol5iD+d UyM8FDpO6JekHFk/EQ0lZtpq/F6/DYl4mLDNu/2ryKJHLdQtUrhxlVrpBEys5Zgo6KqF avFL60GiPTnOrbwEeB3TTuazVeBgPbLmdoTZWLntXOmIhMhVI6ISQWkqyxsKuFB2C/Wa s+qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=XzCqnLw1+99Zw8U3ViYnydrnyF7SQJQlIabSysNhMG4=; fh=dhTCesxE9dWeJY54QdoA5FMzBYmZu0JTEg5+Je/Xw7A=; b=cbnPJ+DdG2rn93h8h9GTTEQJ9Hw7efB7mzYcOVVqBoJZUI967FpLNtzwhpJ/rt3vPn uhfe10/3pFvx4KbSBe5/g6t/0cXx+/Gz4x2vsUjOg8AfY1U0SoBvfurlfStZh021sIwU y3xg4X6gQZ8qDmAVduV5g4UUvedzGi5igW07CD9XrHO9bIXxPw53jX0DI48bgDPkdGjw vDOvhXvAVjO+ums8EECLafSZ4klguUbpYRm43IrZJGsW4crlXkMkldp4BCEwqSWn8DHH MkXRAc5zV9z8JDxklIC8G2OYa5/zps+/LfLYTcebHBDNwB2JziQ+a79dNc7Zl1Id3HiN wfaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=FJGUzsqs; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCV8WidxovwQEhLaIfPxhJgwWR+rb7fiofkWgFSWe2JIH1TYnM/rKii8p3ygPpU+0OrvuVXKBJS7nBsxuyxvup7wDqj+Y0JhMice+r4wsA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cq9-20020a056402220900b0055fdba526d7si3070317edb.276.2024.02.12.11.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 11:12:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=FJGUzsqs; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-62250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4F79C1F25D3C for ; Mon, 12 Feb 2024 19:04:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C42AA41202; Mon, 12 Feb 2024 19:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FJGUzsqs" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D4AF405D4 for ; Mon, 12 Feb 2024 19:04:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764651; cv=none; b=UDUi3K3yqruhQspSU9KnkRg7fCAkz0IMCPACO4cbYqVYLmUyh6WeoHlEgYnh7DE6Y8kF5GSO70hCNZh+eAP+i2SoPyXeilfhsuaLHocfKDCPjEliUMTwnHTVNth526MDip0yHh6JFVXQ7EyXpNpK+OPJCDUItErPr7uFxl4iQyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707764651; c=relaxed/simple; bh=XzCqnLw1+99Zw8U3ViYnydrnyF7SQJQlIabSysNhMG4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZY6ISshZIzrfa0Y+AC1fNs0EPo/ipcNuYBeZdWPh/m88qF7U1YHcMdvE0PyjNy+6bdNBSmWGLREWcEeNQXCdGIjpOQyfia1pUbTxL2oZcUdrU4fPASbj5AmtZ6Wh5C8rlfonz/U5vXOAdrcRxLIl6lPsHi3Z5Owpk3L7WptmtAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FJGUzsqs; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a36126ee41eso467978166b.2 for ; Mon, 12 Feb 2024 11:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707764648; x=1708369448; 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=XzCqnLw1+99Zw8U3ViYnydrnyF7SQJQlIabSysNhMG4=; b=FJGUzsqs0oEXIEXG1O02mZWoh9PNX3G4tnTbB8/nJZ9Fjpi6y5UD3bLNJubc1zHB7U 3DxdA/TfREU1MRxReA1fDE9jWqdouXmPpdwWUNNXHp+9oMvWb/mCE57cGOD7DzEetjH1 Rp4TVwoEM1Sdt4V2ua+fV1Xf2qmQRW9lTtiTwLvB5p/kKsjm6ZIaYv/YvAcE2cRZQrp8 /28TyfgW9rNe7Ilm08pbMZdVrRgK1e+2l101h44QRrTA1BvRStcOwCKW74jUaWs7De+q U9Vxs2OQi1k2tsh+wXf2gWZYUOL7/FP6SmHafupc84Dup1RMe6wpTm3h1P9K9SAktKgl R5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707764648; x=1708369448; 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=XzCqnLw1+99Zw8U3ViYnydrnyF7SQJQlIabSysNhMG4=; b=jFuePkewuqiiCwzn+11vFC2vxdBz7ZzJrkqNgXbwHU6uNtXahME6k2HEMO1X3SFOv1 ak2aRusR5Qhb2O2y5XwZR7BkrNyqvCmOSkIDJ2JI+PkNc+GahuT7SfZNmp1pCKRb24Zv bjaCLZ/KJufOE6he1jCezhi+Rl3EM4q1HfTvFgOrQVUIMKVRKg2vSJAnKBEqXGhD9Pxu HGf3QKKq1u2zHN1tMeO+atWXKeinQUlxNxd0UECoYVDgyP5aSaTUtONoo+JWPdHHqUkT 0F8QzMj9jE1qd6z0iShgvNep5ZLxwnzCVeX3VKsE9u9XrYt2fCTOxTz7bZFUPw6vYEQu Y5sQ== X-Gm-Message-State: AOJu0Yz4DieJm7bL6m3WXHN8t/hSIbBXFDF22K0MtwHqZdwGy0VwJUcS 4vClUhg4v7VsLlhyr6HTf5bDJlv6yhuvGZn3jvxQjIRTV5QJHnb/KUZ6SwfDPBiIODeuR0cMfh2 vr4edgncW6otNaiEQxos5x/8eShaFWFUNtD8yhyJZGSKAWMpgyJCtIKmKHA== X-Received: by 2002:a17:906:4ad8:b0:a38:576a:f070 with SMTP id u24-20020a1709064ad800b00a38576af070mr6189593ejt.32.1707764648413; Mon, 12 Feb 2024 11:04:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117-swiftly-parasail-618d62972d6e@spud> <20240118-implode-delirium-eefdd86e170e@spud> <20240125-bucked-payroll-47f82077b262@wendy> <20240125-lazy-thrower-744aacc6632a@wendy> <20240126-eccentric-jaywalker-3560e2151a92@spud> <20240209-rage-keg-1b2982cd17d9@spud> In-Reply-To: From: Ramon de C Valle Date: Mon, 12 Feb 2024 11:03:57 -0800 Message-ID: Subject: Re: [PATCH v1 0/2] RISC-V: enable rust To: Trevor Gross Cc: Conor Dooley , Miguel Ojeda , Conor Dooley , linux-riscv@lists.infradead.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Nathan Chancellor , Nick Desaulniers , Tom Rix , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Matthew Maurer , Sami Tolvanen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry for the late reply. Sami might be the best person to answer this, but KCFI (not CFI) tests are lowered by passes that are architecture specific (see https://reviews.llvm.org/D119296), so we'd need to add support for RISC-V. There is no additional work required in the Rust compiler besides enabling it for the new target. On Sat, Feb 10, 2024 at 12:13=E2=80=AFAM Trevor Gross w= rote: > > On Fri, Feb 9, 2024 at 9:18=E2=80=AFAM Conor Dooley wr= ote: > > > > On Sat, Jan 27, 2024 at 02:46:38PM +0100, Miguel Ojeda wrote: > > > On Fri, Jan 26, 2024 at 11:01=E2=80=AFPM Conor Dooley wrote: > > > > > > > > Is that even needed? We already have ARCH_SUPPORTS_CFI_CLANG and AF= AIU > > > > rust supports it if clang does, so a second option is superfluous? > > > > > > From a quick look, I don't see it enabled in any RISC-V built-in > > > target in `rustc` yet. > > > > > > It may also still be the case that KCFI needs some tweaks for, say, > > > RISC-V, before the flag actually works, i.e. we couldn't just test th= e > > > flag in that case -- Ramon: how likely is it that RISC-V would work i= f > > > KCFI works for aarch64 and x86_64? > > > > Well, there's been no reply here. I'll do sa you suggested and add a > > depends on !CFI_CLANG to RUST. > > > > Cheers, > > Conor. > > > > I asked on Zulip and it sounds like Ramon may be out [1]. It > _probably_ works, but going with a dependency to not be blocked on > KCFI is probably reasonable for now. > > - Trevor > > [1]: https://rust-lang.zulipchat.com/#narrow/stream/343119-project-exploi= t-mitigations/topic/KCFI.20on.20RISC-V.20questions