linux-stable/arch/sparc/include/uapi/asm
Gustavo A. R. Silva 221a4b56ec sparc: openpromio: Address -Warray-bounds warning
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in struct openpromio.

Address the following warning found after building (with GCC-13) sparc
with sparc64_defconfig:
In function 'opromgetprop',
    inlined from 'openprom_sunos_ioctl.isra' at drivers/sbus/char/openprom.c:312:11:
drivers/sbus/char/openprom.c:141:24: warning: array subscript 1 is above array bounds of 'char[1]' [-Warray-bounds=]
  141 |         op->oprom_array[len] = '\0';
      |         ~~~~~~~~~~~~~~~^~~~~
In file included from drivers/sbus/char/openprom.c:31:
arch/sparc/include/uapi/asm/openpromio.h: In function 'openprom_sunos_ioctl.isra':
arch/sparc/include/uapi/asm/openpromio.h:16:17: note: while referencing 'oprom_array'
   16 |         char    oprom_array[1];         /* Holds property names and values. */
      |                 ^~~~~~~~~~~

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -Warray-bounds.

This results in no differences in binary output.

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/322
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2023-07-12 13:24:20 -06:00
..
apc.h
asi.h
auxvec.h
bitsperlong.h
byteorder.h
display7seg.h
envctrl.h
errno.h
fbio.h
fcntl.h
ioctl.h
ioctls.h
ipcbuf.h
Kbuild
mman.h
msgbuf.h
openpromio.h sparc: openpromio: Address -Warray-bounds warning 2023-07-12 13:24:20 -06:00
oradax.h
param.h
perfctr.h
poll.h
posix_types.h
psr.h
psrcompat.h
pstate.h
ptrace.h
resource.h
sembuf.h
setup.h
shmbuf.h shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage 2022-02-17 09:09:37 +01:00
sigcontext.h
siginfo.h
signal.h sparc64: fix building assembly files 2022-02-18 17:01:38 +01:00
socket.h net: core: add getsockopt SO_PEERPIDFD 2023-06-12 10:45:50 +01:00
stat.h sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h 2022-06-02 17:38:15 +02:00
swab.h
termbits.h termbits.h: Remove posix_types.h include 2022-05-19 18:25:26 +02:00
termios.h
traps.h
uctx.h
unistd.h
utrap.h
watchdog.h