mbox series

[0/3] floppy: suppress UBSAN warning in setup_rw_floppy()

Message ID 20200421125722.58959-1-efremov@linux.com (mailing list archive)
Headers show
Series floppy: suppress UBSAN warning in setup_rw_floppy() | expand

Message

Denis Efremov April 21, 2020, 12:57 p.m. UTC
These patches are based on Willy's cleanup patches
https://lkml.org/lkml/2020/3/31/609.

The first two patches indroduce defines to make it more clear why
cmd_count in struct floppy_raw_cmd allows cross-boundary access for
cmd, reply_count, reply fields. The last one handles the warning.

Denis Efremov (3):
  floppy: add FD_AUTODETECT_SIZE define for struct floppy_drive_params
  floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd
  floppy: suppress UBSAN warning in setup_rw_floppy()

 drivers/block/floppy.c  | 29 +++++++++++++++++------------
 include/uapi/linux/fd.h | 13 ++++++++++---
 2 files changed, 27 insertions(+), 15 deletions(-)