Hi Peter, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v6.1-rc2 next-20221024] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Peter-Gonda/virt-Prevent-AES-GCM-IV-reuse-in-SNP-guest-driver/20221020-100950 patch link: https://lore.kernel.org/r/20221019150333.1047423-1-pgonda%40google.com patch subject: [PATCH] virt: Prevent AES-GCM IV reuse in SNP guest driver config: x86_64-buildonly-randconfig-r006-20221024 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/3bb420ef25bf00e5fa26d6146446b11e6ebfd255 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Peter-Gonda/virt-Prevent-AES-GCM-IV-reuse-in-SNP-guest-driver/20221020-100950 git checkout 3bb420ef25bf00e5fa26d6146446b11e6ebfd255 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/virt/coco/sev-guest/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/virt/coco/sev-guest/sev-guest.c:351:10: warning: format specifies type 'unsigned long' but the argument has type '__u64 *' (aka 'unsigned long long *') [-Wformat] rc, fw_err); ^~~~~~ include/linux/dev_printk.h:142:69: note: expanded from macro 'dev_alert' dev_printk_index_wrap(_dev_alert, KERN_ALERT, dev, dev_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ 1 warning generated. vim +351 drivers/virt/coco/sev-guest/sev-guest.c 322 323 static int handle_guest_request(struct snp_guest_dev *snp_dev, u64 exit_code, int msg_ver, 324 u8 type, void *req_buf, size_t req_sz, void *resp_buf, 325 u32 resp_sz, __u64 *fw_err) 326 { 327 unsigned long err; 328 u64 seqno; 329 int rc; 330 331 /* Get message sequence and verify that its a non-zero */ 332 seqno = snp_get_msg_seqno(snp_dev); 333 if (!seqno) 334 return -EIO; 335 336 memset(snp_dev->response, 0, sizeof(struct snp_guest_msg)); 337 338 /* Encrypt the userspace provided payload */ 339 rc = enc_payload(snp_dev, seqno, msg_ver, type, req_buf, req_sz); 340 if (rc) 341 return rc; 342 343 /* Call firmware to process the request */ 344 rc = snp_issue_guest_request(exit_code, &snp_dev->input, &err); 345 if (fw_err) 346 *fw_err = err; 347 348 if (rc) { 349 dev_alert(snp_dev->dev, 350 "Detected error from ASP request. rc: %d, fw_err: %lu\n", > 351 rc, fw_err); 352 goto disable_vmpck; 353 } 354 355 rc = verify_and_dec_payload(snp_dev, resp_buf, resp_sz); 356 if (rc) { 357 dev_alert(snp_dev->dev, 358 "Detected unexpected decode failure from ASP. rc: %d\n", 359 rc); 360 goto disable_vmpck; 361 } 362 363 /* Increment to new message sequence after payload decryption was successful. */ 364 snp_inc_msg_seqno(snp_dev); 365 366 return 0; 367 368 disable_vmpck: 369 snp_disable_vmpck(snp_dev); 370 return rc; 371 } 372 -- 0-DAY CI Kernel Test Service https://01.org/lkp