[PATCH 00/26] block: add support for non-512 byte sectors

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 29 03:16:24 PDT 2026


On Fri, 26 Jun 2026 10:42:11 +0200, Ahmad Fatoum wrote:
> barebox code is currently a mixture of code that reads as if it supports
> runtime-determined block sizes and code that hardcodes assumption of
> 512 byte sectors. End result is that use of a 4K sector will likely
> crash as e.g. partition table parser is hardcoded to 512 bytes.
> 
> This series fixes most of that. Apparently there are MMCs (but not SDs)
> that have 4K sectors, which this series doesn't add support for.
> 
> [...]

Applied, thanks!

[01/26] nvme: use barebox-appropriate 64-bit type for timeouts
        https://git.pengutronix.de/cgit/barebox/commit/?id=3cc35aaab686 (link may not be stable)
[02/26] nvme: fix buffer advancement when chunking due to max_hw_sectors
        https://git.pengutronix.de/cgit/barebox/commit/?id=2b7c15453992 (link may not be stable)
[03/26] nvme: allow flush opcode
        https://git.pengutronix.de/cgit/barebox/commit/?id=f3d5132b87d0 (link may not be stable)
[04/26] nvme: honor namespace block size for I/O
        https://git.pengutronix.de/cgit/barebox/commit/?id=45e5306b2143 (link may not be stable)
[05/26] bootscan: fix detection of GPT
        https://git.pengutronix.de/cgit/barebox/commit/?id=6bb7f1a4812b (link may not be stable)
[06/26] block: clarify that writebuffer_io_len returns sector counts
        https://git.pengutronix.de/cgit/barebox/commit/?id=eb0d0077a9a4 (link may not be stable)
[07/26] block: fix wrong type for discard_start/size byte ranges
        https://git.pengutronix.de/cgit/barebox/commit/?id=866196950824 (link may not be stable)
[08/26] block: fix discard zeroing too little memory
        https://git.pengutronix.de/cgit/barebox/commit/?id=1593c9b77b1e (link may not be stable)
[09/26] block: use logical block size for reparse checks
        https://git.pengutronix.de/cgit/barebox/commit/?id=c6666b35cb46 (link may not be stable)
[10/26] block: require lower bound of sector size to be 512 bytes
        https://git.pengutronix.de/cgit/barebox/commit/?id=f8dc77b61101 (link may not be stable)
[11/26] filetype: don't hardcode sector size in file_detect_partition_table
        https://git.pengutronix.de/cgit/barebox/commit/?id=e32cc43fedb6 (link may not be stable)
[12/26] block: define helpers for non-512-byte sector support
        https://git.pengutronix.de/cgit/barebox/commit/?id=bff79e404316 (link may not be stable)
[13/26] bootscan: use block size for partition table probe
        https://git.pengutronix.de/cgit/barebox/commit/?id=12ccdd7fe817 (link may not be stable)
[14/26] ramdisk: validate exported sector size
        https://git.pengutronix.de/cgit/barebox/commit/?id=36c71197aed1 (link may not be stable)
[15/26] efi: block: fix sector size mismatch in block device registration and ops
        https://git.pengutronix.de/cgit/barebox/commit/?id=fa6a59c88556 (link may not be stable)
[16/26] efi: loader: disk: report block device size in Block I/O
        https://git.pengutronix.de/cgit/barebox/commit/?id=d6bc98cd11b9 (link may not be stable)
[17/26] efi: loader: file: report cdev block size in file info
        https://git.pengutronix.de/cgit/barebox/commit/?id=c702d0da787b (link may not be stable)
[18/26] partitions: use byte offset for first partition policy
        https://git.pengutronix.de/cgit/barebox/commit/?id=4a36f92e6e87 (link may not be stable)
[19/26] partitions: dos: allocate correctly sized buffer for dos_partition_desc
        https://git.pengutronix.de/cgit/barebox/commit/?id=657e7fe18cf8 (link may not be stable)
[20/26] partition: support non-512 byte sectors
        https://git.pengutronix.de/cgit/barebox/commit/?id=a4aba2c2702e (link may not be stable)
[21/26] fs: fat: fix garbage read when writing with bigger block size
        https://git.pengutronix.de/cgit/barebox/commit/?id=92bae6e29271 (link may not be stable)
[22/26] fs: fat: support larger block device sectors
        https://git.pengutronix.de/cgit/barebox/commit/?id=0d0aef455ef0 (link may not be stable)
[23/26] usb-storage: preserve READ CAPACITY sector size
        https://git.pengutronix.de/cgit/barebox/commit/?id=0c3d932d29dc (link may not be stable)
[24/26] fuzz: add 4K-sector partition ramdisk target
        https://git.pengutronix.de/cgit/barebox/commit/?id=1ac6223f24a7 (link may not be stable)
[25/26] commands: parted: prepare use of non-512-byte sectors
        https://git.pengutronix.de/cgit/barebox/commit/?id=7af2b28faa29 (link may not be stable)
[26/26] commands: parted: exit if block size if not 512
        https://git.pengutronix.de/cgit/barebox/commit/?id=2f9c7fed6154 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list