From: kernel test robot <lkp@intel.com>
To: Feng Yang <yangfeng59949@163.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf: Add the missing types in the logs
Date: Wed, 28 Jan 2026 22:45:27 +0800 [thread overview]
Message-ID: <202601282215.BONmLaMY-lkp@intel.com> (raw)
In-Reply-To: <20260128085842.145057-1-yangfeng59949@163.com>
Hi Feng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Feng-Yang/bpf-Add-the-missing-types-in-the-logs/20260128-170535
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20260128085842.145057-1-yangfeng59949%40163.com
patch subject: [PATCH bpf-next] bpf: Add the missing types in the logs
config: x86_64-buildonly-randconfig-003-20260128 (https://download.01.org/0day-ci/archive/20260128/202601282215.BONmLaMY-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260128/202601282215.BONmLaMY-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601282215.BONmLaMY-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/bpf/log.c: In function 'reg_type_str':
>> kernel/bpf/log.c:476:59: warning: '%s' directive output may be truncated writing up to 13 bytes into a region of size between 8 and 64 [-Wformat-truncation=]
476 | snprintf(prefix, sizeof(prefix), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
| ^~
kernel/bpf/log.c:476:9: note: 'snprintf' output between 1 and 178 bytes into a destination of size 64
476 | snprintf(prefix, sizeof(prefix), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477 | type & MEM_RDONLY ? "rdonly_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
478 | type & MEM_RINGBUF ? "ringbuf_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
479 | type & MEM_USER ? "user_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
480 | type & MEM_PERCPU ? "percpu_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
481 | type & MEM_RCU ? "rcu_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
482 | type & PTR_UNTRUSTED ? "untrusted_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483 | type & PTR_TRUSTED ? "trusted_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
484 | type & MEM_UNINIT ? "uninit_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
485 | type & DYNPTR_TYPE_LOCAL ? "dynptr_local_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486 | type & DYNPTR_TYPE_RINGBUF ? "dynptr_ringbuf_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
487 | type & MEM_FIXED_SIZE ? "fixed_size_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
488 | type & MEM_ALLOC ? "alloc_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
489 | type & NON_OWN_REF ? "non_own_ref_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
490 | type & DYNPTR_TYPE_SKB ? "dynptr_skb_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
491 | type & DYNPTR_TYPE_XDP ? "dynptr_xdp_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
492 | type & MEM_ALIGNED ? "aligned_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
493 | type & MEM_WRITE ? "write_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
494 | type & DYNPTR_TYPE_SKB_META ? "dynptr_skb_meta_" : "",
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
495 | type & DYNPTR_TYPE_FILE ? "dynptr_file_" : ""
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
496 | );
| ~
vim +476 kernel/bpf/log.c
434
435 /* string representation of 'enum bpf_reg_type'
436 *
437 * Note that reg_type_str() can not appear more than once in a single verbose()
438 * statement.
439 */
440 const char *reg_type_str(struct bpf_verifier_env *env, enum bpf_reg_type type)
441 {
442 char postfix[16] = {0}, prefix[64] = {0};
443 static const char * const str[] = {
444 [NOT_INIT] = "?",
445 [SCALAR_VALUE] = "scalar",
446 [PTR_TO_CTX] = "ctx",
447 [CONST_PTR_TO_MAP] = "map_ptr",
448 [PTR_TO_MAP_VALUE] = "map_value",
449 [PTR_TO_STACK] = "fp",
450 [PTR_TO_PACKET] = "pkt",
451 [PTR_TO_PACKET_META] = "pkt_meta",
452 [PTR_TO_PACKET_END] = "pkt_end",
453 [PTR_TO_FLOW_KEYS] = "flow_keys",
454 [PTR_TO_SOCKET] = "sock",
455 [PTR_TO_SOCK_COMMON] = "sock_common",
456 [PTR_TO_TCP_SOCK] = "tcp_sock",
457 [PTR_TO_TP_BUFFER] = "tp_buffer",
458 [PTR_TO_XDP_SOCK] = "xdp_sock",
459 [PTR_TO_BTF_ID] = "ptr_",
460 [PTR_TO_MEM] = "mem",
461 [PTR_TO_ARENA] = "arena",
462 [PTR_TO_BUF] = "buf",
463 [PTR_TO_FUNC] = "func",
464 [PTR_TO_INSN] = "insn",
465 [PTR_TO_MAP_KEY] = "map_key",
466 [CONST_PTR_TO_DYNPTR] = "dynptr_ptr",
467 };
468
469 if (type & PTR_MAYBE_NULL) {
470 if (base_type(type) == PTR_TO_BTF_ID)
471 strscpy(postfix, "or_null_");
472 else
473 strscpy(postfix, "_or_null");
474 }
475
> 476 snprintf(prefix, sizeof(prefix), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
477 type & MEM_RDONLY ? "rdonly_" : "",
478 type & MEM_RINGBUF ? "ringbuf_" : "",
479 type & MEM_USER ? "user_" : "",
480 type & MEM_PERCPU ? "percpu_" : "",
481 type & MEM_RCU ? "rcu_" : "",
482 type & PTR_UNTRUSTED ? "untrusted_" : "",
483 type & PTR_TRUSTED ? "trusted_" : "",
484 type & MEM_UNINIT ? "uninit_" : "",
485 type & DYNPTR_TYPE_LOCAL ? "dynptr_local_" : "",
486 type & DYNPTR_TYPE_RINGBUF ? "dynptr_ringbuf_" : "",
487 type & MEM_FIXED_SIZE ? "fixed_size_" : "",
488 type & MEM_ALLOC ? "alloc_" : "",
489 type & NON_OWN_REF ? "non_own_ref_" : "",
490 type & DYNPTR_TYPE_SKB ? "dynptr_skb_" : "",
491 type & DYNPTR_TYPE_XDP ? "dynptr_xdp_" : "",
492 type & MEM_ALIGNED ? "aligned_" : "",
493 type & MEM_WRITE ? "write_" : "",
494 type & DYNPTR_TYPE_SKB_META ? "dynptr_skb_meta_" : "",
495 type & DYNPTR_TYPE_FILE ? "dynptr_file_" : ""
496 );
497
498 snprintf(env->tmp_str_buf, TMP_STR_BUF_LEN, "%s%s%s",
499 prefix, str[base_type(type)], postfix);
500 return env->tmp_str_buf;
501 }
502
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-28 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 8:58 Feng Yang
2026-01-28 14:10 ` Mykyta Yatsenko
2026-01-28 14:45 ` kernel test robot [this message]
2026-01-28 15:26 ` 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=202601282215.BONmLaMY-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yangfeng59949@163.com \
--cc=yonghong.song@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®