Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2905770lqp; Mon, 25 Mar 2024 12:37:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOzyk8y0xbjaXUYudRIrKySYAsyMHptr9k0NnSHxq5ajvYIiBf+qhVcxNZ8XTZFG8Oiv5qviqPKboQTFsm+yB9YGkM+55iorwQknntrA== X-Google-Smtp-Source: AGHT+IHDJNfv5qNX0zYr5VK6/j24MdXP3kvA98FzK5Vg21ACMEydMfY/32IW+gqZtef3ypyK/wTs X-Received: by 2002:a05:6870:d62c:b0:21e:5733:f6fa with SMTP id a44-20020a056870d62c00b0021e5733f6famr8676237oaq.54.1711395428432; Mon, 25 Mar 2024 12:37:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711395428; cv=pass; d=google.com; s=arc-20160816; b=emoSsJXyZ3qMnp5oSjJWj4DRQw+s5mLNiFv3F2ZZLcnbAudiXlgEWfvZpoQ+FFM5xS q7h4mScaeSGLuEX7pcS4qUUpYE+fmFwMjFl3c1rJAS8pRJxhtBoLahKzYg1SinOB2Twk IED/9sog5JuHZB8lDVULs8rXHtoBVQfHc3Bq/+7eFZ6LWb4vBm288KUFTT9LxMRrReiE 8cFWZfHkx6dXbLd6coA0F7tWD7DPuP/eNSsFjZEQhbqYD8Wc+dqkNBLqV9Z9nCW/DXxT BQdcEwEXPB6MPffE5EUsrZhgBBgg2+PtIFbbyOfRmuTO0DJzJTgeENVI4X6uQYkA4HLv Rbng== 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=a8aQL/Qh+/g6MnD8suhJB3IMrCXrJXRjBKFx//tw32U=; fh=4qfh4IH8rvb+svRLG5pscd/Dp/m061yuLMgYPqJvYf4=; b=IcQdDcOTz9vNXGlMPKpqdvqP5KzLbS7O8TdgyS253jnWCWdqI/7AF+IDYlgb60HL2Y Znh9+LXyLjw7UScibOunGM73idzd75VrZxd53E+zQ5sgrJddvT/COuj9F7zqGzVtbK/N 7lhrJKdHlReMVQPSf4S2lZGjksjAuJBusMfBcHT38QxttQsZIIS+5WhC+MSHCNHpD18s NHKdY7Y28GciguyfudaFIoqd5+S/I3Vr3+uVa3AYvUf4sppDidorf9boDbS9v1zYYgty RyM2TYF+hIcUe1BW+NIpRTPFiAOqf2D7ZUFksXo3JkiJhaHfG2DYHxca3eH5sKyr4d8l iH9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d5+SDgIZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-117810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u34-20020a632362000000b005dcd2963f82si8310741pgm.626.2024.03.25.12.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d5+SDgIZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-117810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4CCE8344A30 for ; Mon, 25 Mar 2024 19:24:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 852681BF20; Mon, 25 Mar 2024 19:23:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d5+SDgIZ" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 D3B7C17579; Mon, 25 Mar 2024 19:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711394613; cv=none; b=n9BqnlSbeU/qhJfjH/VMui8n+fMwi2IN1R0i2Tyfx58V2PcHQA0tmykiBOksUaR0da2o7c2rrjtaK9S0zfNTRwLeKxJaYEaYWAW3+LufRQO4d2BEQ29BlgrSLfqxI83XkoFQ6bx5qbHMNIUGRJZrloFHkd2N8vXp81B3mkGEq6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711394613; c=relaxed/simple; bh=nAX1g5FAYeM8f4OsLvQyu5nop1FxLK7T4/S5kb/qsjk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JMV8vI9iH7DZ3tRc65jspdp6yGqEZLuENMxCNdvjpqcj4DWg2BnlcdsEo5nK4JEyDrC0zKpufwh4A7wA42GWG+O4zYjRYTMyhogTJL7Sz8tRjOwPH/JDLnQ7gV4rkp1j3b50Eqlcmt2px42Ym00LyALv3zk/DZKT/HtvblN7vxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=d5+SDgIZ; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-512e4f4e463so5100460e87.1; Mon, 25 Mar 2024 12:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711394610; x=1711999410; 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=a8aQL/Qh+/g6MnD8suhJB3IMrCXrJXRjBKFx//tw32U=; b=d5+SDgIZcJcmZW/1SQsc6plNPhxjx6yYpjsuY4IdJcy/OTwpKaQBo4yw2gXgsVB3PX jlp1UhI23eW7cwGDh5TKdHg00hRhb1rJtX+9zGToAKdv0j4k/fbzi49Si1FYA7v2sCjh i/yDBiefJDgOglz6gYyye9QbftShPbeEbqT/ukM8KWdxVrQZue6gttKbYtYMA/wlTgf1 NXeE5smvOAI4QbH/MEQ9SXUk5WcxNFTl61Y2kmBhksjW9JDiZo6vT90xlkjDm4tpDHEI MdVyvcoRwtWlyhBw7nRyIfPUZFWCHPe4X9k2dN7Xhg/xEVIeMOVKh8ZKMTn/fm1I9omD x4Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711394610; x=1711999410; 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=a8aQL/Qh+/g6MnD8suhJB3IMrCXrJXRjBKFx//tw32U=; b=KXcNnTNJUG31pMJZDmgIGEYu3EmA62SJ6pRek8jxweknJLVpcE4ioDhpVOVnyY8gA0 zRNQfYIK8vA1Sru1Fvo7XaIRdX3bHCJd0J4eqnkPS6FRxMo/XjU0XMZioQbEzNiuxN4r U9FeRcAI0HeqD+EIqp2CluY/t2Mi32lTf7Bb1c4VroSFSoMqSAB7PbNSt+yR6IH9040J bMBOub92yuZNw53K+7Rf7Xky1lylSEMFrFnaRlgx+EIIOps9rk7zr6VsrxyNclkcM3Zv OMjOoOwf+z+LuTQtckVQb+uTNpHLoBRH14WS8gjaKK3g1CarjHpccywCHowY1DxhRwTP VHZw== X-Forwarded-Encrypted: i=1; AJvYcCV8Zfs5/iSEOjKDSYRvAzHa6S+HgmkvsLZwEyfjS2n32FldEQlrKhPP9XUldNwG5rDQcogga9e+1yoG9wyYyRqP//sRgPiDYz23JAS2JSHdiipcpwqYJKSsN1Ht6YzowAdL X-Gm-Message-State: AOJu0Yxc+q5PF7/XLmsQ3gX5RwtIlHR//F+3hAjDs5SdK4mw79OhjlNk L+y2auy9T2tiDTdRAZ3mBYZGq+6OuIEGDungkrtiTtrGazI2oRqfYmclIV4lt2jZ5qQ7Z8oSu9+ vyjLmr2C4xG81WltIvppsdccUz/0= X-Received: by 2002:ac2:5df0:0:b0:513:d5bb:3017 with SMTP id z16-20020ac25df0000000b00513d5bb3017mr568024lfq.36.1711394609647; Mon, 25 Mar 2024 12:23:29 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325155434.65589-1-puranjay12@gmail.com> <20240325155434.65589-3-puranjay12@gmail.com> <20240325-nineteen-unvaried-cb5cb5fd3a73@spud> <20240325-perpetual-liking-25f26e485b65@spud> In-Reply-To: <20240325-perpetual-liking-25f26e485b65@spud> From: Puranjay Mohan Date: Mon, 25 Mar 2024 20:23:18 +0100 Message-ID: Subject: Re: [PATCH bpf-next v2 2/2] bpf,riscv: Implement bpf_addr_space_cast instruction To: Conor Dooley Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Luke Nelson , Xi Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou , bpf@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Pu Lehui Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 25, 2024 at 8:19=E2=80=AFPM Conor Dooley wro= te: > > On Mon, Mar 25, 2024 at 08:13:10PM +0100, Puranjay Mohan wrote: > > On Mon, Mar 25, 2024 at 8:10=E2=80=AFPM Conor Dooley = wrote: > > > > > > On Mon, Mar 25, 2024 at 03:54:34PM +0000, Puranjay Mohan wrote: > > > > LLVM generates bpf_addr_space_cast instruction while translating > > > > pointers between native (zero) address space and > > > > __attribute__((address_space(N))). The addr_space=3D0 is reserved a= s > > > > bpf_arena address space. > > > > > > > > rY =3D addr_space_cast(rX, 0, 1) is processed by the verifier and > > > > converted to normal 32-bit move: wX =3D wY > > > > > > > > rY =3D addr_space_cast(rX, 1, 0) has to be converted by JIT. > > > > > > > > Signed-off-by: Puranjay Mohan > > > > > > Doesn't compile for allmodconfig: > > > ../arch/riscv/net/bpf_jit_comp64.c:1086:7: error: call to undeclare= d function 'insn_is_cast_user'; ISO C99 and later do not support implicit f= unction declarations [-Wimplicit-function-declaration] > > > > > > Cheers, > > > Conor. > > > > Yes, > > I mentioned in the cover letter that a patch is required. > > It just got merged in bpf-next/master: > > https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit= /?id=3D770546ae9f4c1ae1ebcaf0874f0dd9631d77ec97 > > > > So, rebasing on the latest bpf-next/master should fix the issue. > > Ah, I see now that there was a mention in the cover letter that I did > not see first time around. > > Bjorn, do you think there's anything we can do about these kinda > misleading CI failures for bpf stuff? Some stuff that touches bpf > definitely is worth us building, but should we try and build it on top > of the bpf tree instead? Is there a separate CI for RISCV related stuff? is it public? I would be interested in adding RISC-V support in https://github.com/kernel-patches/bpf Is someone already working on this?