From: Yonghong Song <yhs@meta.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, davem@davemloft.net
Cc: daniel@iogearbox.net, andrii@kernel.org, martin.lau@kernel.org,
yhs@fb.com, bpf@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH bpf-next] bpf: Tighten ptr_to_btf_id checks.
Date: Fri, 25 Nov 2022 11:56:34 -0800 [thread overview]
Message-ID: <45facb0d-407f-e5be-09e5-709ca4994de6@meta.com> (raw)
In-Reply-To: <20221125183546.1964-1-alexei.starovoitov@gmail.com>
On 11/25/22 10:35 AM, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
>
> The networking programs typically don't require CAP_PERFMON, but through kfuncs
> like bpf_cast_to_kern_ctx() they can access memory through PTR_TO_BTF_ID. In
> such case enforce CAP_PERFMON. Also make sure that those programs are GPL if
> they access kernel data structures. All kfuncs require GPL anyway.
>
> Also remove allow_ptr_to_map_access. It's the same as allow_ptr_leaks and
> different name for the same check only causes confusion.
>
> Fixes: fd264ca02094 ("bpf: Add a kfunc to type cast from bpf uapi ctx to kernel ctx")
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
prev parent reply other threads:[~2022-11-25 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 18:35 [PATCH bpf-next] bpf: Tighten ptr_to_btf_id checks Alexei Starovoitov
2022-11-25 19:56 ` Yonghong Song [this message]
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=45facb0d-407f-e5be-09e5-709ca4994de6@meta.com \
--to=yhs@meta.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=yhs@fb.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