Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2815620lqp; Mon, 25 Mar 2024 09:59:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtfQL/T4TnwOBfofWqa2371afwDcA9SoWkgI970wAajUs+eiDR/4NPWqYWLETS/Rd9yh445O9mwir8Jlk+SUJ5GWvMhhFR0tjre4dHwA== X-Google-Smtp-Source: AGHT+IEnhxKd4zeDFppJo5jxdQUuJ+c28uCj1eZutUiEgjhlBrLKKGI0MPzu0WcBxCuYBVcEFZW2 X-Received: by 2002:a17:90a:fb81:b0:29b:4755:23fc with SMTP id cp1-20020a17090afb8100b0029b475523fcmr6289376pjb.33.1711385950561; Mon, 25 Mar 2024 09:59:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711385950; cv=pass; d=google.com; s=arc-20160816; b=YZWr8d1vNL9eY1ZnCPTyqQfP/bc8PMubKuDmIo31fwU8Ajr+sfv3o4H4G8+c4KQmy6 IHhi0fP3pAp+8Cq7HWDgPxaH/lrddH+sKB7NUYaxkeA8QZu3zV3KGa0nxGkeNkJdjEYj zC0X2gLlHnlw74XBgCUehzIcULgiVVMpa0DX7pJTIQy49XmxM/XyuIaRztNScP0ofLR6 y6UYjSATsSSEE1WXPe5iDVfgdQFeOj9iXjb3XGvqESr7nu4hZJYCBI+mvqvazd3qrZrI f/50ltKeuIoefFNUBXdFxoHC0Lwy2lshWyZfOVV8YWV9XoT13InckALrmFB+K6LE+a8+ jZnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=0I8AaUTcrQp55wpf5askd+06931BKAoEDY7FD5BFLeQ=; fh=TJLzckUQfMApPjA96vguPH2WXf3gX9yS1xsUskBNGww=; b=YwAlBZjnkA0j8bkEAhk6WWhNV8u5g4KGVXlfTODa4krYUHJ/okgFvUjFEmizI75KaW /Tc5ZjuL7ixjOCDLYvn2cGVGQLu+k3rfww69MErt4nNrHV+3kLmVkJ1HhWp+vP0WNzs+ +Ne1C7UikrEKhr1lJcGty+V8czGJt7PVHxPN6wFldEFuUM+B5fnNXXj+N38uDt9N02YF GnRxWVngrjYryKrZGaiOgcYUXMsIbwvpcdy4BslF0ZkRwi+oM2byQ/m6Re4FU8u+WqV0 LAPH/IGMNnlRh9tx+2vApoCLxCAe7GSNOIs6C60eX1M51wThrjnIZYKFVqzbc5BZwW95 FyvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@leemhuis.info header.s=he214686 header.b="1/2Y4Lmm"; arc=pass (i=1 spf=pass spfdomain=leemhuis.info dkim=pass dkdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-116927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116927-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l12-20020a17090aaa8c00b0029bbf32bb08si7713186pjq.100.2024.03.25.09.59.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 09:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@leemhuis.info header.s=he214686 header.b="1/2Y4Lmm"; arc=pass (i=1 spf=pass spfdomain=leemhuis.info dkim=pass dkdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-116927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116927-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C1570B3FF45 for ; Mon, 25 Mar 2024 14:49:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA0BB156881; Mon, 25 Mar 2024 11:46:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=leemhuis.info header.i=@leemhuis.info header.b="1/2Y4Lmm" Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) (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 E88491BB756; Mon, 25 Mar 2024 11:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.237.130.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711365481; cv=none; b=lXXlgoU0ZtroVf98LV9oY5nMAI54zWGq8OSveZIfP4R/cWfiY2KkWaGHO9wlkglhtryl12yEjoLj5+lwCld88VAuJFDr0kE3PGRkJ+uO12Hbx2EenfVMGjw/tnNcCjFIfvt9ZzmtGBYSHPOdx41XAkYn6mV0nkO4mo5L/Col+Cw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711365481; c=relaxed/simple; bh=lTVg3fc6MdE/fo1cwqrDYHPkWi51KMLwn/j+U7Nw9ZA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=un7set2OnJ/pTzC21eX13ISCu2lR6Y9kfCRCRdrRrz1tZd35dnzByPHNXZPXHKnCMe/8Q58m16O/bqhoywrgji6a+IxEO6Z/YLGtNffBvM6vkA99bdYpVwEG1oQiM9oOe1ByH/fLciRkYcloF21rfN6FXfmFA/Vh7G1tStlvhWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=leemhuis.info; spf=pass smtp.mailfrom=leemhuis.info; dkim=pass (2048-bit key) header.d=leemhuis.info header.i=@leemhuis.info header.b=1/2Y4Lmm; arc=none smtp.client-ip=80.237.130.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=leemhuis.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=leemhuis.info DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=leemhuis.info; s=he214686; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To: References; bh=0I8AaUTcrQp55wpf5askd+06931BKAoEDY7FD5BFLeQ=; t=1711365479; x=1711797479; b=1/2Y4LmmZD2hQLf8n1wMhik4twLS9AWFxSYWazx+REOmDC9QWupPl4IxynzMH QZpe8z2NdoxMyS38mF6NcTBYRa9ICN9CdV6K2cBYeii+AdkWR3iKKM2a0QgVnt05ddhb1JhhXH/ZJ Hd8IVdxk6KRazNibW/PkWjma6pbGaNPnG9DKG6ZOIcaI+TpwULoIdy4P5JyrTzJHNO0mfmPxKj/TF 4NhXSiDf3Ta+cS7ladp0w9pJXA6ojpRp/+V0k0f80H2ClDWPQdhC66DRl/F2nnrBDtussunVDzEmX nw2Q2/8rthNnuiHkUQLV4rXbgE29mP3Kw+tEL9O8n4G0eMq9Vw==; Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1roiKy-0002OP-Mb; Mon, 25 Mar 2024 12:17:56 +0100 Message-ID: Date: Mon, 25 Mar 2024 12:17:56 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6.8 119/715] libbpf: Add bpf_token_create() API Content-Language: en-US, de-DE To: Jiri Slaby , Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrii Nakryiko , Alexei Starovoitov References: <20240324223455.1342824-1-sashal@kernel.org> <20240324223455.1342824-120-sashal@kernel.org> From: Thorsten Leemhuis Autocrypt: addr=linux@leemhuis.info; keydata= xsFNBFJ4AQ0BEADCz16x4kl/YGBegAsYXJMjFRi3QOr2YMmcNuu1fdsi3XnM+xMRaukWby47 JcsZYLDKRHTQ/Lalw9L1HI3NRwK+9ayjg31wFdekgsuPbu4x5RGDIfyNpd378Upa8SUmvHik apCnzsxPTEE4Z2KUxBIwTvg+snEjgZ03EIQEi5cKmnlaUynNqv3xaGstx5jMCEnR2X54rH8j QPvo2l5/79Po58f6DhxV2RrOrOjQIQcPZ6kUqwLi6EQOi92NS9Uy6jbZcrMqPIRqJZ/tTKIR OLWsEjNrc3PMcve+NmORiEgLFclN8kHbPl1tLo4M5jN9xmsa0OZv3M0katqW8kC1hzR7mhz+ Rv4MgnbkPDDO086HjQBlS6Zzo49fQB2JErs5nZ0mwkqlETu6emhxneAMcc67+ZtTeUj54K2y Iu8kk6ghaUAfgMqkdIzeSfhO8eURMhvwzSpsqhUs7pIj4u0TPN8OFAvxE/3adoUwMaB+/plk sNe9RsHHPV+7LGADZ6OzOWWftk34QLTVTcz02bGyxLNIkhY+vIJpZWX9UrfGdHSiyYThHCIy /dLz95b9EG+1tbCIyNynr9TjIOmtLOk7ssB3kL3XQGgmdQ+rJ3zckJUQapLKP2YfBi+8P1iP rKkYtbWk0u/FmCbxcBA31KqXQZoR4cd1PJ1PDCe7/DxeoYMVuwARAQABzSdUaG9yc3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gIaHNzR 8AF4PXWPAuZu1oaG/XKwzMqN/Y/AoxWrCFZNHE27E1RrMhDgmyzIzWQTffJsVPDMQqDfLBhV ic3b8Yec+Kn+ExIF5IuLfHkUgIUs83kDGGbV+wM8NtlGmCXmatyavUwNCXMsuI24HPl7gV2h n7RI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1711365479;ae128cdd; X-HE-SMSGID: 1roiKy-0002OP-Mb A quick "me too" from my side below: On 25.03.24 06:40, Jiri Slaby wrote: > On 24. 03. 24, 23:24, Sasha Levin wrote: >> From: Andrii Nakryiko >> >> [ Upstream commit 639ecd7d6247c48a0175f5b458b648f5d4b6dc34 ] >> >> Add low-level wrapper API for BPF_TOKEN_CREATE command in bpf() syscall. >> >> Signed-off-by: Andrii Nakryiko >> Signed-off-by: Alexei Starovoitov >> Link: >> https://lore.kernel.org/bpf/20240124022127.2379740-13-andrii@kernel.org >> Stable-dep-of: c81a8ab196b5 ("libbpf: Add btf__new_split() API that >> was declared but not implemented") >> Signed-off-by: Sasha Levin >> --- >>   tools/lib/bpf/bpf.c      | 17 +++++++++++++++++ >>   tools/lib/bpf/bpf.h      | 24 ++++++++++++++++++++++++ >>   tools/lib/bpf/libbpf.map |  1 + >>   3 files changed, 42 insertions(+) >> >> diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c >> index 9dc9625651dcf..d4019928a8646 100644 >> --- a/tools/lib/bpf/bpf.c >> +++ b/tools/lib/bpf/bpf.c >> @@ -1287,3 +1287,20 @@ int bpf_prog_bind_map(int prog_fd, int map_fd, >>       ret = sys_bpf(BPF_PROG_BIND_MAP, &attr, attr_sz); >>       return libbpf_err_errno(ret); >>   } >> + >> +int bpf_token_create(int bpffs_fd, struct bpf_token_create_opts *opts) >> +{ >> +    const size_t attr_sz = offsetofend(union bpf_attr, token_create); >> +    union bpf_attr attr; >> +    int fd; >> + >> +    if (!OPTS_VALID(opts, bpf_token_create_opts)) >> +        return libbpf_err(-EINVAL); >> + >> +    memset(&attr, 0, attr_sz); >> +    attr.token_create.bpffs_fd = bpffs_fd; >> +    attr.token_create.flags = OPTS_GET(opts, flags, 0); > > With openSUSE config [1], I see: > bpf.c:1293:60: error: ‘union bpf_attr’ has no member named > ‘token_create’; did you mean ‘iter_create’? > bpf.c:1293:60: error: ‘union bpf_attr’ has no member named > ‘token_create’; did you mean ‘iter_create’? > bpf.c:1301:14: error: ‘union bpf_attr’ has no member named > ‘token_create’; did you mean ‘iter_create’? > bpf.c:1302:14: error: ‘union bpf_attr’ has no member named > ‘token_create’; did you mean ‘iter_create’? > > > [1] > https://github.com/openSUSE/kernel-source/blob/master/config/x86_64/default > >> +    fd = sys_bpf_fd(BPF_TOKEN_CREATE, &attr, attr_sz); > > And: > > bpf.c:1304:25: error: ‘BPF_TOKEN_CREATE’ undeclared (first use in this > function); did you mean ‘BPF_ITER_CREATE’? > > They are added by: > commit 35f96de04127d332a5c5e8a155d31f452f88c76d > Author: Andrii Nakryiko > Date:   Tue Jan 23 18:21:00 2024 -0800 > >     bpf: Introduce BPF token object > > > But if you should take it or drop this all, I don't know... I ran into the same problems while building 6.8.2-rc1 for Fedora using the Fedora 39 config and its RPM spec file (with minor modifications): https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/stable-rc/fedora-39-x86_64/07210895-stablerc-stablerc-releases/builder-live.log.gz Ciao, Thorsten