From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-block@vger.kernel.org, axboe@kernel.dk
Cc: linux-m68k@vger.kernel.org, geert@linux-m68k.org, hch@lst.de,
martin@lichtvoll.de, fthain@linux-m68k.org,
Michael Schmitz <schmitzmic@gmail.com>
Subject: [PATCH v10 0/3] Amiga RDB partition support fixes
Date: Thu, 15 Jun 2023 15:08:34 +1200 [thread overview]
Message-ID: <20230615030837.8518-1-schmitzmic@gmail.com> (raw)
Hi Jens,
Following up on Martin's enquiry, I am resubmitting the Amiga
partition support fixes again as v10, with changes addressing
your comments on v8, and a fix for warnings I saw from sparse
checking on v8 and v9.
The simple fix (patch 1) still leaves ample room for overflows in
calculating start address and size of a RDB partition, though
such overflows should only be seen in rather unusual cases.
To address these potential overflows, checks are added in the
third patch of this series. Comments by Geert have been
addressed in full.
In order to avoid warnings about a cast to a restricted
type (__be32, inside be32_to_cpu()) introduced by the third
patch, the second patch changes the annotation of the
rdb_CylBlocks field to __be3, which is what all of the 32 bit
fields in the RDB struct really ought to be.
Reviewed-by tags by Geert and Christoph added. Fixes and
prerequisites for stable backport also added.
Patch 2 still needs formal review. In my humble opinion, patch 1
can be applied while we wait for that, as it does mostly fix
this long standing bug (at least when LBD is enabled).
Cheers,
Michael
Michael Schmitz (3):
block: fix signed int overflow in Amiga partition support
block: change annotation of rdb_CylBlocks in affs_hardblocks.h
block: add overflow checks for Amiga partition support
block/partitions/amiga.c | 102 ++++++++++++++++++++++-----
include/uapi/linux/affs_hardblocks.h | 7 +-
2 files changed, 91 insertions(+), 18 deletions(-)
--
2.17.1
next reply other threads:[~2023-06-15 3:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 3:08 Michael Schmitz [this message]
2023-06-15 3:08 ` [PATCH v10 1/3] block: fix signed int overflow in Amiga partition support Michael Schmitz
2023-06-15 3:08 ` [PATCH v10 2/3] block: change annotation of rdb_CylBlocks in affs_hardblocks.h Michael Schmitz
2023-06-15 4:17 ` Christoph Hellwig
2023-06-15 4:50 ` Michael Schmitz
2023-06-15 5:53 ` Christoph Hellwig
2023-06-15 7:09 ` Michael Schmitz
2023-06-15 7:21 ` Geert Uytterhoeven
2023-06-15 19:53 ` Michael Schmitz
2023-06-16 5:48 ` Christoph Hellwig
2023-06-16 7:20 ` Michael Schmitz
2023-06-16 7:25 ` Christoph Hellwig
2023-06-16 7:51 ` Michael Schmitz
2023-06-16 7:28 ` Geert Uytterhoeven
2023-06-16 7:45 ` Michael Schmitz
2023-06-15 3:08 ` [PATCH v10 3/3] block: add overflow checks for Amiga partition support Michael Schmitz
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=20230615030837.8518-1-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=axboe@kernel.dk \
--cc=fthain@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=martin@lichtvoll.de \
/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