linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: linux-block@vger.kernel.org
Cc: Denis Efremov <efremov@linux.com>, Willy Tarreau <w@1wt.eu>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] floppy: suppress UBSAN warning in setup_rw_floppy()
Date: Sun, 26 Apr 2020 16:07:25 +0300	[thread overview]
Message-ID: <20200426130728.63399-1-efremov@linux.com> (raw)

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 out-of-bounds access for
cmd, reply_count, reply fields. The last one handles the warning.

Changes in v2:
 - add FD_RAW_CMD_FULLSIZE to the second patch
 - add union with fullcmd to struct floppy_raw_cmd in the last patch

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  | 34 +++++++++++++---------------------
 include/uapi/linux/fd.h | 26 ++++++++++++++++++++++----
 2 files changed, 35 insertions(+), 25 deletions(-)

-- 
2.25.3


             reply	other threads:[~2020-04-26 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 13:07 Denis Efremov [this message]
2020-04-26 13:07 ` [PATCH v2 1/3] floppy: add FD_AUTODETECT_SIZE define for struct floppy_drive_params Denis Efremov
2020-04-26 20:24   ` Joe Perches
2020-04-27  5:48   ` Christoph Hellwig
2020-04-26 13:07 ` [PATCH v2 2/3] floppy: add defines for sizes of cmd & reply buffers of floppy_raw_cmd Denis Efremov
2020-04-26 20:28   ` Joe Perches
2020-04-26 20:44     ` Denis Efremov
2020-04-27  5:50   ` Christoph Hellwig
2020-04-26 13:07 ` [PATCH v2 3/3] floppy: suppress UBSAN warning in setup_rw_floppy() Denis Efremov
2020-04-26 23:19   ` Joe Perches
2020-04-27  5:50   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200426130728.63399-1-efremov@linux.com \
    --to=efremov@linux.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).