From patchwork Mon Aug 22 18:25:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Xu X-Patchwork-Id: 12951046 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7239C32772 for ; Mon, 22 Aug 2022 18:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237137AbiHVS13 (ORCPT ); Mon, 22 Aug 2022 14:27:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236290AbiHVS0P (ORCPT ); Mon, 22 Aug 2022 14:26:15 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AFB3481D9; Mon, 22 Aug 2022 11:26:13 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id EE5D332009DF; Mon, 22 Aug 2022 14:26:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 22 Aug 2022 14:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1661192771; x=1661279171; bh=LS KB15JNkOM6IStOUGGM5d6X8gu4EdQM8BDl4wVbxpY=; b=nqjfk//FtMa2MoirZv jk5oQjexN2OO9FATNA9UsX8hVUMSUMMaWgfGdQjX6FyEWiS2Tswm9sm37V3B3YBg 1k9b3vTM8gIHN7cxb7TqCAL5MwtSweL6PT8IHsoQKln0gW6lKOUwbvf0a+m4LbfZ 99AP8UORLD9g2cspJ4qe0j9YTiB4jk0jFeFBt8Wd7uO5bVKDvW5qGr6hBRNPCCQQ uG8nG32fr8LW989VuzIgAyop2zTfi3ULgnj4zUAU7SUVwuX8bpe6mfh4lj1iXnNf E+HSi6/zCchFxthMOEiAosB84w/+j4WgLPSF4jENnSPrLB7WvdunHB9N9atZo8xV ONHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1661192771; x=1661279171; bh=LSKB15JNkOM6I StOUGGM5d6X8gu4EdQM8BDl4wVbxpY=; b=fxh6f/XgGL11QfGuHmuS/ham4YqUV RwgIv0dG7c6XB7zB4RzvHLQnogbqbv7jSc592N6Z1DCY0M2Et8YSF4OgzSQG4goR 4LIQxJd77YM+9t/KG07lXUpYSuKExi0OUR4rU3K1gmuLZlusmNeFeTRlCkcc5gov mPoIcjlWB/xcsU2HJzUIdE3YZV0ThZKSp8AkLXryBiJxbvLa1mvm3zaSwDuRrn+g RHKtHL/iIH9F2yb3mTInlOKMwS3uNYdG/K1Vv/t3at5nwLtvugN0XbSxChh4Icbj HjD2lbssXur6jcNz0FAAL3PYbu1EgsSzi0trqLkt1J/rn0FdfK3xi/3cQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeijedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhephf fvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcu oegugihusegugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpefgfefggeejhfduie ekvdeuteffleeifeeuvdfhheejleejjeekgfffgefhtddtteenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Aug 2022 14:26:10 -0400 (EDT) From: Daniel Xu To: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, memxor@gmail.com Cc: Daniel Xu , pablo@netfilter.org, fw@strlen.de, toke@kernel.org, martin.lau@linux.dev, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v4 2/5] bpf: Add stub for btf_struct_access() Date: Mon, 22 Aug 2022 12:25:52 -0600 Message-Id: X-Mailer: git-send-email 2.37.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Add corresponding unimplemented stub for when CONFIG_BPF_SYSCALL=n Signed-off-by: Daniel Xu Acked-by: Kumar Kartikeya Dwivedi --- include/linux/bpf.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 39bd36359c1e..fcde14ae6e60 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -2157,6 +2157,15 @@ static inline struct bpf_prog *bpf_prog_by_id(u32 id) return ERR_PTR(-ENOTSUPP); } +static inline int btf_struct_access(struct bpf_verifier_log *log, + const struct btf *btf, + const struct btf_type *t, int off, int size, + enum bpf_access_type atype, + u32 *next_btf_id, enum bpf_type_flag *flag) +{ + return -EACCES; +} + static inline const struct bpf_func_proto * bpf_base_func_proto(enum bpf_func_id func_id) {