LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Please upgrade util-linux ("partx" e.g. is badly broken) (http://www.linuxquestions.org/questions/slackware-14/please-upgrade-util-linux-partx-e-g-is-badly-broken-4175472393/)

Sl4ck3ver 08-06-2013 07:22 PM

Please upgrade util-linux ("partx" e.g. is badly broken)
 
Hi all!

Some times ago I learned the hard way that the partx utility included in util-linux is really broken.

Offset and length of every partition entry added to the kernel tables is silently truncated to 4GB (in 32 bit archs) because of a wrong data type ("unsigned long") used in the declaration of "partx_add_partition".

This together with lots of other things was fixed some times ago during a major internal redesign of the tools.

It surely needs a little bit of attention and testing but I think it is really necessary to upgrade this essential package before 14.1.

For everyone who is also affected by this bug but don't want to upgrade the whole package, here is a diff:

Code:

--- ./partx/partx.h
+++ ./partx/partx.h
@@ -23,7 +23,7 @@
 }
 
 static inline int partx_add_partition(int fd, int partno,
-                        unsigned long start, unsigned long size)
+                        long long start, long long size)
 {
        struct blkpg_ioctl_arg a;
        struct blkpg_partition p;


Now I really wish one of the slackware gurus reads this...

Greetings!

volkerdi 08-06-2013 08:10 PM

Quote:

Originally Posted by Sl4ck3ver (Post 5004396)
This together with lots of other things was fixed some times ago during a major internal redesign of the tools.

Unfortunately, that major internal redesign brings many major new bugs. Especially in "mount".

Quote:

It surely needs a little bit of attention and testing but I think it is really necessary to upgrade this essential package before 14.1.
The plan right now is not to do an upgrade before 14.1, but I'll take a look at that bug (or any other specific bugs you'd like to point out).


All times are GMT -5. The time now is 01:35 PM.