[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42d6b829-ab97-2b81-de2c-7551da13f913@linux.dev>
Date: Wed, 16 Aug 2023 23:08:29 -0700
From: Yonghong Song <yonghong.song@...ux.dev>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: David Vernet <void@...ifault.com>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Kernel Team <kernel-team@...a.com>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH bpf-next] bpf: Disable -Wmissing-declarations for
globally-linked kfuncs
On 8/16/23 8:48 PM, Alexei Starovoitov wrote:
> On Wed, Aug 16, 2023 at 8:38 PM Yonghong Song <yonghong.song@...ux.dev> wrote:
>>
>>
>>
>> On 8/16/23 8:06 AM, David Vernet wrote:
>>> We recently got an lkp warning about missing declarations, as in e.g.
>>> [0]. This warning is largely redundant with -Wmissing-prototypes, which
>>> we already disable for kfuncs that have global linkage and are meant to
>>> be exported in BTF, and called from BPF programs. Let's also disable
>>> -Wmissing-declarations for kfuncs. For what it's worth, I wasn't able to
>>> reproduce the warning even on W <= 3, so I can't actually be 100% sure
>>> this fixes the issue.
>>>
>>> [0]: https://lore.kernel.org/all/202308162115.Hn23vv3n-lkp@intel.com/
>>
>> Okay, I just got a similar email to [0] which complains
>> bpf_obj_new_impl, ..., bpf_cast_to_kern_ctx
>> missing declarations.
>>
>> In the email, the used compiler is
>> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
>>
>> Unfortunately, I did not have gcc-7 to verify this.
>> Also, what is the minimum gcc version kernel supports? 5.1?
>
> pahole and BTF might be broken in such old GCC too.
> Maybe we should add:
> config BPF_SYSCALL
> depends on GCC_VERSION >= 90000 || CLANG_VERSION >= 130000
Do you remember what kind of issues pahole/BTF have for
< 9.0 gcc and < 13.0 clang?
Powered by blists - more mailing lists