BPF List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliang@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Matthieu Baerts <matttbe@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Geliang Tang <tanggeliang@kylinos.cn>,
	bpf@vger.kernel.org, mptcp@lists.linux.dev
Subject: Re: [PATCH bpf-next v3 1/2] bpf, btf: Add register_check_missing_btf helper
Date: Fri, 9 Feb 2024 11:28:13 +0800	[thread overview]
Message-ID: <202402091146.VUsU5iPl-lkp@intel.com> (raw)
In-Reply-To: <6dfe28c4045e1a3d31b3ba60dde31c7650ac66df.1707029682.git.tanggeliang@kylinos.cn>

Hi Geliang,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Geliang-Tang/bpf-btf-Add-register_check_missing_btf-helper/20240204-150130
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/6dfe28c4045e1a3d31b3ba60dde31c7650ac66df.1707029682.git.tanggeliang%40kylinos.cn
patch subject: [PATCH bpf-next v3 1/2] bpf, btf: Add register_check_missing_btf helper
config: x86_64-buildonly-randconfig-004-20240209 (https://download.01.org/0day-ci/archive/20240209/202402091146.VUsU5iPl-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240209/202402091146.VUsU5iPl-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/202402091146.VUsU5iPl-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:7287:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    7287 |  seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                      ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:7324:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    7324 |  len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |  ^~~
   In file included from include/asm-generic/bug.h:22,
                    from arch/x86/include/asm/bug.h:87,
                    from include/linux/bug.h:5,
                    from arch/x86/include/asm/paravirt.h:19,
                    from arch/x86/include/asm/cpuid.h:62,
                    from arch/x86/include/asm/processor.h:19,
                    from include/linux/sched.h:13,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   kernel/bpf/btf.c: In function 'register_check_missing_btf':
>> kernel/bpf/btf.c:7751:11: error: dereferencing pointer to incomplete type 'const struct module'
    7751 |     module->name, msg);
         |           ^~
   include/linux/printk.h:427:19: note: in definition of macro 'printk_index_wrap'
     427 |   _p_func(_fmt, ##__VA_ARGS__);    \
         |                   ^~~~~~~~~~~
   include/linux/printk.h:508:2: note: in expansion of macro 'printk'
     508 |  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~
   kernel/bpf/btf.c:7750:4: note: in expansion of macro 'pr_warn'
    7750 |    pr_warn("allow module %s BTF mismatch, skip register %s\n",
         |    ^~~~~~~


vim +7751 kernel/bpf/btf.c

  7741	
  7742	static int register_check_missing_btf(const struct module *module, const char *msg)
  7743	{
  7744		if (!module && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) {
  7745			pr_err("missing vmlinux BTF, cannot register %s\n", msg);
  7746			return -ENOENT;
  7747		}
  7748		if (module && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES)) {
  7749			if (IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) {
  7750				pr_warn("allow module %s BTF mismatch, skip register %s\n",
> 7751					module->name, msg);
  7752				return 0;
  7753			}
  7754			pr_err("missing module %s BTF, cannot register %s\n", module->name, msg);
  7755			return -ENOENT;
  7756		}
  7757		return 0;
  7758	}
  7759	

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

  reply	other threads:[~2024-02-09  3:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04  6:58 [PATCH bpf-next v3 0/2] bpf, btf: Add DEBUG_INFO_BTF checks for __register_bpf_struct_ops Geliang Tang
2024-02-04  6:58 ` [PATCH bpf-next v3 1/2] bpf, btf: Add register_check_missing_btf helper Geliang Tang
2024-02-09  3:28   ` kernel test robot [this message]
2024-02-04  6:58 ` [PATCH bpf-next v3 2/2] bpf, btf: Check btf for register_bpf_struct_ops Geliang Tang

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=202402091146.VUsU5iPl-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=geliang@kernel.org \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=tanggeliang@kylinos.cn \
    --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