lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.21.1705261612360.2379@joy.test>
Date:   Fri, 26 May 2017 16:30:20 -0700 (PDT)
From:   Richard Narron <comet.berkeley@...il.com>
To:     Joe Perches <joe@...ches.com>
cc:     linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>,
        Jens Axboe <axboe@...nel.dk>, Andries Brouwer <aeb@....nl>
Subject: Re: [PATCH v3 1/1] partitions/msdos: FreeBSD UFS2 file systems are
 not recognized

On Fri, 26 May 2017, Joe Perches wrote:

> On Fri, 2017-05-26 at 03:48 -0700, Richard Narron wrote:
>> The code in block/partitions/msdos.c recognizes FreeBSD, OpenBSD
>> and NetBSD partitions and does a reasonable job picking out OpenBSD
>> and NetBSD UFS subpartitions.
>>
>> But for FreeBSD the subpartitions are always "bad".
>>
>>      Kernel: <bsd:bad subpartition - ignored
> []
>>   block/partitions/msdos.c | 2 ++
> []
>> @@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_part
>>   			continue;
>>   		bsd_start = le32_to_cpu(p->p_offset);
>>   		bsd_size = le32_to_cpu(p->p_size);
>> +		if (memcmp(flavour, "bsd\0", 4) == 0)
>
> Weird code.  Why not:
>
> 		if (strcmp(flavor, "bsd") == 0)
>

I instinctively trust the memcmp function as it seems more like 
assembly language to me and more straight forward and more reliable than 
strcmp.

I'm new to this forum and did not know who you were so I looked up your 
name in old threads and oddly enough found this thread about a strcmp bug:

http://marc.info/?l=linux-kernel&m=125848558316468&w=2

http://marc.info/?l=linux-kernel&m=125847802903422&w=2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ