Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2789330lqp; Mon, 25 Mar 2024 09:14:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlIijOLj8VQNk3DRHV/PVlZYh3wzwCblry4d/Jr3HtmNb1uEVAkThQt3giPku5LpdSa9Q7P632x5HuAOyvFievluNb+FxNe4O75F4q0g== X-Google-Smtp-Source: AGHT+IErTN2I3+eXSgw9ERiZVuWznwaL8wEuteVjQQ2V6Q0r5nJ32eLk9qDgTN3n/YEdg1/1gSpp X-Received: by 2002:a05:6359:6606:b0:17f:8812:5029 with SMTP id sm6-20020a056359660600b0017f88125029mr2316169rwb.12.1711383266049; Mon, 25 Mar 2024 09:14:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711383266; cv=pass; d=google.com; s=arc-20160816; b=L0+CJLp8eekoqeTtqsQZzp5tNLXPb7GfOAL16kXzEdBRKdkc3nysq4bRCA/baHkYbt Lgx/FBk10yrS+i5R+bpmAEepsW0b4zjlpLBbmSrNQ14CcOsuiLOKe6JYXYZVg89MEDpD sENdc8c20XsSihL8BmszKF/Iu2lBxnlIRC8Af9LRdulMk+7a+pmDZ96QEX8EBMoSjtlE jdabzJoIIP+IO2rgSwWCaX3C1Y9uVdpRJuXIlxIYhcoSQhwjmzL1VFtHfoPx982XWvo8 /cyRVCTQ6ADJ1032ao3f6WqUhxkmZ8Cdh86dvCsvJHp+JW2QZf1gRZAJLRpH8So/pJ4K /4vQ== 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:references:cc:to :from:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=vTyf7kkkncV2/E51pIKJiakcPODngVbk8+n0YOr1FvY=; fh=TJLzckUQfMApPjA96vguPH2WXf3gX9yS1xsUskBNGww=; b=CkhLXAYH9DweIdqTZvEjKxy8WpWCHUg4dzEoDRdN6nCRIT3gUlL8/JOfmdce1onhCu hGflvVPXiUKwazKtUw7Sm7MERYRcjOVdgtC4EMeTvxZaF8nO5PyEN/bArQF5zq1/2Sjv fHub/nOXHDI1LOMdNDsU6VXuKib7ljpRkCRavG+5x8UMxx5qDWpF6N06ACmOdaXmBU7t /C2n4yRFXoOk79fU3SeMOhiwn+TbYH5RN9yyzqI9Zppmkd83VucZQdT3ZV7v40eeOVak DqmRDUMxQybXOdtvfhvdlBDMM6zuwP2EvXu8fI8taT2EKKo4rGIcVzTvlXDs5H1RumSR M5MA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@leemhuis.info header.s=he214686 header.b=LzQ0HQfa; arc=pass (i=1 spf=pass spfdomain=leemhuis.info dkim=pass dkdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-117163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117163-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q6-20020a63f946000000b005d79ebbdc0asi7934964pgk.334.2024.03.25.09.14.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 09:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@leemhuis.info header.s=he214686 header.b=LzQ0HQfa; arc=pass (i=1 spf=pass spfdomain=leemhuis.info dkim=pass dkdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-117163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117163-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 52F5B342B06 for ; Mon, 25 Mar 2024 16:02:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4953112F386; Mon, 25 Mar 2024 13:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=leemhuis.info header.i=@leemhuis.info header.b="LzQ0HQfa" 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 CA53312EBED; Mon, 25 Mar 2024 13:41:35 +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=1711374098; cv=none; b=ND19ZasKcvxm6vbUA54upef6zj6RcwjFsvJkBqN++DTAUmt6Hn1P3COm+gBR1A20RQhf1bK5s1kDyFozm9GYe2Cse7n0bPttqJBkJ91I3IU/QymHtMXj9QaRRfzgSkAaByOC9ECqFNuI4WlMBWz+OrgOY4sqm8XLcBzaoH5osX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711374098; c=relaxed/simple; bh=XbNLABVh9jtieEIF3rMA+VdHU3DSTOM1Wa7ymCxMQ+8=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=uO5tzqQF0NUKnSl2ynFacAnDgoJu7pGzJbDYUgj6DRofeU8d+N5Wuguo7fBC70FQ+fofz1RgISh3h/wdvuFCYhAU1awD5hV/0wsJwjTaHylZJCTb/NMq5BLXzTAHmdLq3UropEpotRPUA1ATyxs9HhKv8jrHXjimcIHSJ8dENa4= 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=LzQ0HQfa; 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:References:Cc:To:From: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=vTyf7kkkncV2/E51pIKJiakcPODngVbk8+n0YOr1FvY=; t=1711374095; x=1711806095; b=LzQ0HQfaxMv3g7wgCdKzWcrgwQCALbXlhPGTloh1jMQkkmN2954apR+OB1TGt ncZVc9LxUFd1ew5tZqE+JgRFFr6Hg7PrZNBLo8cyM00TU0S057RQZSB85iSQVbcnfrsv8K7konc6A 6v+a0EUPffEiQaVYZ8Eo+nAryYt8OptJbzFNYIMezTIrw6/yAL0anfmbaG8W1+8A+1K1ZtShwx71w sHlzkU+LNAJEmoSTZpdvWDk1stsi6u/eChvNGtuKxJk5yrz4mHT809yLXBn8M5dmuEdW+A/8qaBIK UK7UswQJ0W4l4/pGLz+IswIe/mKL0qPrheIkmJGTGQ/oh28tfg==; 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 1rokZs-0000pR-GD; Mon, 25 Mar 2024 14:41:28 +0100 Message-ID: Date: Mon, 25 Mar 2024 14:41:28 +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 From: Thorsten Leemhuis 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> 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/DxeoYMVuwARA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rs3URvIc6zyOrgIaHNzR 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;1711374095;fe4061b2; X-HE-SMSGID: 1rokZs-0000pR-GD On 25.03.24 12:17, Thorsten Leemhuis wrote: > A quick "me too" from my side below: Mainly for the record: 6.8.2-rc2 failed to compile for me in the same way: https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/stable-rc/fedora-39-x86_64/07211803-stablerc-stablerc-releases/builder-live.log.gz Ciao, Thorsten > 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