[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200120110044.GA26394@chromium.org>
Date: Mon, 20 Jan 2020 12:00:44 +0100
From: KP Singh <kpsingh@...omium.org>
To: kbuild test robot <lkp@...el.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-security-module@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
James Morris <jmorris@...ei.org>,
Kees Cook <keescook@...omium.org>,
Thomas Garnier <thgarnie@...omium.org>,
Michael Halcrow <mhalcrow@...gle.com>,
Paul Turner <pjt@...gle.com>,
Brendan Gregg <brendan.d.gregg@...il.com>,
Jann Horn <jannh@...gle.com>,
Matthew Garrett <mjg59@...gle.com>,
Christian Brauner <christian@...uner.io>,
Mickaël Salaün <mic@...ikod.net>,
Florent Revest <revest@...omium.org>,
Brendan Jackman <jackmanb@...omium.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
"Serge E. Hallyn" <serge@...lyn.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Stanislav Fomichev <sdf@...gle.com>,
Quentin Monnet <quentin.monnet@...ronome.com>,
Andrey Ignatov <rdna@...com>, Joe Stringer <joe@...d.net.nz>
Subject: Re: [PATCH bpf-next v2 01/10] bpf: btf: Make some of the API visible
outside BTF
Thanks! I have fixed this in the v3 of the series. btf_find_by_name_kind
is independant of CONFIG_BPF_SYSCALL and btf_type_by_name_kind needs
to be as well.
The mistake was adding a static inline definition of the function
in the !CONFIG_BPF_SYSCALL section which is not needed in this case.
- KP
On 18-Jan 20:44, kbuild test robot wrote:
> Hi KP,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on next-20200116]
> [cannot apply to bpf-next/master bpf/master linus/master security/next-testing v5.5-rc6 v5.5-rc5 v5.5-rc4 v5.5-rc6]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/KP-Singh/MAC-and-Audit-policy-using-eBPF-KRSI/20200117-070342
> base: 2747d5fdab78f43210256cd52fb2718e0b3cce74
> config: nds32-defconfig (attached as .config)
> compiler: nds32le-linux-gcc (GCC) 9.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=9.2.0 make.cross ARCH=nds32
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@...el.com>
>
> All errors (new ones prefixed by >>):
>
> In file included from kernel/bpf/core.c:27:
> >> include/linux/btf.h:148:38: error: static declaration of 'btf_type_by_name_kind' follows non-static declaration
> 148 | static inline const struct btf_type *btf_type_by_name_kind(
> | ^~~~~~~~~~~~~~~~~~~~~
> include/linux/btf.h:70:24: note: previous declaration of 'btf_type_by_name_kind' was here
> 70 | const struct btf_type *btf_type_by_name_kind(
> | ^~~~~~~~~~~~~~~~~~~~~
>
> vim +/btf_type_by_name_kind +148 include/linux/btf.h
>
> 136
> 137 #ifdef CONFIG_BPF_SYSCALL
> 138 const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id);
> 139 const char *btf_name_by_offset(const struct btf *btf, u32 offset);
> 140 struct btf *btf_parse_vmlinux(void);
> 141 struct btf *bpf_prog_get_target_btf(const struct bpf_prog *prog);
> 142 #else
> 143 static inline const struct btf_type *btf_type_by_id(const struct btf *btf,
> 144 u32 type_id)
> 145 {
> 146 return NULL;
> 147 }
> > 148 static inline const struct btf_type *btf_type_by_name_kind(
> 149 struct btf *btf, const char *name, u8 kind)
> 150 {
> 151 return ERR_PTR(-EOPNOTSUPP);
> 152 }
> 153 static inline const char *btf_name_by_offset(const struct btf *btf,
> 154 u32 offset)
> 155 {
> 156 return NULL;
> 157 }
> 158 #endif
> 159
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
Powered by blists - more mailing lists