Messages in this thread | | | Date | Sun, 29 Oct 2023 05:06:39 +0800 | From | kernel test robot <> | Subject | arch/powerpc/crypto/aes-gcm-p10-glue.c:121:9: warning: 'gcm_init_htable' accessing 256 bytes in a region of size 224 |
| |
Hi Danny,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 2af9b20dbb39f6ebf9b9b6c090271594627d818e commit: 9c716e1bd369afa2d1c5038297e8ceda3f82db7d crypto: p10-aes-gcm - Remove POWER10_CPU dependency date: 6 months ago config: powerpc64-randconfig-r004-20230830 (https://download.01.org/0day-ci/archive/20231029/202310290551.CnFwE5xz-lkp@intel.com/config) compiler: powerpc64le-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231029/202310290551.CnFwE5xz-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/202310290551.CnFwE5xz-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init': >> arch/powerpc/crypto/aes-gcm-p10-glue.c:121:9: warning: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Wstringop-overflow=] 121 | gcm_init_htable(hash->Htable+32, hash->H); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/crypto/aes-gcm-p10-glue.c:121:9: note: referencing argument 1 of type 'unsigned char[256]' arch/powerpc/crypto/aes-gcm-p10-glue.c:121:9: note: referencing argument 2 of type 'unsigned char[16]' arch/powerpc/crypto/aes-gcm-p10-glue.c:41:17: note: in a call to function 'gcm_init_htable' 41 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]); | ^~~~~~~~~~~~~~~
vim +/gcm_init_htable +121 arch/powerpc/crypto/aes-gcm-p10-glue.c
cdcecfd9991fe9 Danny Tsen 2023-02-20 113 cdcecfd9991fe9 Danny Tsen 2023-02-20 114 static void gcmp10_init(struct gcm_ctx *gctx, u8 *iv, unsigned char *rdkey, cdcecfd9991fe9 Danny Tsen 2023-02-20 115 struct Hash_ctx *hash, u8 *assoc, unsigned int assoclen) cdcecfd9991fe9 Danny Tsen 2023-02-20 116 { cdcecfd9991fe9 Danny Tsen 2023-02-20 117 __be32 counter = cpu_to_be32(1); cdcecfd9991fe9 Danny Tsen 2023-02-20 118 cdcecfd9991fe9 Danny Tsen 2023-02-20 119 aes_p8_encrypt(hash->H, hash->H, rdkey); cdcecfd9991fe9 Danny Tsen 2023-02-20 120 set_subkey(hash->H); cdcecfd9991fe9 Danny Tsen 2023-02-20 @121 gcm_init_htable(hash->Htable+32, hash->H); cdcecfd9991fe9 Danny Tsen 2023-02-20 122 cdcecfd9991fe9 Danny Tsen 2023-02-20 123 *((__be32 *)(iv+12)) = counter; cdcecfd9991fe9 Danny Tsen 2023-02-20 124 cdcecfd9991fe9 Danny Tsen 2023-02-20 125 gctx->Plen = 0; cdcecfd9991fe9 Danny Tsen 2023-02-20 126 cdcecfd9991fe9 Danny Tsen 2023-02-20 127 /* cdcecfd9991fe9 Danny Tsen 2023-02-20 128 * Encrypt counter vector as iv tag and increment counter. cdcecfd9991fe9 Danny Tsen 2023-02-20 129 */ cdcecfd9991fe9 Danny Tsen 2023-02-20 130 aes_p8_encrypt(iv, gctx->ivtag, rdkey); cdcecfd9991fe9 Danny Tsen 2023-02-20 131 cdcecfd9991fe9 Danny Tsen 2023-02-20 132 counter = cpu_to_be32(2); cdcecfd9991fe9 Danny Tsen 2023-02-20 133 *((__be32 *)(iv+12)) = counter; cdcecfd9991fe9 Danny Tsen 2023-02-20 134 memcpy(gctx->iv, iv, 16); cdcecfd9991fe9 Danny Tsen 2023-02-20 135 cdcecfd9991fe9 Danny Tsen 2023-02-20 136 gctx->aadLen = assoclen; cdcecfd9991fe9 Danny Tsen 2023-02-20 137 memset(gctx->aad_hash, 0, 16); cdcecfd9991fe9 Danny Tsen 2023-02-20 138 if (assoclen) cdcecfd9991fe9 Danny Tsen 2023-02-20 139 set_aad(gctx, hash, assoc, assoclen); cdcecfd9991fe9 Danny Tsen 2023-02-20 140 } cdcecfd9991fe9 Danny Tsen 2023-02-20 141
:::::: The code at line 121 was first introduced by commit :::::: cdcecfd9991fe9aac8160a9731b0ffd1e702d19d crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation
:::::: TO: Danny Tsen <dtsen@linux.ibm.com> :::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
| |