From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Harsh Jain <h.jain@amd.com>,
herbert@gondor.apana.org.au, davem@davemloft.net,
linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
mounika.botcha@amd.com, sarat.chand.savitala@amd.com,
mohan.dhanawade@amd.com, michal.simek@amd.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Harsh Jain <h.jain@amd.com>
Subject: Re: [PATCH 3/3] crypto: drbg: Export CTR DRBG DF functions
Date: Mon, 2 Jun 2025 09:50:07 +0300 [thread overview]
Message-ID: <202505311325.22fIOcCt-lkp@intel.com> (raw)
In-Reply-To: <20250529113116.669667-4-h.jain@amd.com>
Hi Harsh,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Harsh-Jain/dt-bindings-crypto-Add-node-for-True-Random-Number-Generator/20250529-193255
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20250529113116.669667-4-h.jain%40amd.com
patch subject: [PATCH 3/3] crypto: drbg: Export CTR DRBG DF functions
config: s390-randconfig-r073-20250531 (https://download.01.org/0day-ci/archive/20250531/202505311325.22fIOcCt-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202505311325.22fIOcCt-lkp@intel.com/
smatch warnings:
drivers/crypto/xilinx/xilinx-trng.c:368 xtrng_probe() warn: missing unwind goto?
vim +368 drivers/crypto/xilinx/xilinx-trng.c
940a39f34689c6 Harsh Jain 2025-05-29 334 static int xtrng_probe(struct platform_device *pdev)
940a39f34689c6 Harsh Jain 2025-05-29 335 {
940a39f34689c6 Harsh Jain 2025-05-29 336 struct xilinx_rng *rng;
bf8ac5fe42abd6 Harsh Jain 2025-05-29 337 size_t sb_size;
940a39f34689c6 Harsh Jain 2025-05-29 338 int ret;
940a39f34689c6 Harsh Jain 2025-05-29 339
940a39f34689c6 Harsh Jain 2025-05-29 340 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL);
940a39f34689c6 Harsh Jain 2025-05-29 341 if (!rng)
940a39f34689c6 Harsh Jain 2025-05-29 342 return -ENOMEM;
940a39f34689c6 Harsh Jain 2025-05-29 343
940a39f34689c6 Harsh Jain 2025-05-29 344 rng->dev = &pdev->dev;
940a39f34689c6 Harsh Jain 2025-05-29 345 rng->rng_base = devm_platform_ioremap_resource(pdev, 0);
940a39f34689c6 Harsh Jain 2025-05-29 346 if (IS_ERR(rng->rng_base)) {
940a39f34689c6 Harsh Jain 2025-05-29 347 dev_err(&pdev->dev, "Failed to map resource %ld\n", PTR_ERR(rng->rng_base));
940a39f34689c6 Harsh Jain 2025-05-29 348 return PTR_ERR(rng->rng_base);
940a39f34689c6 Harsh Jain 2025-05-29 349 }
940a39f34689c6 Harsh Jain 2025-05-29 350
bf8ac5fe42abd6 Harsh Jain 2025-05-29 351 rng->tfm = crypto_alloc_cipher("aes", 0, 0);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 352 if (IS_ERR(rng->tfm)) {
bf8ac5fe42abd6 Harsh Jain 2025-05-29 353 pr_info("DRBG: could not allocate cipher TFM handle:\n");
bf8ac5fe42abd6 Harsh Jain 2025-05-29 354 return PTR_ERR(rng->tfm);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 355 }
bf8ac5fe42abd6 Harsh Jain 2025-05-29 356
bf8ac5fe42abd6 Harsh Jain 2025-05-29 357 sb_size = crypto_drbg_ctr_df_datalen(TRNG_SEED_LEN_BYTES, AES_BLOCK_SIZE);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 358 rng->scratchpadbuf = devm_kzalloc(&pdev->dev, sb_size, GFP_KERNEL);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 359 if (!rng->scratchpadbuf) {
bf8ac5fe42abd6 Harsh Jain 2025-05-29 360 ret = -ENOMEM;
bf8ac5fe42abd6 Harsh Jain 2025-05-29 361 goto cipher_cleanup;
bf8ac5fe42abd6 Harsh Jain 2025-05-29 362 }
bf8ac5fe42abd6 Harsh Jain 2025-05-29 363
940a39f34689c6 Harsh Jain 2025-05-29 364 xtrng_trng_reset(rng->rng_base);
940a39f34689c6 Harsh Jain 2025-05-29 365 ret = xtrng_reseed_internal(rng);
940a39f34689c6 Harsh Jain 2025-05-29 366 if (ret) {
940a39f34689c6 Harsh Jain 2025-05-29 367 dev_err(&pdev->dev, "TRNG Seed fail\n");
940a39f34689c6 Harsh Jain 2025-05-29 @368 return ret;
goto cipher_cleanup;
940a39f34689c6 Harsh Jain 2025-05-29 369 }
940a39f34689c6 Harsh Jain 2025-05-29 370
940a39f34689c6 Harsh Jain 2025-05-29 371 xilinx_rng_dev = rng;
940a39f34689c6 Harsh Jain 2025-05-29 372 mutex_init(&rng->lock);
940a39f34689c6 Harsh Jain 2025-05-29 373 ret = crypto_register_rng(&xtrng_trng_alg);
940a39f34689c6 Harsh Jain 2025-05-29 374 if (ret) {
940a39f34689c6 Harsh Jain 2025-05-29 375 dev_err(&pdev->dev, "Crypto Random device registration failed: %d\n", ret);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 376 goto cipher_cleanup;
940a39f34689c6 Harsh Jain 2025-05-29 377 }
bf8ac5fe42abd6 Harsh Jain 2025-05-29 378
940a39f34689c6 Harsh Jain 2025-05-29 379 ret = xtrng_hwrng_register(&rng->trng);
940a39f34689c6 Harsh Jain 2025-05-29 380 if (ret) {
940a39f34689c6 Harsh Jain 2025-05-29 381 dev_err(&pdev->dev, "HWRNG device registration failed: %d\n", ret);
940a39f34689c6 Harsh Jain 2025-05-29 382 goto crypto_rng_free;
940a39f34689c6 Harsh Jain 2025-05-29 383 }
940a39f34689c6 Harsh Jain 2025-05-29 384 platform_set_drvdata(pdev, rng);
940a39f34689c6 Harsh Jain 2025-05-29 385
940a39f34689c6 Harsh Jain 2025-05-29 386 return 0;
940a39f34689c6 Harsh Jain 2025-05-29 387
940a39f34689c6 Harsh Jain 2025-05-29 388 crypto_rng_free:
940a39f34689c6 Harsh Jain 2025-05-29 389 crypto_unregister_rng(&xtrng_trng_alg);
940a39f34689c6 Harsh Jain 2025-05-29 390
bf8ac5fe42abd6 Harsh Jain 2025-05-29 391 cipher_cleanup:
bf8ac5fe42abd6 Harsh Jain 2025-05-29 392 crypto_free_cipher(rng->tfm);
bf8ac5fe42abd6 Harsh Jain 2025-05-29 393
940a39f34689c6 Harsh Jain 2025-05-29 394 return ret;
940a39f34689c6 Harsh Jain 2025-05-29 395 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-06-02 6:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 11:31 [PATCH 0/3] Add Versal TRNG driver Harsh Jain
2025-05-29 11:31 ` [PATCH 1/3] dt-bindings: crypto: Add node for True Random Number Generator Harsh Jain
2025-05-30 16:11 ` Conor Dooley
2025-06-06 6:13 ` Jain, Harsh (AECG-SSW)
2025-05-29 11:31 ` [PATCH 2/3] crypto: xilinx: Add TRNG driver for Versal Harsh Jain
2025-05-30 23:21 ` kernel test robot
2025-05-29 11:31 ` [PATCH 3/3] crypto: drbg: Export CTR DRBG DF functions Harsh Jain
2025-05-30 11:17 ` kernel test robot
2025-06-02 6:50 ` Dan Carpenter [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=202505311325.22fIOcCt-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=h.jain@amd.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=lkp@intel.com \
--cc=michal.simek@amd.com \
--cc=mohan.dhanawade@amd.com \
--cc=mounika.botcha@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=sarat.chand.savitala@amd.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;
as well as URLs for NNTP newsgroup(s).