[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e23c5155-477b-465e-a811-61945d68fde7@app.fastmail.com>
Date: Wed, 24 May 2023 15:23:24 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Yonghong Song" <yhs@...a.com>, "Arnd Bergmann" <arnd@...nel.org>,
"Alexei Starovoitov" <ast@...nel.org>,
"Daniel Borkmann" <daniel@...earbox.net>,
"Andrii Nakryiko" <andrii@...nel.org>
Cc: "John Fastabend" <john.fastabend@...il.com>,
"Martin KaFai Lau" <martin.lau@...ux.dev>,
"Song Liu" <song@...nel.org>, "Yonghong Song" <yhs@...com>,
"KP Singh" <kpsingh@...nel.org>,
"Stanislav Fomichev" <sdf@...gle.com>,
"Hao Luo" <haoluo@...gle.com>, "Jiri Olsa" <jolsa@...nel.org>,
"Jason A . Donenfeld" <Jason@...c4.com>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] [v2] bpf: hide unused bpf_patch_call_args
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@...db.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.
Arnd
Powered by blists - more mailing lists