Util-Linux package development
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: "util-linux" <util-linux@vger.kernel.org>
Subject: libblkid: blkid_bufinfo() fails on 32bit
Date: Thu, 3 Dec 2015 02:57:06 +0100	[thread overview]
Message-ID: <201512030257.06753.sweet_f_a@gmx.de> (raw)

Hi,

Looks like this commit breaks 32bit/i386 systems:

----
commit a674a0ab03660b1df777e69436b2dc832b6f8681
Author: Karel Zak <kzak@redhat.com>
Date:   Tue Sep 22 15:37:26 2015 +0200

    libblkid: use mmap() rather than read()
----

 libblkid/src/probe.c:638: mmap_buffer: Assertion `map_off + map_len >= real_off + len' failed.


I can avoid that assert if I change the type of map_len in blkid_bufinfo().

-   size_t map_len;
+   blkid_loff_t map_len;

but it still looks broken, see this debug output


libblkid: LOWPROBE: --> starting probing loop [SUBLKS idx=-1]
libblkid: LOWPROBE: [0] linux_raid_member:
libblkid: LOWPROBE:     call probefunc()
libblkid:   BUFFER:     mapping end of the device
libblkid:   BUFFER:     mmap  0xf7321000: off=4112515072, len=25771900928 (6291968 pages)
                                                      ^^^^^^^
   shouldn't we only mmap about 2M?

libblkid:   BUFFER:     reuse 0xf7321000: off=4112515072 len=25771900928 (for off=29884407808 len=256)
libblkid:   BUFFER:     mapping begin of the device
libblkid:   BUFFER:     mmap  0xf7121000: off=0, len=2097152 (512 pages)
libblkid:   BUFFER:     reuse 0xf7121000: off=0 len=2097152 (for off=4096 len=256)

cu,
Rudi

             reply	other threads:[~2015-12-03  1:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  1:57 Ruediger Meier [this message]
2015-12-03 11:27 ` libblkid: blkid_bufinfo() fails on 32bit Karel Zak

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=201512030257.06753.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /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