Files
android_kernel_xiaomi_sm8450/include/uapi/linux
Michael Schmitz e4a9b3333e block: change all __u32 annotations to __be32 in affs_hardblocks.h
commit 95a55437dc49fb3342c82e61f5472a71c63d9ed0 upstream.

The Amiga partition parser module uses signed int for partition sector
address and count, which will overflow for disks larger than 1 TB.

Use u64 as type for sector address and size to allow using disks up to
2 TB without LBD support, and disks larger than 2 TB with LBD. The RBD
format allows to specify disk sizes up to 2^128 bytes (though native
OS limitations reduce this somewhat, to max 2^68 bytes), so check for
u64 overflow carefully to protect against overflowing sector_t.

This bug was reported originally in 2012, and the fix was created by
the RDB author, Joanne Dow <jdow@earthlink.net>. A patch had been
discussed and reviewed on linux-m68k at that time but never officially
submitted (now resubmitted as patch 1 of this series).

Patch 3 (this series) adds additional error checking and warning
messages. One of the error checks now makes use of the previously
unused rdb_CylBlocks field, which causes a 'sparse' warning
(cast to restricted __be32).

Annotate all 32 bit fields in affs_hardblocks.h as __be32, as the
on-disk format of RDB and partition blocks is always big endian.

Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=43511
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Message-ID: <201206192146.09327.Martin@lichtvoll.de>
Cc: <stable@vger.kernel.org> # 5.2
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230620201725.7020-3-schmitzmic@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:44:02 +02:00
..
2020-08-22 10:53:12 +01:00
2020-05-28 11:22:14 +02:00
2019-12-18 18:07:31 +01:00
2020-08-12 10:58:00 -07:00
2019-03-07 18:32:01 -08:00
2020-10-09 12:47:02 -06:00
2019-10-09 22:31:14 -04:00
2019-09-25 17:51:39 -07:00
2019-08-02 14:44:02 +10:00
2020-10-01 15:03:40 -04:00
2020-07-19 19:20:22 -07:00
2020-06-24 21:34:11 +02:00
2020-05-14 16:44:25 +02:00
2019-03-27 13:30:07 -07:00
2020-05-28 22:09:47 -04:00
2018-06-18 15:11:53 +10:00
2019-08-12 19:33:50 -07:00
2020-08-27 08:01:47 -07:00
2019-12-11 15:31:52 +01:00
2020-07-19 19:20:22 -07:00
2018-09-05 22:27:11 -07:00
2020-07-13 15:32:56 -07:00
2020-04-20 12:43:24 -07:00
2020-07-24 17:12:41 -07:00
2019-09-08 15:37:04 +02:00
2018-07-07 17:41:38 +02:00
2020-05-21 08:20:35 -06:00
2020-03-29 22:30:57 -07:00
2020-08-18 15:44:44 +02:00
2020-08-27 16:06:47 -04:00
2020-07-09 12:38:41 -07:00
2023-06-21 15:45:38 +02:00
2020-10-19 19:39:22 +02:00
2019-10-02 20:32:27 -06:00
2019-01-22 10:21:45 +01:00
2019-07-30 20:34:34 +02:00
2021-03-30 14:31:53 +02:00
2020-03-29 22:30:57 -07:00
2019-12-18 18:07:31 +01:00
2021-09-12 08:58:27 +02:00
2018-09-03 13:29:38 +02:00
2019-12-09 09:59:07 +01:00
2020-03-29 23:29:08 +02:00
2020-10-23 11:55:28 -04:00
2020-10-23 11:55:28 -04:00
2020-08-18 14:14:25 +02:00
2019-08-01 21:49:46 +02:00
2020-07-13 15:32:56 -07:00