mirror-linux/include/uapi/linux/usb
Kees Cook 09b69dd437 usb: ch9: Replace 1-element array with flexible array
Since commit df8fc4e934 ("kbuild: Enable -fstrict-flex-arrays=3"),
UBSAN_BOUNDS no longer pretends 1-element arrays are unbounded. Walking
wData will trigger a warning, so make it a proper flexible array. Add a
union to keep the struct size identical for userspace in case anything
was depending on the old size.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202306102333.8f5a7443-oliver.sang@intel.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel test robot <lkp@intel.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: "Jó Ágila Bitsch" <jgilab@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Message-ID: <20230614181307.gonna.256-kees@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 11:43:29 +02:00
..
audio.h
cdc-wdm.h
cdc.h USB / Thunderbolt changes for 6.0-rc1 2022-08-04 11:41:28 -07:00
ch9.h usb: ch9: Replace 1-element array with flexible array 2023-06-15 11:43:29 +02:00
ch11.h
charger.h
functionfs.h
g_printer.h
g_uvc.h usb: gadget: uvc: default the ctrl request interface offsets 2022-10-22 13:22:40 +02:00
gadgetfs.h
midi.h
raw_gadget.h
tmc.h
video.h usb: uvc: Enumerate valid values for color matching 2023-02-06 13:46:42 +01:00