Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 30 May 2013 07:17:53 +0900
From: plan9assembler <plan9assembler@...il.com>
To: musl@...ts.openwall.com
Subject: Re: util-linux-2.23 mount segmentation fault error

correction:

#if 1
#define _IO(a,b) _IOC(0U,(a),(b),0)                 //?
#define _IOW(a,b,c) _IOC(1U,(a),(b),sizeof(c)) //?
#else
#define _IO(a,b) _IOC(0,(a),(b),0)                   //ok
#define _IOW(a,b,c) _IOC(1,(a),(b),sizeof(c))   //ok
#endif

#define _IOR(a,b,c) _IOC(2U,(a),(b),sizeof(c))  //ok
- #define _IOW(a,b,c) _IOC(3U,(a),(b),sizeof(c)) //ok
+ #define _IOWR(a,b,c) _IOC(3U,(a),(b),sizeof(c)) //ok


On Thu, May 30, 2013 at 7:07 AM, plan9assembler <plan9assembler@...il.com>wrote:

> could you send me the patch? i will test it.
>
> BTW, in latest musl-git version, i found something wrong with ioctl.h
>
> #if 1
> #define _IO(a,b) _IOC(0U,(a),(b),0)                 //?
> #define _IOW(a,b,c) _IOC(1U,(a),(b),sizeof(c)) //?
> #else
> #define _IO(a,b) _IOC(0,(a),(b),0)                   //ok
> #define _IOW(a,b,c) _IOC(1,(a),(b),sizeof(c))   //ok
> #endif
>
> #define _IOR(a,b,c) _IOC(2U,(a),(b),sizeof(c))  //ok
> #define _IOW(a,b,c) _IOC(3U,(a),(b),sizeof(c)) //ok
>
> if i set 0, it works fine run as "./mount", but set 1 then,
>
>
> # ./mount /dev/sda1 /mnt
> EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
>
> < 30 - 40  seconds waiting without return to shell>
>
> mount: /mnt: filesystem mounted, but mount(8) failedOperation timed out
> // <-- this is weird.
> #
>
>
>
>
>
> On Thu, May 30, 2013 at 5:04 AM, Szabolcs Nagy <nsz@...t70.net> wrote:
>
>> * plan9assembler <plan9assembler@...il.com> [2013-05-29 23:41:13 +0900]:
>> > util-linux umount gets segfaults randomly..(X)
>> > util-linux umount gets segfaults always..(O)
>> >
>> > # ./umount /mnt
>> > traps: umount[9444] general protection ip:7f9c48e618fb sp:7fff72447b88
>> > error:0 in libc.so[7f9c48e16000+72000]
>> > Segmentation fault.
>>
>> it seems util-linux uses sscanf with %ms to parse mtab
>> in libmount in tab_parse.c
>>
>> after i fixed that mount and umount does not segfault here
>> (used fixed size malloc and %s instead)
>>
>
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.