Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2892753lqp; Mon, 25 Mar 2024 12:10:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmgBWqNtoHYO3oGx6MJD1sb7XWKsuGBLujqm8aTsoWldej2ZwpmHrAJFxSSXuAruOd2rini0RY/gRXlzPHqm2KGgef6/LNY41EM2RwFg== X-Google-Smtp-Source: AGHT+IEjT0O6uok9q4up2/t83n69VOJS/hGtz5pQTXd+bJKo2qtEYG4yf0OJC5DVk4dyGVv6AVt5 X-Received: by 2002:a50:d508:0:b0:566:b09e:8d24 with SMTP id u8-20020a50d508000000b00566b09e8d24mr6810206edi.12.1711393849099; Mon, 25 Mar 2024 12:10:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711393849; cv=pass; d=google.com; s=arc-20160816; b=gC3Rh2xb3rMLbbbeQGAeM9z8dU8mWrLBNmRSs1pcQMohUMDdjTVyMK9aZHmSec46Of iFp3NC4IS6sVhUZ+dauSv3PykFlr8Y6bwW50hfUJHDeAXlICrwSbrGRkYsI008l40NTD pWz9TFD7Si3vJwHKvXx9bLQ91YHyqbNSKyIsOAcXcd9FRx4f8JxcmXMoVSPIUiNwxqWg KODmi+r5TP3Jdvlq70Kf1zpPgnJw8Vr5lz6cizkVXdE3aDkR8m6rvEUwAdoj5ryZUrzm +ZJ/DpsiWKsV2+b+llLuSHjaJXpulGPIv2fGuNnP25TrSzAL5Lv+KkrwQqPKPDGA8dHp Zv7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wA774Da7kaVpezbdoexiw2CmWTcgP0cwQcEBLpWy8HI=; fh=FqysZhelsf3JsVoDP9gSm9Qmcy6htEK0gyMkjvdK6jQ=; b=0fMJdvWi4T5jb56mP4ZHNoJez8rVYzozlmkUBmP0KjB1oqB8I0d6TWxQt5KL349UDf GN6G4Or30nj3n/jSENjSjM0Y3/NpL9nbRgVzWfWCmf5hxQj9Ri6oPAIWKwUCyp74dfXt Ab9jtfWij2BPSXr4RXTTycu8IsVB84xpFsTeNI3CnhhbqeZtUwF6gVtZeb1l1QyGWowz ogdzG0PgKL+84xJISpXlabttahES1+AzH14GxuTeBbpUN7ZOfDsJUIuLy74XmwmHuoPq C03tgbXDohTPusotM1CfRuWjSQ4UbecZ1/kODFDT3L8mCWqFB2b2RzllN/LagaFjIGQv 5LYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTqfAjRA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s20-20020a056402521400b00568b5f9e8d2si2792477edd.57.2024.03.25.12.10.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTqfAjRA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117774-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 D14B21FA09FC for ; Mon, 25 Mar 2024 19:10:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 934F911CB8; Mon, 25 Mar 2024 19:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XTqfAjRA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B250AFC0B; Mon, 25 Mar 2024 19:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711393840; cv=none; b=r2k1po2tmJ843B4fbMmt86/QlP2Qyp0t0CXrzG+THSDxfHhfWBf8ED8iFbldxCpnSl+xJWqo726+UQMhXLprwTLVwN0p/ksg0bnoGswaV03OPU16Wf2DUb4XEBje4Xo/5tWz+/CgibdzHNBf/8UuvRssQccfUDyDHbaL6ipGa+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711393840; c=relaxed/simple; bh=YM908c+j5fTB0+d8tviHlAjBkwLbRaCWKwimpN6KDuc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=imZdyz7cWW6SLovvt5at75IsGk7WonsUTCYD4zhlrQSKLgq9/nn6hXFZLmVo0Bvs//9q2ieSEfEYziiK5U73+Vmt3EwOV0cIBsvCXagIfGm+s+lDlf4iTUelWGvERV186le8WDrWvhKBiRrCfwXnO7wGooRIjZWkxqlal7MkY3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XTqfAjRA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7B6AC433C7; Mon, 25 Mar 2024 19:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711393840; bh=YM908c+j5fTB0+d8tviHlAjBkwLbRaCWKwimpN6KDuc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XTqfAjRA00stt7hYeZ5sCjX5qkPjrMqAXOXztdxABRY1gZpyvo+FHTcTXgICgk7uB 3sydLdwkOWIa+HbviwUTgMhry2H1+ktxDgLE1Ao+ap00TsgprTfp2R6zhP1MBL5hIW ln5naleeG6L4zUc8mdmgfp50zzgF0DR+yJ3xcW/Fg13+OGyhgOInbf1e8ZI4YwLtMW QyTLmEI0N2g9uZfiXE5RTSsNQKbv4uWLdS6QrTEqlcJaqzZeDkz1wlDukTaNlkF4hS ZaaMNesACzyZyxEouqRtMzSh2nAKUB6YyAYmydAWR4itmNRbOdf7C57uUF0ia/Ue5T +UGg/ucn825vQ== Date: Mon, 25 Mar 2024 19:10:33 +0000 From: Conor Dooley To: Puranjay Mohan 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 , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , 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 Subject: Re: [PATCH bpf-next v2 2/2] bpf,riscv: Implement bpf_addr_space_cast instruction Message-ID: <20240325-nineteen-unvaried-cb5cb5fd3a73@spud> References: <20240325155434.65589-1-puranjay12@gmail.com> <20240325155434.65589-3-puranjay12@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="71chSDPH9+bsHkEY" Content-Disposition: inline In-Reply-To: <20240325155434.65589-3-puranjay12@gmail.com> --71chSDPH9+bsHkEY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 as > bpf_arena address space. >=20 > rY =3D addr_space_cast(rX, 0, 1) is processed by the verifier and > converted to normal 32-bit move: wX =3D wY >=20 > rY =3D addr_space_cast(rX, 1, 0) has to be converted by JIT. >=20 > Signed-off-by: Puranjay Mohan Doesn't compile for allmodconfig: ../arch/riscv/net/bpf_jit_comp64.c:1086:7: error: call to undeclared func= tion 'insn_is_cast_user'; ISO C99 and later do not support implicit functio= n declarations [-Wimplicit-function-declaration] Cheers, Conor. --71chSDPH9+bsHkEY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZgHMKQAKCRB4tDGHoIJi 0pNmAQDHYFRpN53l7wvgU0xtapilGEKe+kTzj3USSRCYuZ7l/wD+KKyZpPzhsx8y 1uaOjd8prQZDz9yE3MkMa+iuSm8fegU= =yW/s -----END PGP SIGNATURE----- --71chSDPH9+bsHkEY--