lkml.org 
[lkml]   [2023]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] [v2] bpf: hide unused bpf_patch_call_args
From


On 5/24/23 6:23 AM, Arnd Bergmann wrote:
> On Wed, May 24, 2023, at 05:05, Yonghong Song wrote:
>> On 5/23/23 12:43 PM, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@arndb.de>
>>>
>>> This function has no callers and no declaration when CONFIG_BPF_JIT_ALWAYS_ON
>>> is enabled:
>>>
>>> kernel/bpf/core.c:2075:6: error: no previous prototype for 'bpf_patch_call_args' [-Werror=missing-prototypes]
>>
>> If CONFIG_BPF_JIT_ALWAYS_ON is enabled, the definition of
>> bpf_patch_call_args should be invisible. Maybe I missed something.
>> Could you list *ALL& bpf related config options in your setup
>> so people can reproduce you above error messages?
>
> Sorry, my mistake. I've reworded the changelog now to fix this:
>
> | This function is only used when CONFIG_BPF_JIT_ALWAYS_ON is disabled,
> | but CONFIG_BPF_SYSCALL is enabled. When both are turned off, the
> | prototype is missing but the unused function is still compiled,
> | as seen from this W=1 warning:
> |
> | kernel/bpf/core.c:2075:6: error: no previous prototype for 'bpf_patch_call_args' [-Werror=missing-prototypes]
> |
> | Add a matching #ifdef for the definition to leave it out.
>
> If this makes sense now, I'll send out a v3.

Yes, the above new commit message sounds good to me. Thanks.

>
> Arnd

\
 
 \ /
  Last update: 2023-05-24 20:13    [W:0.451 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site