All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Xu <dxu@dxuuu.xyz>,
	rostedt@goodmis.org, martin.lau@linux.dev, shuah@kernel.org,
	song@kernel.org, mhiramat@kernel.org, ast@kernel.org,
	andrii@kernel.org, pabeni@redhat.com, ebiggers@kernel.org,
	tytso@mit.edu, vadim.fedorenko@linux.dev, eddyz87@gmail.com,
	davem@davemloft.net, edumazet@google.com, daniel@iogearbox.net,
	hawk@kernel.org, kuba@kernel.org, john.fastabend@gmail.com,
	olsajiri@gmail.com, quentin@isovalent.com,
	alan.maguire@oracle.com, acme@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	yonghong.song@linux.dev, kpsingh@kernel.org, sdf@google.com,
	haoluo@google.com, jolsa@kernel.org,
	mathieu.desnoyers@efficios.com, mykolal@fb.com,
	fsverity@lists.linux.dev
Subject: Re: [PATCH bpf-next v4 09/12] bpf: treewide: Align kfunc signatures to prog point-of-view
Date: Sun, 9 Jun 2024 09:35:24 +0800	[thread overview]
Message-ID: <202406090949.IpHo1F5q-lkp@intel.com> (raw)
In-Reply-To: <677377439845fcb9135151d1dac1102ed3d6c924.1717881178.git.dxu@dxuuu.xyz>

Hi Daniel,

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/Daniel-Xu/kbuild-bpf-Tell-pahole-to-DECL_TAG-kfuncs/20240609-052326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/677377439845fcb9135151d1dac1102ed3d6c924.1717881178.git.dxu%40dxuuu.xyz
patch subject: [PATCH bpf-next v4 09/12] bpf: treewide: Align kfunc signatures to prog point-of-view
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240609/202406090949.IpHo1F5q-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240609/202406090949.IpHo1F5q-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/202406090949.IpHo1F5q-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/verity/measure.c:121: warning: Function parameter or struct member 'digest_p' not described in 'bpf_get_fsverity_digest'
>> fs/verity/measure.c:121: warning: Excess function parameter 'digest_ptr' description in 'bpf_get_fsverity_digest'
--
>> kernel/trace/bpf_trace.c:1384: warning: Function parameter or struct member 'data_p' not described in 'bpf_verify_pkcs7_signature'
>> kernel/trace/bpf_trace.c:1384: warning: Function parameter or struct member 'sig_p' not described in 'bpf_verify_pkcs7_signature'
>> kernel/trace/bpf_trace.c:1384: warning: Excess function parameter 'data_ptr' description in 'bpf_verify_pkcs7_signature'
>> kernel/trace/bpf_trace.c:1384: warning: Excess function parameter 'sig_ptr' description in 'bpf_verify_pkcs7_signature'
>> kernel/trace/bpf_trace.c:1459: warning: Function parameter or struct member 'value_p' not described in 'bpf_get_file_xattr'
>> kernel/trace/bpf_trace.c:1459: warning: Excess function parameter 'value_ptr' description in 'bpf_get_file_xattr'


vim +121 fs/verity/measure.c

67814c00de3161 Song Liu  2023-11-29  110  
67814c00de3161 Song Liu  2023-11-29  111  /**
67814c00de3161 Song Liu  2023-11-29  112   * bpf_get_fsverity_digest: read fsverity digest of file
67814c00de3161 Song Liu  2023-11-29  113   * @file: file to get digest from
67814c00de3161 Song Liu  2023-11-29  114   * @digest_ptr: (out) dynptr for struct fsverity_digest
67814c00de3161 Song Liu  2023-11-29  115   *
67814c00de3161 Song Liu  2023-11-29  116   * Read fsverity_digest of *file* into *digest_ptr*.
67814c00de3161 Song Liu  2023-11-29  117   *
67814c00de3161 Song Liu  2023-11-29  118   * Return: 0 on success, a negative value on error.
67814c00de3161 Song Liu  2023-11-29  119   */
ec3b75c0e6eb53 Daniel Xu 2024-06-08  120  __bpf_kfunc int bpf_get_fsverity_digest(struct file *file, struct bpf_dynptr *digest_p)
67814c00de3161 Song Liu  2023-11-29 @121  {
ec3b75c0e6eb53 Daniel Xu 2024-06-08  122  	struct bpf_dynptr_kern *digest_ptr = (struct bpf_dynptr_kern *)digest_p;
67814c00de3161 Song Liu  2023-11-29  123  	const struct inode *inode = file_inode(file);
67814c00de3161 Song Liu  2023-11-29  124  	u32 dynptr_sz = __bpf_dynptr_size(digest_ptr);
67814c00de3161 Song Liu  2023-11-29  125  	struct fsverity_digest *arg;
67814c00de3161 Song Liu  2023-11-29  126  	const struct fsverity_info *vi;
67814c00de3161 Song Liu  2023-11-29  127  	const struct fsverity_hash_alg *hash_alg;
67814c00de3161 Song Liu  2023-11-29  128  	int out_digest_sz;
67814c00de3161 Song Liu  2023-11-29  129  
67814c00de3161 Song Liu  2023-11-29  130  	if (dynptr_sz < sizeof(struct fsverity_digest))
67814c00de3161 Song Liu  2023-11-29  131  		return -EINVAL;
67814c00de3161 Song Liu  2023-11-29  132  
67814c00de3161 Song Liu  2023-11-29  133  	arg = __bpf_dynptr_data_rw(digest_ptr, dynptr_sz);
67814c00de3161 Song Liu  2023-11-29  134  	if (!arg)
67814c00de3161 Song Liu  2023-11-29  135  		return -EINVAL;
67814c00de3161 Song Liu  2023-11-29  136  
67814c00de3161 Song Liu  2023-11-29  137  	if (!IS_ALIGNED((uintptr_t)arg, __alignof__(*arg)))
67814c00de3161 Song Liu  2023-11-29  138  		return -EINVAL;
67814c00de3161 Song Liu  2023-11-29  139  
67814c00de3161 Song Liu  2023-11-29  140  	vi = fsverity_get_info(inode);
67814c00de3161 Song Liu  2023-11-29  141  	if (!vi)
67814c00de3161 Song Liu  2023-11-29  142  		return -ENODATA; /* not a verity file */
67814c00de3161 Song Liu  2023-11-29  143  
67814c00de3161 Song Liu  2023-11-29  144  	hash_alg = vi->tree_params.hash_alg;
67814c00de3161 Song Liu  2023-11-29  145  
67814c00de3161 Song Liu  2023-11-29  146  	arg->digest_algorithm = hash_alg - fsverity_hash_algs;
67814c00de3161 Song Liu  2023-11-29  147  	arg->digest_size = hash_alg->digest_size;
67814c00de3161 Song Liu  2023-11-29  148  
67814c00de3161 Song Liu  2023-11-29  149  	out_digest_sz = dynptr_sz - sizeof(struct fsverity_digest);
67814c00de3161 Song Liu  2023-11-29  150  
67814c00de3161 Song Liu  2023-11-29  151  	/* copy digest */
67814c00de3161 Song Liu  2023-11-29  152  	memcpy(arg->digest, vi->file_digest,  min_t(int, hash_alg->digest_size, out_digest_sz));
67814c00de3161 Song Liu  2023-11-29  153  
67814c00de3161 Song Liu  2023-11-29  154  	/* fill the extra buffer with zeros */
67814c00de3161 Song Liu  2023-11-29  155  	if (out_digest_sz > hash_alg->digest_size)
67814c00de3161 Song Liu  2023-11-29  156  		memset(arg->digest + arg->digest_size, 0, out_digest_sz - hash_alg->digest_size);
67814c00de3161 Song Liu  2023-11-29  157  
67814c00de3161 Song Liu  2023-11-29  158  	return 0;
67814c00de3161 Song Liu  2023-11-29  159  }
67814c00de3161 Song Liu  2023-11-29  160  

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

  parent reply	other threads:[~2024-06-09  1:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-08 21:15 [PATCH bpf-next v4 00/12] bpf: Support dumping kfunc prototypes from BTF Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 01/12] kbuild: bpf: Tell pahole to DECL_TAG kfuncs Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 02/12] bpf: selftests: Fix bpf_iter_task_vma_new() prototype Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 03/12] bpf: selftests: Fix fentry test kfunc prototypes Daniel Xu
2024-06-10 13:28   ` Jiri Olsa
2024-06-11 16:58     ` Daniel Xu
2024-06-12 12:41       ` Jiri Olsa
2024-06-08 21:16 ` [PATCH bpf-next v4 04/12] bpf: selftests: Fix bpf_cpumask_first_zero() kfunc prototype Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 05/12] bpf: selftests: Fix bpf_map_sum_elem_count() " Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 06/12] bpf: selftests: Fix bpf_session_cookie() " Daniel Xu
2024-06-10 13:04   ` Jiri Olsa
2024-06-11 15:54     ` Daniel Xu
2024-06-11 16:03       ` Alexei Starovoitov
2024-06-17 22:25     ` Andrii Nakryiko
2024-06-18 12:43       ` Jiri Olsa
2024-06-18 16:58         ` Andrii Nakryiko
2024-06-18 19:07           ` Jiri Olsa
2024-06-18 20:29             ` Andrii Nakryiko
2024-06-08 21:16 ` [PATCH bpf-next v4 07/12] bpf: selftests: Namespace struct_opt callbacks in bpf_dctcp Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 08/12] bpf: verifier: Relax caller requirements for kfunc projection type args Daniel Xu
2024-06-10 18:30   ` Alexei Starovoitov
2024-06-11 18:01     ` Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 09/12] bpf: treewide: Align kfunc signatures to prog point-of-view Daniel Xu
2024-06-09  0:13   ` kernel test robot
2024-06-09  1:35   ` kernel test robot [this message]
2024-06-08 21:16 ` [PATCH bpf-next v4 10/12] bpf: selftests: nf: Opt out of using generated kfunc prototypes Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 11/12] bpf: selftests: xfrm: " Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 12/12] bpftool: Support dumping kfunc prototypes from BTF Daniel Xu
2024-06-08 21:23 ` [PATCH bpf-next v4 00/12] bpf: " Daniel Xu

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=202406090949.IpHo1F5q-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dxu@dxuuu.xyz \
    --cc=ebiggers@kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=fsverity@lists.linux.dev \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.lau@linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mykolal@fb.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olsajiri@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=quentin@isovalent.com \
    --cc=rostedt@goodmis.org \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tytso@mit.edu \
    --cc=vadim.fedorenko@linux.dev \
    --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 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.