BPF Archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vadim Fedorenko <vadfed@meta.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Mykola Lysenko <mykolal@fb.com>, Jakub Kicinski <kuba@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/4] bpf: crypto: make state and IV dynptr nullable
Date: Fri, 10 May 2024 11:07:27 +0800	[thread overview]
Message-ID: <202405101026.4PbHjNBN-lkp@intel.com> (raw)
In-Reply-To: <20240509134023.1289303-3-vadfed@meta.com>

Hi Vadim,

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/Vadim-Fedorenko/bpf-verifier-make-kfuncs-args-nullalble/20240509-214252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20240509134023.1289303-3-vadfed%40meta.com
patch subject: [PATCH bpf-next 2/4] bpf: crypto: make state and IV dynptr nullable
config: x86_64-randconfig-102-20240510 (https://download.01.org/0day-ci/archive/20240510/202405101026.4PbHjNBN-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240510/202405101026.4PbHjNBN-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/202405101026.4PbHjNBN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/bpf/crypto.c:317: warning: Function parameter or struct member 'siv__nullable' not described in 'bpf_crypto_decrypt'
>> kernel/bpf/crypto.c:317: warning: Excess function parameter 'siv' description in 'bpf_crypto_decrypt'
>> kernel/bpf/crypto.c:334: warning: Function parameter or struct member 'siv__nullable' not described in 'bpf_crypto_encrypt'
>> kernel/bpf/crypto.c:334: warning: Excess function parameter 'siv' description in 'bpf_crypto_encrypt'


vim +317 kernel/bpf/crypto.c

3e1c6f35409f9e Vadim Fedorenko 2024-04-22  303  
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  304  /**
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  305   * bpf_crypto_decrypt() - Decrypt buffer using configured context and IV provided.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  306   * @ctx:	The crypto context being used. The ctx must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  307   * @src:	bpf_dynptr to the encrypted data. Must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  308   * @dst:	bpf_dynptr to the buffer where to store the result. Must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  309   * @siv:	bpf_dynptr to IV data and state data to be used by decryptor.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  310   *
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  311   * Decrypts provided buffer using IV data and the crypto context. Crypto context must be configured.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  312   */
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  313  __bpf_kfunc int bpf_crypto_decrypt(struct bpf_crypto_ctx *ctx,
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  314  				   const struct bpf_dynptr_kern *src,
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  315  				   const struct bpf_dynptr_kern *dst,
9ce5fb6f36b954 Vadim Fedorenko 2024-05-09  316  				   const struct bpf_dynptr_kern *siv__nullable)
3e1c6f35409f9e Vadim Fedorenko 2024-04-22 @317  {
9ce5fb6f36b954 Vadim Fedorenko 2024-05-09  318  	return bpf_crypto_crypt(ctx, src, dst, siv__nullable, true);
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  319  }
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  320  
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  321  /**
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  322   * bpf_crypto_encrypt() - Encrypt buffer using configured context and IV provided.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  323   * @ctx:	The crypto context being used. The ctx must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  324   * @src:	bpf_dynptr to the plain data. Must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  325   * @dst:	bpf_dynptr to buffer where to store the result. Must be a trusted pointer.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  326   * @siv:	bpf_dynptr to IV data and state data to be used by decryptor.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  327   *
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  328   * Encrypts provided buffer using IV data and the crypto context. Crypto context must be configured.
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  329   */
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  330  __bpf_kfunc int bpf_crypto_encrypt(struct bpf_crypto_ctx *ctx,
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  331  				   const struct bpf_dynptr_kern *src,
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  332  				   const struct bpf_dynptr_kern *dst,
9ce5fb6f36b954 Vadim Fedorenko 2024-05-09  333  				   const struct bpf_dynptr_kern *siv__nullable)
3e1c6f35409f9e Vadim Fedorenko 2024-04-22 @334  {
9ce5fb6f36b954 Vadim Fedorenko 2024-05-09  335  	return bpf_crypto_crypt(ctx, src, dst, siv__nullable, false);
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  336  }
3e1c6f35409f9e Vadim Fedorenko 2024-04-22  337  

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

  reply	other threads:[~2024-05-10  3:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 13:40 [PATCH bpf-next 0/4] bpf: make trusted args nullable Vadim Fedorenko
2024-05-09 13:40 ` [PATCH bpf-next 1/4] bpf: verifier: make kfuncs args nullalble Vadim Fedorenko
2024-05-09 13:40 ` [PATCH bpf-next 2/4] bpf: crypto: make state and IV dynptr nullable Vadim Fedorenko
2024-05-10  3:07   ` kernel test robot [this message]
2024-05-09 13:40 ` [PATCH bpf-next 3/4] selftests: bpf: crypto: use NULL instead of 0-sized dynptr Vadim Fedorenko
2024-05-09 13:40 ` [PATCH bpf-next 4/4] selftests: bpf: crypto: adjust bench to use nullable IV Vadim Fedorenko

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=202405101026.4PbHjNBN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).