BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>,
	bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, kafai@meta.com, kernel-team@meta.com,
	eddyz87@gmail.com, olsajiri@gmail.com
Cc: Mykyta Yatsenko <yatsenko@meta.com>
Subject: Re: [PATCH bpf-next v4 1/4] bpf: BPF token support for BPF_BTF_GET_FD_BY_ID
Date: Mon, 10 Mar 2025 08:43:07 -0700	[thread overview]
Message-ID: <9cd7728c-c422-4d2b-a629-795ca10b18c1@linux.dev> (raw)
In-Reply-To: <20250310001319.41393-2-mykyta.yatsenko5@gmail.com>



On 3/9/25 5:13 PM, Mykyta Yatsenko wrote:
> From: Mykyta Yatsenko <yatsenko@meta.com>
>
> Currently BPF_BTF_GET_FD_BY_ID requires CAP_SYS_ADMIN, which does not
> allow running it from user namespace. This creates a problem when
> freplace program running from user namespace needs to query target
> program BTF.
> This patch relaxes capable check from CAP_SYS_ADMIN to CAP_BPF and adds
> support for BPF token that can be passed in attributes to syscall.
>
> Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>

Acked-by: Yonghong Song<yonghong.song@linux.dev>


  reply	other threads:[~2025-03-10 15:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10  0:13 [PATCH bpf-next v4 0/4] Support freplace prog from user namespace Mykyta Yatsenko
2025-03-10  0:13 ` [PATCH bpf-next v4 1/4] bpf: BPF token support for BPF_BTF_GET_FD_BY_ID Mykyta Yatsenko
2025-03-10 15:43   ` Yonghong Song [this message]
2025-03-10 15:57   ` Andrii Nakryiko
2025-03-10 18:29     ` Yonghong Song
2025-03-11 20:59     ` Mykyta Yatsenko
2025-03-12 18:50       ` Andrii Nakryiko
2025-03-10  0:13 ` [PATCH bpf-next v4 2/4] bpf: return prog btf_id without capable check Mykyta Yatsenko
2025-03-10  0:13 ` [PATCH bpf-next v4 3/4] libbpf: pass BPF token from find_prog_btf_id to BPF_BTF_GET_FD_BY_ID Mykyta Yatsenko
2025-03-10 16:00   ` Andrii Nakryiko
2025-03-10  0:13 ` [PATCH bpf-next v4 4/4] selftests/bpf: test freplace from user namespace Mykyta Yatsenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cd7728c-c422-4d2b-a629-795ca10b18c1@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kafai@meta.com \
    --cc=kernel-team@meta.com \
    --cc=mykyta.yatsenko5@gmail.com \
    --cc=olsajiri@gmail.com \
    --cc=yatsenko@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox