From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH bpf-next 1/2] bpf: share BTF "show" implementation between kernel and libbpf
Date: Tue, 12 Jan 2021 05:39:15 +0800 [thread overview]
Message-ID: <202101120509.Hzr5Gu23-lkp@intel.com> (raw)
In-Reply-To: <1610386373-24162-2-git-send-email-alan.maguire@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 4015 bytes --]
Hi Alan,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-libbpf-share-BTF-data-show-functionality/20210112-013917
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arm-randconfig-r014-20210111 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/04cba32126a479b2b87ff64eaf1e266574221cad
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alan-Maguire/bpf-libbpf-share-BTF-data-show-functionality/20210112-013917
git checkout 04cba32126a479b2b87ff64eaf1e266574221cad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/bpf/btf_show_common.c: In function 'btf_seq_show':
>> kernel/bpf/btf_show_common.c:1136:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1136 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf_show_common.c: In function 'btf_snprintf_show':
>> kernel/bpf/btf_show_common.c:1175:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1175 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
vim +1136 kernel/bpf/btf_show_common.c
1130
1131 /* seq_file show is for kernel only. */
1132 #ifdef __KERNEL__
1133 static void btf_seq_show(struct btf_show *show, const char *fmt,
1134 va_list args)
1135 {
> 1136 seq_vprintf((struct seq_file *)show->target, fmt, args);
1137 }
1138
1139 int btf_type_seq_show_flags(const struct btf *btf, u32 type_id,
1140 void *obj, struct seq_file *m, u64 flags)
1141 {
1142 struct btf_show sseq;
1143
1144 sseq.target = m;
1145 sseq.showfn = btf_seq_show;
1146 sseq.flags = flags;
1147
1148 btf_type_show(btf, type_id, obj, &sseq);
1149
1150 return sseq.state.status;
1151 }
1152
1153 void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj,
1154 struct seq_file *m)
1155 {
1156 (void) btf_type_seq_show_flags(btf, type_id, obj, m,
1157 BTF_SHOW_NONAME | BTF_SHOW_COMPACT |
1158 BTF_SHOW_ZERO | BTF_SHOW_UNSAFE);
1159 }
1160
1161 #endif /* __KERNEL__ */
1162
1163 struct btf_show_snprintf {
1164 struct btf_show show;
1165 int len_left; /* space left in string */
1166 int len; /* length we would have written */
1167 };
1168
1169 static void btf_snprintf_show(struct btf_show *show, const char *fmt,
1170 va_list args)
1171 {
1172 struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show;
1173 int len;
1174
> 1175 len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
1176
1177 if (len < 0) {
1178 ssnprintf->len_left = 0;
1179 ssnprintf->len = len;
1180 } else if (len > ssnprintf->len_left) {
1181 /* no space, drive on to get length we would have written */
1182 ssnprintf->len_left = 0;
1183 ssnprintf->len += len;
1184 } else {
1185 ssnprintf->len_left -= len;
1186 ssnprintf->len += len;
1187 show->target += len;
1188 }
1189 }
1190
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30838 bytes --]
next prev parent reply other threads:[~2021-01-11 21:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 17:32 [RFC PATCH bpf-next 0/2] bpf, libbpf: share BTF data show functionality Alan Maguire
2021-01-11 17:32 ` [RFC PATCH bpf-next 1/2] bpf: share BTF "show" implementation between kernel and libbpf Alan Maguire
2021-01-11 21:39 ` kernel test robot [this message]
2021-01-12 7:48 ` Andrii Nakryiko
2021-01-14 15:37 ` Alan Maguire
2021-01-15 3:51 ` Andrii Nakryiko
2021-01-11 17:32 ` [RFC PATCH bpf-next 2/2] selftests/bpf: test libbpf-based type display Alan Maguire
2021-01-12 2:45 ` [RFC PATCH bpf-next 0/2] bpf, libbpf: share BTF data show functionality Alexei Starovoitov
-- strict thread matches above, loose matches on Subject: below --
2021-01-11 21:56 [RFC PATCH bpf-next 1/2] bpf: share BTF "show" implementation between kernel and libbpf kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101120509.Hzr5Gu23-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.