mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kernel/trace/bpf_trace.c:1309:5: warning: no previous declaration for 'bpf_verify_pkcs7_signature'
@ 2023-08-16 18:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-16 18:50 UTC (permalink / raw)
  To: Roberto Sassu; +Cc: oe-kbuild-all, linux-kernel, Alexei Starovoitov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6
commit: 865b0566d8f1a0c3937e5eb4bd6ba4ef03e7e98c bpf: Add bpf_verify_pkcs7_signature() kfunc
date:   11 months ago
config: x86_64-randconfig-x012-20230816 (https://download.01.org/0day-ci/archive/20230817/202308170254.vZfr8Zuo-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20230817/202308170254.vZfr8Zuo-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/202308170254.vZfr8Zuo-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/trace/bpf_trace.c:1216:17: warning: no previous declaration for 'bpf_lookup_user_key' [-Wmissing-declarations]
    struct bpf_key *bpf_lookup_user_key(u32 serial, u64 flags)
                    ^~~~~~~~~~~~~~~~~~~
   kernel/trace/bpf_trace.c:1265:17: warning: no previous declaration for 'bpf_lookup_system_key' [-Wmissing-declarations]
    struct bpf_key *bpf_lookup_system_key(u64 id)
                    ^~~~~~~~~~~~~~~~~~~~~
   kernel/trace/bpf_trace.c:1289:6: warning: no previous declaration for 'bpf_key_put' [-Wmissing-declarations]
    void bpf_key_put(struct bpf_key *bkey)
         ^~~~~~~~~~~
>> kernel/trace/bpf_trace.c:1309:5: warning: no previous declaration for 'bpf_verify_pkcs7_signature' [-Wmissing-declarations]
    int bpf_verify_pkcs7_signature(struct bpf_dynptr_kern *data_ptr,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_verify_pkcs7_signature +1309 kernel/trace/bpf_trace.c

  1296	
  1297	#ifdef CONFIG_SYSTEM_DATA_VERIFICATION
  1298	/**
  1299	 * bpf_verify_pkcs7_signature - verify a PKCS#7 signature
  1300	 * @data_ptr: data to verify
  1301	 * @sig_ptr: signature of the data
  1302	 * @trusted_keyring: keyring with keys trusted for signature verification
  1303	 *
  1304	 * Verify the PKCS#7 signature *sig_ptr* against the supplied *data_ptr*
  1305	 * with keys in a keyring referenced by *trusted_keyring*.
  1306	 *
  1307	 * Return: 0 on success, a negative value on error.
  1308	 */
> 1309	int bpf_verify_pkcs7_signature(struct bpf_dynptr_kern *data_ptr,
  1310				       struct bpf_dynptr_kern *sig_ptr,
  1311				       struct bpf_key *trusted_keyring)
  1312	{
  1313		int ret;
  1314	
  1315		if (trusted_keyring->has_ref) {
  1316			/*
  1317			 * Do the permission check deferred in bpf_lookup_user_key().
  1318			 * See bpf_lookup_user_key() for more details.
  1319			 *
  1320			 * A call to key_task_permission() here would be redundant, as
  1321			 * it is already done by keyring_search() called by
  1322			 * find_asymmetric_key().
  1323			 */
  1324			ret = key_validate(trusted_keyring->key);
  1325			if (ret < 0)
  1326				return ret;
  1327		}
  1328	
  1329		return verify_pkcs7_signature(data_ptr->data,
  1330					      bpf_dynptr_get_size(data_ptr),
  1331					      sig_ptr->data,
  1332					      bpf_dynptr_get_size(sig_ptr),
  1333					      trusted_keyring->key,
  1334					      VERIFYING_UNSPECIFIED_SIGNATURE, NULL,
  1335					      NULL);
  1336	}
  1337	#endif /* CONFIG_SYSTEM_DATA_VERIFICATION */
  1338	

-- 
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:[~2023-08-16 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 18:50 kernel/trace/bpf_trace.c:1309:5: warning: no previous declaration for 'bpf_verify_pkcs7_signature' 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

all inboxes | Powered by JetHome®