From: kernel test robot <lkp@intel.com>
To: Roberto Sassu <roberto.sassu@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Alexei Starovoitov <ast@kernel.org>
Subject: kernel/trace/bpf_trace.c:1309:5: warning: no previous declaration for 'bpf_verify_pkcs7_signature'
Date: Thu, 17 Aug 2023 02:50:19 +0800 [thread overview]
Message-ID: <202308170254.vZfr8Zuo-lkp@intel.com> (raw)
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
reply other threads:[~2023-08-16 18:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202308170254.vZfr8Zuo-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=roberto.sassu@huawei.com \
/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
all inboxes | Powered by JetHome®