Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH bpf-next v3 17/17] bpf: Gate verifier diagnostics on log level
       [not found] <20260713153910.2556007-18-memxor@gmail.com>
@ 2026-07-14  3:36 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-14  3:36 UTC (permalink / raw)
  To: Kumar Kartikeya Dwivedi, bpf
  Cc: llvm, oe-kbuild-all, Alexei Starovoitov, Andrii Nakryiko,
	Daniel Borkmann, Eduard Zingerman, Emil Tsalapatis, kkd,
	kernel-team

Hi Kumar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9a3a07d06e7d74f4aecc51396c771149336ac55d]

url:    https://github.com/intel-lab-lkp/linux/commits/Kumar-Kartikeya-Dwivedi/bpf-Add-verifier-diagnostics-report-helpers/20260713-235352
base:   9a3a07d06e7d74f4aecc51396c771149336ac55d
patch link:    https://lore.kernel.org/r/20260713153910.2556007-18-memxor%40gmail.com
patch subject: [PATCH bpf-next v3 17/17] bpf: Gate verifier diagnostics on log level
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260714/202607140517.PEmgml8m-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260714/202607140517.PEmgml8m-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/202607140517.PEmgml8m-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/bpf/diagnostics.c:38:40: warning: diagnostic behavior may be improved by adding the 'format(printf, 2, 3)' attribute to the declaration of 'diag_log' [-Wmissing-format-attribute]
      30 | static void diag_log(struct bpf_verifier_env *env, const char *fmt, ...)
         | __attribute__((format(printf, 2, 3))) 
      31 | {
      32 |         va_list args;
      33 | 
      34 |         if (!bpf_diag_enabled(env))
      35 |                 return;
      36 | 
      37 |         va_start(args, fmt);
      38 |         bpf_verifier_vlog(&env->log, fmt, args);
         |                                               ^
   kernel/bpf/diagnostics.c:30:13: note: 'diag_log' declared here
      30 | static void diag_log(struct bpf_verifier_env *env, const char *fmt, ...)
         |             ^
>> kernel/bpf/diagnostics.c:89:48: warning: diagnostic behavior may be improved by adding the 'format(printf, 2, 0)' attribute to the declaration of 'diag_vprint_indented' [-Wmissing-format-attribute]
      82 | static void diag_vprint_indented(struct bpf_verifier_env *env, const char *fmt, va_list args)
         | __attribute__((format(printf, 2, 0))) 
      83 | {
      84 |         char *buf;
      85 | 
      86 |         if (!bpf_diag_enabled(env))
      87 |                 return;
      88 | 
      89 |         buf = kvasprintf(GFP_KERNEL_ACCOUNT, fmt, args);
         |                                                       ^
   kernel/bpf/diagnostics.c:82:13: note: 'diag_vprint_indented' declared here
      82 | static void diag_vprint_indented(struct bpf_verifier_env *env, const char *fmt, va_list args)
         |             ^
   kernel/bpf/diagnostics.c:130:13: warning: unused function 'diag_report_reason' [-Wunused-function]
     130 | static void diag_report_reason(struct bpf_verifier_env *env, const char *fmt, ...)
         |             ^~~~~~~~~~~~~~~~~~
   kernel/bpf/diagnostics.c:144:13: warning: unused function 'diag_report_suggestion' [-Wunused-function]
     144 | static void diag_report_suggestion(struct bpf_verifier_env *env, const char *fmt, ...)
         |             ^~~~~~~~~~~~~~~~~~~~~~
   4 warnings generated.


vim +89 kernel/bpf/diagnostics.c

    81	
    82	static void diag_vprint_indented(struct bpf_verifier_env *env, const char *fmt, va_list args)
    83	{
    84		char *buf;
    85	
    86		if (!bpf_diag_enabled(env))
    87			return;
    88	
  > 89		buf = kvasprintf(GFP_KERNEL_ACCOUNT, fmt, args);
    90		if (!buf) {
    91			diag_log(env, "%s<failed to allocate diagnostic text>\n", BPF_DIAG_TEXT_INDENT);
    92			return;
    93		}
    94	
    95		diag_print_wrapped_text(env, buf);
    96		kfree(buf);
    97	}
    98	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-14  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260713153910.2556007-18-memxor@gmail.com>
2026-07-14  3:36 ` [PATCH bpf-next v3 17/17] bpf: Gate verifier diagnostics on log level kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox