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] [day] [month] [year] [list]
Message-ID: <20060916213356.GA1420@1wt.eu>
Date:	Sat, 16 Sep 2006 23:33:56 +0200
From:	Willy Tarreau <w@....eu>
To:	"Jurzitza, Dieter" <DJurzitza@...manbecker.com>
Cc:	linux-kernel@...r.kernel.org, Jeff Mahoney <jeffm@...e.com>,
	sparclinux@...r.kernel.org, davem@...emloft.net, aeb@....nl
Subject: Re: fix 2.4.33.3 / sun partition size


[Andries CCed since he's the partition maintainer]

Hi Dieter,

On Wed, Sep 13, 2006 at 07:40:26AM +0200, Jurzitza, Dieter wrote:
> Dear Willy,
> one final thougth here: ist there any real reason to *not* make
> add_gd_partition (struct gendisk, int minor, unsigned long start, unsigned long size){...}
> (see fs/partitions/check.c)
> as:
> 
> - within add_gd_partition the two values start and size are assigned to a field of type unsigned long,
> - we both agree that there is no reason to use signed ints in this case,
> - any byte size conversion issue would be covered by the fact that it does not hurt assigning too small numbers to oversized ones.
> 
> Just my two cents here ...

I agree with your analysis here. I've checked the code right now, and using signed
ints in add_gd_partition() makes no sense to me as the hd_struct uses unsigned longs.
So a cast is performed within add_gd_partition() anyway.

We should make add_gd_partition() accept unsigned longs so that only its users will
have to cast to unsigned long if needed, and this way it will be easier to track
invalid signedness use.

I've quickly checked if 2.6 needs a fix, but 2.6 declares add_partition() with
sector_t values which are unsigned longs. So 2.6 is safe right now. I will add
the fix and check at least on x86 and sparc64 that I do not see any regression
nor warnings (I don't have 1TB to check larger partitions!).

Thanks,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ