From: Tao Chen <chen.dylane@linux.dev>
To: Song Liu <song@kernel.org>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, brauner@kernel.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf: Define bpf_token_show_fdinfo with CONFIG_PROC_FS
Date: Tue, 18 Mar 2025 13:00:14 +0800 [thread overview]
Message-ID: <b585a433-c46e-43d9-b1dc-74e75a322542@linux.dev> (raw)
In-Reply-To: <CAPhsuW7T_QAo9JODteXXhoq2UagaBE3NrUqGvPMdv6qV-K-Q9g@mail.gmail.com>
在 2025/3/18 02:01, Song Liu 写道:
> On Mon, Mar 17, 2025 at 8:52 AM Tao Chen <chen.dylane@linux.dev> wrote:
>>
>> Protect bpf_token_show_fdinfo with CONFIG_PROC_FS check, otherwise
>> it will compile error if CONFIG_PROC_FS is not set.
>
> On bpt-next/master, I don't see compile error with
>
> CONFIG_BPF_SYSCALL=y
> ...
> # CONFIG_PROC_FS is not set
>
> Are you testing with a different tree/branch?
>
> Thanks,
> Song
>
>>
>> Fixes: 35f96de04127 ("bpf: Introduce BPF token object")
>> Signed-off-by: Tao Chen <chen.dylane@linux.dev>
>> ---
>> kernel/bpf/token.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/kernel/bpf/token.c b/kernel/bpf/token.c
>> index 26057aa13..4396eefde 100644
>> --- a/kernel/bpf/token.c
>> +++ b/kernel/bpf/token.c
>> @@ -105,7 +105,9 @@ static const struct inode_operations bpf_token_iops = { };
>>
>> static const struct file_operations bpf_token_fops = {
>> .release = bpf_token_release,
>> +#ifdef CONFIG_PROC_FS
>> .show_fdinfo = bpf_token_show_fdinfo,
>> +#endif
>> };
>>
>> int bpf_token_create(union bpf_attr *attr)
>> --
>> 2.43.0
>>
>>
Hi Song,
I try it, it seems that i had some misunderstandings before about
CONFIG_PROC_FS, and the description in the changelog is not quite
correct. Please ignore this patch, and i will resend it. Just to follow
the pattern used with other *_show_fdinfo functions and only define
bpf_token_show_fdinfo when CONFIG_PROC_FS is set. Thank you for your
reminder.
--
Best Regards
Tao Chen
next prev parent reply other threads:[~2025-03-18 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 15:51 [PATCH bpf-next] bpf: Define bpf_token_show_fdinfo with CONFIG_PROC_FS Tao Chen
2025-03-17 18:01 ` Song Liu
2025-03-18 5:00 ` Tao Chen [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-18 6:25 Tao Chen
2025-03-18 9:28 ` Jiri Olsa
2025-03-18 14:59 ` Alexei Starovoitov
2025-03-18 15:20 ` Tao Chen
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=b585a433-c46e-43d9-b1dc-74e75a322542@linux.dev \
--to=chen.dylane@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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