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]
Date:	Sat, 18 Aug 2007 20:18:29 +0530 (IST)
From:	Satyam Sharma <satyam@...radead.org>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
cc:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>,
	NeilBrown <neilb@...e.de>, Jens Axboe <jens.axboe@...cle.com>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Tejun Heo <htejun@...il.com>,
	Cell Broadband Engine OSS Development 
	<cbe-oss-dev@...abs.org>
Subject: Re: [PATCH 002 of 6] Introduce rq_for_each_segment replacing
 rq_for_each_bio



On Sat, 18 Aug 2007, Jan Engelhardt wrote:

> On Aug 18 2007 20:07, Satyam Sharma wrote:
> >On Fri, 17 Aug 2007, Geert Uytterhoeven wrote:
> >
> >> On Thu, 16 Aug 2007, NeilBrown wrote:
> >> [...]
> >> >  		dev_dbg(&dev->sbd.core,
> >> >  			"%s:%u: bio %u: %u segs %u sectors from %lu\n",
> >> > -			__func__, __LINE__, i, bio_segments(bio),
> >> > -			bio_sectors(bio), sector);
> >> > -		bio_for_each_segment(bvec, bio, j) {
> >> > +			__func__, __LINE__, i, bio_segments(iter.bio),
> >> > +			bio_sectors(iter.bio),
> >> > +			(unsigned long)iter.bio->bi_sector);
> >>                         ^^^^^^^^^^^^^^^
> >> Superfluous cast: PS3 is 64-bit only, and casts are evil.
> 
> bi_sector is sector_t. The cast is ok, because printf will warn, and rightfully
> so since sector_t may just change its shape underneath. It would not be so much
> of a problem if printf() was not a varargs function, but it is, and hence,
> passing an object bigger than the format specifier can make problems.

Oh yeah, that's why the _cast_ _is_ needed in the first place, by the way.
I was mentioning why the cast itself should be (unsigned long long) otoh.
-
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