Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp487126lqp; Tue, 11 Jun 2024 10:00:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVn+EzWiNQcrB//zqR0Yq3k9mZ1PCA46KCeAl2+oI5vOTY89eOblS3kgqFK7DiZFVv6wMJvNrcRGncHfD3/jPDx2WYRo6jnDF7NGWMwNA== X-Google-Smtp-Source: AGHT+IH4g0kzuQA+fU+BBAx1+xY1hJc0R3OLWiL5AavYCjbf38V9TNNn1MrQvOEXKJTpPP35VCHC X-Received: by 2002:a50:d602:0:b0:57c:80c6:f268 with SMTP id 4fb4d7f45d1cf-57c80c6fbd0mr5090256a12.39.1718125206035; Tue, 11 Jun 2024 10:00:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718125206; cv=pass; d=google.com; s=arc-20160816; b=eHiYlGzP/HH/qgU0japEIQGWozZcV2O24SUlF6Z6goexf+heJm8U4BfU6X8GD+yN6z 6ERjmV8LBgLZuAXDrLbvIzl4EEWjCo/qXA6y7rIbcX1TpoAYN4JzXzkdlBd62g4ThE1X WZwAbZBdwblhv8hggZqUN/z3KNLGj0+3+l1lP6XXGoKp/YjKI9LhUUXKv0blJxD0Si63 mOa2CHacfg5uKlG4eHHnGSD7FwJHg/eHgjurIyxg5yzcdPv+/JmbVGMx4Qzu4AjL3pS4 FWJP24g/gCr+LfVNQ5GUuYcY4O/7SMCgC+vaL0gMmLbg4ebsV313TYKNTLMtzii4I43g Vl8w== 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:feedback-id:dkim-signature:dkim-signature; bh=kTsf/XjG12FVk17WuA7d1tL6MKxw/YBHpNOowUqpZbY=; fh=EqlXfiOvOrYtGzEXWzbSP/KmnNLOUqTjXgVzBCzDeYc=; b=NWaU8LIDtLajXxb+7x1k9uV2gz820pWs45+aqQBwSZNiTy/aNq82tpg8aquH6uBgOG WQB53yYZBFcI1+aRaabOhC/RU+rmt3YZ8txI7+eargFHV2/+G9/RkzYSqlFKKP6uBj/5 cEjozW+nSwH0rVDdUs2R3acC+8JfEamJa0OOZwFtvmdswbtqWD/T87RH++xysNNBvYp8 vqjLn1fBUYV8kmz5X23yAhlTaPJFVn+IKvHlIRyxgYagc0oZiJgJ834DbLiQ8UW0CpjW mDgMYIR6uj1j+QW6rp4qet9LTGsU02EevOXkwLVI4Vx5LfpSwlvVT8G1IvzBvqvrbuHT nRlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=HNtxPS6+; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GMEzhY5L; arc=pass (i=1 spf=pass spfdomain=dxuuu.xyz dkim=pass dkdomain=dxuuu.xyz dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-210301-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210301-linux.lists.archive=gmail.com@vger.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 4fb4d7f45d1cf-57c61b91ed0si4172879a12.286.2024.06.11.10.00.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 10:00:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210301-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=@dxuuu.xyz header.s=fm3 header.b=HNtxPS6+; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GMEzhY5L; arc=pass (i=1 spf=pass spfdomain=dxuuu.xyz dkim=pass dkdomain=dxuuu.xyz dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-210301-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210301-linux.lists.archive=gmail.com@vger.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 9493C1F2573F for ; Tue, 11 Jun 2024 16:59:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5ABD481D1; Tue, 11 Jun 2024 16:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="HNtxPS6+"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GMEzhY5L" Received: from flow5-smtp.messagingengine.com (flow5-smtp.messagingengine.com [103.168.172.140]) (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 A618017578; Tue, 11 Jun 2024 16:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718125113; cv=none; b=IT6S1momMkxjGP3+GCAx0TbzdhQvbw/b5IB4LEA17VaY3AK0MgaSmqkKQfDluEZz+0FpPPzIaCnvthy2wfgoDPmnQnAByZB5R0yXJTJCFiDqjpkxnlM33eQfj3ZvP8YuoJl4L2sEA4gy2HWbMi969dcJxkFU4aI1Krz22zPmFuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718125113; c=relaxed/simple; bh=8SY4dECWglq57tFvEFA6sQZdC/024FgtdpPZQqJybcc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T+Xh7pDPfVWWgmde+8dJ42exvDzMJOMTBWzpi+NM5boymp4qGHpuwQZKYmbqrrXaaaU5xs64BT7W/d2Nd8Dpd59QNT87jIHaUt+VW3DDrxqQGOtW/Th7JlEc51czBrInpyXTligqC1H2XY9KAKEeP47PjgU/fy4DFEHbPfTlqlY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz; spf=pass smtp.mailfrom=dxuuu.xyz; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b=HNtxPS6+; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GMEzhY5L; arc=none smtp.client-ip=103.168.172.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dxuuu.xyz Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailflow.nyi.internal (Postfix) with ESMTP id 8382F2002AF; Tue, 11 Jun 2024 12:58:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 11 Jun 2024 12:58:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1718125109; x=1718132309; bh=kTsf/XjG12 FVk17WuA7d1tL6MKxw/YBHpNOowUqpZbY=; b=HNtxPS6+iCZ8+1cfY/sSZ9/ZXF 1LGHuCUvt7fcxZptXUMepaOnq6oloZQL5QQ5lYITEwc+t7OGBlscIZ6vcSDTPAjX DffAB4D9d15G8SXoloFnaqYzP8S3zOBEiWtsf6tFCTDt7I0PbylnQ2zcK+AsIYUW CIbLPLpJljyZKf+1SbkveJg4jT02SkZH/eDfTK39P0WpemggYhQ7nzifkZBS3Krm wQptVOAvf48gu+iweeV+PIySbDrkOegngkpZW12fafUWEHqcPPdAAaYfM8N1b2BP fR1ErsJZmlsCioybyE8WUR0VKn+0PsMNAwFGtg7Y/3/rqHyuV86Aphqn+F5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1718125109; x=1718132309; bh=kTsf/XjG12FVk17WuA7d1tL6MKxw /YBHpNOowUqpZbY=; b=GMEzhY5LVS51kXJlSwbADAeUgsXzI+lP1nAdPnU6CZtv KrLVpLhAjPFLpbE29GO3hNGm4G8TJwRJGBotWW3AIMcv7y/z6R5JQhrFEv2GQFt3 xuwza32TGSptHqX1k3F9meZF68IBSnoXfiOa4J58GwjnNxmG3HAYIC2O2ViAH4sg sn7ZZ0FiY5cJ8JZxSSAYnKdqQhSiCYARmwrPQapRZ+zRS4reRQzNcaBAOlSvNMnP WiEgG/axJmyvKBUityiHIrsy3vguZed7ecK2gL7LsYTUdomDkPQ+75xqWVeL/yIE e+oSB07ou/DhjgvqpoR7enNMxzo1UcNIdwTaaNZVRw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtsfdt tddtvdenucfhrhhomhepffgrnhhivghlucgiuhcuoegugihusegugihuuhhurdighiiiqe enucggtffrrghtthgvrhhnpedvfeekteduudefieegtdehfeffkeeuudekheduffduffff gfegiedttefgvdfhvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jun 2024 12:58:27 -0400 (EDT) Date: Tue, 11 Jun 2024 10:58:26 -0600 From: Daniel Xu To: Jiri Olsa Cc: shuah@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, ast@kernel.org, quentin@isovalent.com, alan.maguire@oracle.com, acme@kernel.org, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, mykolal@fb.com, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH bpf-next v4 03/12] bpf: selftests: Fix fentry test kfunc prototypes Message-ID: References: <1f493cb7a7e5349f99e2badf0880b75dd6681898.1717881178.git.dxu@dxuuu.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jun 10, 2024 at 03:28:36PM GMT, Jiri Olsa wrote: > On Sat, Jun 08, 2024 at 03:15:59PM -0600, Daniel Xu wrote: > > The prototypes in progs/get_func_ip_test.c were not in line with how the > > actual kfuncs are defined in net/bpf/test_run.c. This causes compilation > > errors when kfunc prototypes are generated from BTF. > > > > Fix by aligning with actual kfunc definitions. > > > > Signed-off-by: Daniel Xu > > --- > > .../testing/selftests/bpf/progs/get_func_ip_test.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/tools/testing/selftests/bpf/progs/get_func_ip_test.c b/tools/testing/selftests/bpf/progs/get_func_ip_test.c > > index 8956eb78a226..a89596f7585d 100644 > > --- a/tools/testing/selftests/bpf/progs/get_func_ip_test.c > > +++ b/tools/testing/selftests/bpf/progs/get_func_ip_test.c > > @@ -5,13 +5,13 @@ > > > > char _license[] SEC("license") = "GPL"; > > > > -extern const void bpf_fentry_test1 __ksym; > > -extern const void bpf_fentry_test2 __ksym; > > -extern const void bpf_fentry_test3 __ksym; > > -extern const void bpf_fentry_test4 __ksym; > > -extern const void bpf_modify_return_test __ksym; > > -extern const void bpf_fentry_test6 __ksym; > > -extern const void bpf_fentry_test7 __ksym; > > +extern int bpf_fentry_test1(int a) __ksym; > > hum, the only registered one as kfunc is bpf_fentry_test1, to allow fmodret > also there's bpf_fentry_test9 as kfunc, which AFAICS is not really needed I think bpf_modify_return_test() is also registered. But otherwise yeah, I think I was overaggressive here. Are you thinking something like this? diff --git a/tools/testing/selftests/bpf/progs/get_func_ip_test.c b/tools/testing/selftests/bpf/progs/get_func_ip_test.c index a89596f7585d..2011cacdeb18 100644 --- a/tools/testing/selftests/bpf/progs/get_func_ip_test.c +++ b/tools/testing/selftests/bpf/progs/get_func_ip_test.c @@ -6,12 +6,11 @@ char _license[] SEC("license") = "GPL"; extern int bpf_fentry_test1(int a) __ksym; -extern int bpf_fentry_test2(int a, __u64 b) __ksym; -extern int bpf_fentry_test3(char a, int b, __u64 c) __ksym; -extern int bpf_fentry_test4(void *a, char b, int c, __u64 d) __ksym; extern int bpf_modify_return_test(int a, int *b) __ksym; -extern int bpf_fentry_test6(__u64 a, void *b, short c, int d, void *e, __u64 f) __ksym; -extern int bpf_fentry_test7(struct bpf_fentry_test_t *arg) __ksym; + +extern const void bpf_fentry_test2 __ksym; +extern const void bpf_fentry_test3 __ksym; +extern const void bpf_fentry_test4 __ksym; extern bool CONFIG_X86_KERNEL_IBT __kconfig __weak;