Re: libblkid: broken calculation of blkid_probe size for ubiN_M

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

 



On Tue, Aug 01, 2017 at 03:25:40PM +0200, Rafał Miłecki wrote:
> Hi,
> 
> Today I discovered libblkid can't recognize my UBI volume with ubifs
> filesystem. The code in libblkid/src/superblocks/ubifs.c seems
> alright, but it's never used because of:
> # LIBBLKID_DEBUG=lowprobe,buffer blkid /dev/ubi0_0
> (...)
> 4166: libblkid: LOWPROBE: [59] ubifs:
> 4166: libblkid:   BUFFER:         ignore: request out of probing area
> 
> Above error comes from blkid_probe_get_buffer and its
> pr->off + pr->size < real_off + len
> condition. In my case its evaulated as:
> 0 + 1 < 0 + 4
> (pr->size is 1 which looks wrong obviously).

Version? Is it the current git master branch?

I fixed something like this two weeks ago:

        commit 4360f56cf6e40b10ab6ace4cf74073de2381c192
        Author: Karel Zak <kzak@xxxxxxxxxx>
        Date:   Tue Jul 11 12:17:40 2017 +0200

            libblkid: don't check for size on UBI (char dev)

            Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>

 and now the condition is not used for char devices:

    if (len == 0 || (!S_ISCHR(pr->mode) && pr->off + pr->size < real_off + len))

 Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux