Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2881749rdd; Sat, 13 Jan 2024 05:57:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzyb3sb/cjgtfIZVghFRxMsVytPi6rb8/cFFoT1wOqCUwQLNYf13kVojbjSmnwzOyAs5q0 X-Received: by 2002:ac8:5708:0:b0:429:bea9:ee53 with SMTP id 8-20020ac85708000000b00429bea9ee53mr3267348qtw.27.1705154279562; Sat, 13 Jan 2024 05:57:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705154279; cv=none; d=google.com; s=arc-20160816; b=tTtn1M+gdmV21oS5DvBLj5OzDyOzHrLxuUSGcJo2bWAB/HTXAGEDVE6WalyJ+MyzFy vJXK82q8pYPOemOHqO63MhK2jtXHrRuMJNUSghvr1370WTRxw4KsYm7v+i4mibKcP6/7 z2UkL93ek8e8EFLmMxFn2epXA5iWkzeDLpQ6elnWnzISnVocaPfotij8Kna9ZvSqgMW9 +L8ng6KeM9tPH6/rBvzabzs6rYL28Tb7BAULOk9vRnjkPjsHZ2vex5LvsC6BenpWOnSD 4S8GhZxfXbGx/NNxvuOWYZzJaIq2PvRNoAGxXJP5z8pS3JSKiOR+4/tyeFr4CQqXTeMx YKtw== ARC-Message-Signature: i=1; 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:date:from:dkim-signature; bh=PGE1HEJ5ixxTvOXVNxbbYY7sOdvQr1NpAqO6gUYLh08=; fh=R+8bQ2mQR4/6KGfTC3ms5R8sz8mfft4PwhwVJCRASUU=; b=x1LR1lmnSeAdeXFrDHkhDOv2HKqXqlKq/99n8vtJiuFztzh7caDbkPu8JnHQotk73g GEjXUyY0rGbHei8JBjo0hw/A6OIJ7UMsI6cZ0Pv9/ZG6Pc2RoG7UN92uLJmMaiBIZZ7j rp8Vf3wcRxXa4SAVmnt34sdLveltzRwYShsP8K+pGkV0kGnAdw+ZihMyP1nXS1NRHJ1D f+hAiwc+5oMlok+Yirj6WJ+Gz1vhkMC9qo7+7ELSwh7cIoWJIdm/gPUdxTA/JV0//Pdb ezG0Czwz9vIJtXs7p+P064h/UPvENuRYTuNeY6jkRMzGtpFoos6zZIssnAlf7Q8w2cPf TmkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aEZlhzbu; spf=pass (google.com: domain of linux-kernel+bounces-25296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 9-20020ac84e89000000b00429ca3f8f37si3840576qtp.344.2024.01.13.05.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 05:57:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aEZlhzbu; spf=pass (google.com: domain of linux-kernel+bounces-25296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25296-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4AF001C21415 for ; Sat, 13 Jan 2024 13:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2654C21344; Sat, 13 Jan 2024 13:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aEZlhzbu" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 DA07821113; Sat, 13 Jan 2024 13:57:44 +0000 (UTC) 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-ej1-f51.google.com with SMTP id a640c23a62f3a-a2c179aa5c4so384528266b.0; Sat, 13 Jan 2024 05:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705154263; x=1705759063; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=PGE1HEJ5ixxTvOXVNxbbYY7sOdvQr1NpAqO6gUYLh08=; b=aEZlhzbuh4VFbItmMYKxfYHzvAwezxQ72V8VbwSa3g2pnsRc0mi1xrF0c2AznuUXwc BJokau6Tlj72I3E3GC3GeRuNsGi2elNDjWnjAwhxUnub0gGGsmIV8RptUwm9DS4198b+ 9bcTkY0oNaQOiKshEmC8vbw1maBpVjdNlYIO7jdlpzn+1rX/qpSDtPm5VBUXihACvvCI igCjIlJMp6gtdIpmOqnwP03yP+op1I3/KfFOj6HiKZJouw0ejX1F/mpHaO7EVW0zoyFN Bt08xk92AtZrM3fpJ22N4PoVCTMewA352nCZUZzqlf7bBAw80c3vt0pccG0YogCLefAX 8mWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705154263; x=1705759063; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PGE1HEJ5ixxTvOXVNxbbYY7sOdvQr1NpAqO6gUYLh08=; b=AjXDxe0byr1rZ/QgUCURCH6+r/gh6ngdPXDwWBsTXr62OMj+epLO7uNCpk+tDLxkkL 4EfM103SAJBUUZBr3Kszbu/zMYTZPvYNUL3bFZ/FVzlPoD0nzU1tGa1xRY1Yi6xIw/bD UXZtqw3EyiIm14h2jJZjdnZxIruGvPaybM+Yepqbkn1ma2EluHA3LMwEgUWbfEDEAJ2L t06RyN2MIafbSwIH8RH33Uaq6acT1zKJOdl/8X9qHqWOcvH7BHvbqK2uiretTDqfvb5k Tj3k/u1sQv277L0BUla4I2Kii1s4U30C3U1WOZMunvZAnwQaCifQ3mJ++DGxAmFLzGmN WBKA== X-Gm-Message-State: AOJu0YzAXUKt422fjnYSnVLlWKTkkrdkxmTZh8fpUq4MUl1O7Cr7mFYG sar8Mo4oLEOvDWf8REg5gl4= X-Received: by 2002:a17:906:15c3:b0:a2b:1a80:7b72 with SMTP id l3-20020a17090615c300b00a2b1a807b72mr1514786ejd.30.1705154262796; Sat, 13 Jan 2024 05:57:42 -0800 (PST) Received: from krava (ip-94-113-247-30.net.vodafone.cz. [94.113.247.30]) by smtp.gmail.com with ESMTPSA id b4-20020a170906150400b00a2a37f63216sm2950887ejd.171.2024.01.13.05.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 05:57:42 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Sat, 13 Jan 2024 14:57:40 +0100 To: Daniel Xu Cc: Jiri Olsa , linux-input@vger.kernel.org, coreteam@netfilter.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org, fsverity@lists.linux.dev, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, cgroups@vger.kernel.org, alexei.starovoitov@gmail.com, quentin@isovalent.com, alan.maguire@oracle.com, memxor@gmail.com Subject: Re: [PATCH bpf-next v3 0/3] Annotate kfuncs in .BTF_ids section Message-ID: References: <2dhmwvfnnqnlrui2qcr5fob54gdsuse5caievct42trvvia6qe@p24nymz3uttv> 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: <2dhmwvfnnqnlrui2qcr5fob54gdsuse5caievct42trvvia6qe@p24nymz3uttv> On Fri, Jan 12, 2024 at 01:03:59PM -0700, Daniel Xu wrote: > On Fri, Jan 12, 2024 at 05:20:39PM +0100, Jiri Olsa wrote: > > On Sat, Jan 06, 2024 at 11:24:07AM -0700, Daniel Xu wrote: > > > === Description === > > > > > > This is a bpf-treewide change that annotates all kfuncs as such inside > > > .BTF_ids. This annotation eventually allows us to automatically generate > > > kfunc prototypes from bpftool. > > > > > > We store this metadata inside a yet-unused flags field inside struct > > > btf_id_set8 (thanks Kumar!). pahole will be taught where to look. > > > > > > More details about the full chain of events are available in commit 3's > > > description. > > > > > > The accompanying pahole changes (still needs some cleanup) can be viewed > > > here on this "frozen" branch [0]. > > > > so the plan is to have bpftool support to generate header file > > with detected kfuncs? > > Yep, that's the major use case. But I see other use cases as well like ok, any chance you could already include it in the patchset? would be a great way to test this.. maybe we could change selftests to use that thanks, jirka > precision probing of kfuncs. Rather than guess and check which progs can > load (in the event of backwards incompatible kfunc changes), programs > can look at kfunc type signature thru BTF.