Re: [eMMC] - Partition on eMMC boot block device is not visible anymore in kernel v6.1.53 and above

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/2/25 08:07, Torrelli, Maxime wrote:
> Hello dear MMC community,
> 
> I hope my request does not break any rule regarding this mailing list and its use. If it does, please let me know how to proceed.

It doesn't.

> 
> We recently tried to migrate from kernel v5.10 to v6.6. During this migration we discovered that a partition stored in an eMMC boot disk was not visible anymore from the system (i.e. /dev/mmcblk2boot0p1 does not exist).
> 
> Please find below the detailed list of block disks of the eMMC:
>     * brw-rw---- 1 root disk 179,  0 Oct 10 17:41 /dev/mmcblk2
>     * brw-rw---- 1 root disk 179,  8 Oct 10 17:40 /dev/mmcblk2boot0
>     * brw-rw---- 1 root disk 179, 16 Oct 10 17:40 /dev/mmcblk2boot1
>     * brw-rw---- 1 root disk 179, 24 Oct 10 17:40 /dev/mmcblk2gp0
>     * brw-rw---- 1 root disk 179, 25 Oct 10 17:41 /dev/mmcblk2gp0p1
>     * brw-rw---- 1 root disk 179, 32 Oct 10 17:40 /dev/mmcblk2gp1
>     * brw-rw---- 1 root disk 179, 33 Oct 10 17:41 /dev/mmcblk2gp1p1
>     * brw-rw---- 1 root disk 179,  1 Oct 10 17:41 /dev/mmcblk2p1
>     * brw-rw---- 1 root disk 179,  2 Oct 10 17:41 /dev/mmcblk2p2
>     * crw------- 1 root root 243,  0 Oct 10 17:41 /dev/mmcblk2rpmb
> 
> After analysis, we discovered the reason. When the version v6.1.53 was released, a change in file block/ioctl.c added the following lines to the function "blkpg_do_ioctl":
>       > + if (disk->flags & GENHD_FL_NO_PART)
>       > +      return -EINVAL;
> This check was then moved to block/partitions/core.c when v6.1.76 was released. This change added the following lines in the function "bdev_add_partition" are :
>       > + if (disk->flags & GENHD_FL_NO_PART) {
>       > +      ret = -EINVAL;
>       > +      goto out;
>       > + }

Seems to only be consistent now with the definition of GENHD_FL_NO_PART. Your real issue is
commit f5b4d71f72c5 ("mmc: card: Prevent partition scan for the eMMC boot areas")

> 
> With kernel v5.10 the partition /dev/mmcblk2boot0p1 was not visible at boot but a simple call to "partx -a /dev/mmcblk2boot0" allowed us to access this partition. With kernel v6.1.53 and above, "partx -a /dev/mmcblk2boot0" fails and we cannot access the partition.
> 
> What is the reason for this change ?
> 
> Is there any rule forbidding to create a partition in an eMMC boot block disk ?

It was just deemed unlikely to be useful since most systems use eMMC boot partition
feature very early in the boot process to read blobs essentially.

What does yours do?

If you know the offset the partition is at you can pass that to mount.




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux