From: Karel Zak <kzak@redhat.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: libblkid: broken calculation of blkid_probe size for ubiN_M
Date: Wed, 2 Aug 2017 10:37:48 +0200 [thread overview]
Message-ID: <20170802083748.ui36mn4lvpdbgrt2@ws.net.home> (raw)
In-Reply-To: <CACna6rwn+Kf+DCqRS_TQTdv5WakGCNaEqQgc3QwibuyV3KM5=A@mail.gmail.com>
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@redhat.com>
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@redhat.com>
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@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2017-08-02 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 13:25 libblkid: broken calculation of blkid_probe size for ubiN_M Rafał Miłecki
2017-08-02 8:37 ` Karel Zak [this message]
2017-08-02 8:41 ` Rafał Miłecki
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=20170802083748.ui36mn4lvpdbgrt2@ws.net.home \
--to=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
--cc=zajec5@gmail.com \
/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