lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b585a433-c46e-43d9-b1dc-74e75a322542@linux.dev>
Date: Tue, 18 Mar 2025 13:00:14 +0800
From: Tao Chen <chen.dylane@...ux.dev>
To: Song Liu <song@...nel.org>
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
 martin.lau@...ux.dev, eddyz87@...il.com, yonghong.song@...ux.dev,
 john.fastabend@...il.com, kpsingh@...nel.org, sdf@...ichev.me,
 haoluo@...gle.com, jolsa@...nel.org, brauner@...nel.org,
 bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] bpf: Define bpf_token_show_fdinfo with
 CONFIG_PROC_FS

在 2025/3/18 02:01, Song Liu 写道:
> On Mon, Mar 17, 2025 at 8:52 AM Tao Chen <chen.dylane@...ux.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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ