lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601200149.4hhdN1QQ-lkp@intel.com>
Date: Tue, 20 Jan 2026 01:22:59 +0800
From: kernel test robot <lkp@...el.com>
To: Holger Dengler <dengler@...ux.ibm.com>,
	Eric Biggers <ebiggers@...nel.org>,
	David Laight <david.laight.linux@...il.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Ard Biesheuvel <ardb@...nel.org>,
	"Jason A . Donenfeld" <Jason@...c4.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Harald Freudenberger <freude@...ux.ibm.com>,
	Holger Dengler <dengler@...ux.ibm.com>,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: Re: [PATCH v2 1/1] lib/crypto: tests: Add KUnit tests for AES

Hi Holger,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 47753e09a15d9fd7cdf114550510f4f2af9333ec]

url:    https://github.com/intel-lab-lkp/linux/commits/Holger-Dengler/lib-crypto-tests-Add-KUnit-tests-for-AES/20260119-201615
base:   47753e09a15d9fd7cdf114550510f4f2af9333ec
patch link:    https://lore.kernel.org/r/20260119121210.2662-2-dengler%40linux.ibm.com
patch subject: [PATCH v2 1/1] lib/crypto: tests: Add KUnit tests for AES
config: arm-randconfig-003-20260119 (https://download.01.org/0day-ci/archive/20260120/202601200149.4hhdN1QQ-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260120/202601200149.4hhdN1QQ-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601200149.4hhdN1QQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> lib/crypto/tests/aes_kunit.c:77:31: warning: overflow in expression; result is -1'179'869'184 with type 'long' [-Winteger-overflow]
      77 |                    div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
         |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   include/kunit/test.h:680:39: note: expanded from macro 'kunit_info'
     680 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   include/kunit/test.h:668:21: note: expanded from macro 'kunit_printk'
     668 |                   (test)->name, ##__VA_ARGS__)
         |                                   ^~~~~~~~~~~
   include/kunit/test.h:661:21: note: expanded from macro 'kunit_log'
     661 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                                   ^~~~~~~~~~~
   include/linux/printk.h:512:60: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                            ^~~~~~~~~~~
   include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
>> lib/crypto/tests/aes_kunit.c:77:31: warning: overflow in expression; result is -1'179'869'184 with type 'long' [-Winteger-overflow]
      77 |                    div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
         |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   include/kunit/test.h:680:39: note: expanded from macro 'kunit_info'
     680 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   include/kunit/test.h:668:21: note: expanded from macro 'kunit_printk'
     668 |                   (test)->name, ##__VA_ARGS__)
         |                                   ^~~~~~~~~~~
   include/kunit/test.h:663:8: note: expanded from macro 'kunit_log'
     663 |                                  ##__VA_ARGS__);                        \
         |                                    ^~~~~~~~~~~
   lib/crypto/tests/aes_kunit.c:80:31: warning: overflow in expression; result is -1'179'869'184 with type 'long' [-Winteger-overflow]
      80 |                    div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
         |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   include/kunit/test.h:680:39: note: expanded from macro 'kunit_info'
     680 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   include/kunit/test.h:668:21: note: expanded from macro 'kunit_printk'
     668 |                   (test)->name, ##__VA_ARGS__)
         |                                   ^~~~~~~~~~~
   include/kunit/test.h:661:21: note: expanded from macro 'kunit_log'
     661 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                                   ^~~~~~~~~~~
   include/linux/printk.h:512:60: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                            ^~~~~~~~~~~
   include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   lib/crypto/tests/aes_kunit.c:80:31: warning: overflow in expression; result is -1'179'869'184 with type 'long' [-Winteger-overflow]
      80 |                    div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
         |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   include/kunit/test.h:680:39: note: expanded from macro 'kunit_info'
     680 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   include/kunit/test.h:668:21: note: expanded from macro 'kunit_printk'
     668 |                   (test)->name, ##__VA_ARGS__)
         |                                   ^~~~~~~~~~~
   include/kunit/test.h:663:8: note: expanded from macro 'kunit_log'
     663 |                                  ##__VA_ARGS__);                        \
         |                                    ^~~~~~~~~~~
   4 warnings generated.


vim +77 lib/crypto/tests/aes_kunit.c

    45	
    46	static void benchmark_aes(struct kunit *test, const struct aes_testvector *tv)
    47	{
    48		const size_t num_iters = 100;
    49		struct aes_key aes_key;
    50		u8 out[AES_BLOCK_SIZE];
    51		u64 t, t_enc, t_dec;
    52		int rc;
    53	
    54		if (!IS_ENABLED(CONFIG_CRYPTO_LIB_BENCHMARK))
    55			kunit_skip(test, "not enabled");
    56	
    57		rc = aes_preparekey(&aes_key, tv->key.b, tv->key.len);
    58		KUNIT_ASSERT_EQ(test, 0, rc);
    59	
    60		/* warm-up */
    61		for (size_t i = 0; i < num_iters; i++) {
    62			aes_encrypt(&aes_key, out, tv->plain);
    63			aes_decrypt(&aes_key, out, tv->cipher);
    64		}
    65	
    66		t_enc = NSEC_PER_SEC;
    67		t_dec = NSEC_PER_SEC;
    68		for (size_t i = 0; i < num_iters; i++) {
    69			t = time_aes_op(true, &aes_key, out, tv->plain);
    70			t_enc = MIN_T(u64, t, t_enc);
    71	
    72			t = time_aes_op(false, &aes_key, out, tv->cipher);
    73			t_dec = MIN_T(u64, t, t_dec);
    74		}
    75	
    76		kunit_info(test, "enc (len=%zu): %llu MB/s", (size_t)AES_BLOCK_SIZE,
  > 77			   div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
    78				     (t_enc ?: 1)));
    79		kunit_info(test, "dec (len=%zu): %llu MB/s", (size_t)AES_BLOCK_SIZE,
    80			   div64_u64(AES_BLOCK_SIZE * NSEC_PER_SEC / 1000000,
    81				     (t_dec ?: 1)));
    82	}
    83	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ