linux-stable/arch
Gustavo A. R. Silva aaa03fdb56 crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings
The compiler doesn't know that `32` is an offset into the Hash table:

 56 struct Hash_ctx {
 57         u8 H[16];       /* subkey */
 58         u8 Htable[256]; /* Xi, Hash table(offset 32) */
 59 };

So, it legitimately complains about a potential out-of-bounds issue
if `256 bytes` are accessed in `htable` (this implies going
`32 bytes` beyond the boundaries of `Htable`):

arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init':
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: error: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Werror=stringop-overflow=]
  120 |         gcm_init_htable(hash->Htable+32, hash->H);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 1 of type 'unsigned char[256]'
arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 2 of type 'unsigned char[16]'
arch/powerpc/crypto/aes-gcm-p10-glue.c:40:17: note: in a call to function 'gcm_init_htable'
   40 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]);
      |                 ^~~~~~~~~~~~~~~

Address this by avoiding specifying the size of `htable` in the function
prototype; and just for consistency, do the same for parameter `Xi`.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/linux-next/20231121131903.68a37932@canb.auug.org.au/
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-12-01 18:03:26 +08:00
..
alpha TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
arc kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
arm Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
arm64 Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
csky Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
hexagon TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
loongarch LoongArch changes for v6.7 2023-11-12 10:58:08 -08:00
m68k Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
microblaze asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
mips Probes fixes for v6.7-rc1: 2023-11-10 16:35:04 -08:00
nios2 vgacon, arch/*: remove unused screen_info definitions 2023-10-17 10:17:02 +02:00
openrisc
parisc parisc: Prevent booting 64-bit kernels on PA1.x machines 2023-11-10 16:17:32 +01:00
powerpc crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings 2023-12-01 18:03:26 +08:00
riscv RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
s390 kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
sh kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
sparc kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
um
x86 crypto: x86/sha256 - autoload if SHA-NI detected 2023-11-17 19:16:29 +08:00
xtensa TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
.gitignore
Kconfig