mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Russ Weight" <russell.h.weight@intel.com>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	"Cezary Rojewski" <cezary.rojewski@intel.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Subject: Re: [PATCH v2] firmware_loader: Add debug message with checksum for FW file
Date: Tue, 28 Feb 2023 22:59:28 +0800	[thread overview]
Message-ID: <202302282231.g7ZUHJUm-lkp@intel.com> (raw)
In-Reply-To: <20230228185507.1729059-1-amadeuszx.slawinski@linux.intel.com>

Hi Amadeusz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.2 next-20230228]
[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/Amadeusz-S-awi-ski/firmware_loader-Add-debug-message-with-checksum-for-FW-file/20230228-185558
patch link:    https://lore.kernel.org/r/20230228185507.1729059-1-amadeuszx.slawinski%40linux.intel.com
patch subject: [PATCH v2] firmware_loader: Add debug message with checksum for FW file
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20230228/202302282231.g7ZUHJUm-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/229a0f94cfda465aff751f6a0395b8d6c6688acd
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Amadeusz-S-awi-ski/firmware_loader-Add-debug-message-with-checksum-for-FW-file/20230228-185558
        git checkout 229a0f94cfda465aff751f6a0395b8d6c6688acd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302282231.g7ZUHJUm-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: drivers/base/firmware_loader/main.o: in function `fw_log_firmware_info':
>> drivers/base/firmware_loader/main.c:805: undefined reference to `crypto_alloc_shash'
>> ld: drivers/base/firmware_loader/main.c:817: undefined reference to `crypto_shash_digest'
   ld: drivers/base/firmware_loader/main.o: in function `crypto_free_shash':
>> include/crypto/hash.h:736: undefined reference to `crypto_destroy_tfm'


vim +805 drivers/base/firmware_loader/main.c

   797	
   798	static void fw_log_firmware_info(const struct firmware *fw, const char *name, struct device *device)
   799	{
   800		struct shash_desc *shash;
   801		struct crypto_shash *alg;
   802		u8 *sha256buf;
   803		char *outbuf;
   804	
 > 805		alg = crypto_alloc_shash("sha256", 0, 0);
   806		if (!alg)
   807			return;
   808	
   809		sha256buf = kmalloc(SHA256_DIGEST_SIZE, GFP_KERNEL);
   810		outbuf = kmalloc(SHA256_BLOCK_SIZE + 1, GFP_KERNEL);
   811		shash = kmalloc(sizeof(*shash) + crypto_shash_descsize(alg), GFP_KERNEL);
   812		if (!sha256buf || !outbuf || !shash)
   813			goto out_free;
   814	
   815		shash->tfm = alg;
   816	
 > 817		if (crypto_shash_digest(shash, fw->data, fw->size, sha256buf) < 0)
   818			goto out_shash;
   819	
   820		for (int i = 0; i < SHA256_DIGEST_SIZE; i++)
   821			sprintf(&outbuf[i * 2], "%02x", sha256buf[i]);
   822		outbuf[SHA256_BLOCK_SIZE] = 0;
   823		dev_dbg(device, "Loaded FW: %s, sha256: %s\n", name, outbuf);
   824	
   825	out_shash:
   826		crypto_free_shash(alg);
   827	out_free:
   828		kfree(shash);
   829		kfree(outbuf);
   830		kfree(sha256buf);
   831	}
   832	#else
   833	static void fw_log_firmware_info(const struct firmware *fw, const char *name,
   834					 struct device *device)
   835	{}
   836	#endif
   837	

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

      reply	other threads:[~2023-02-28 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 18:55 Amadeusz Sławiński
2023-02-28 14:59 ` kernel test robot [this message]

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=202302282231.g7ZUHJUm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=cezary.rojewski@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael.j.wysocki@intel.com \
    --cc=russell.h.weight@intel.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®