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]
Date:	Tue, 26 Jul 2011 13:14:03 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Olivier Galibert <galibert@...ox.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	target-devel <target-devel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Christoph Hellwig <hch@....de>,
	Andy Grover <agrover@...hat.com>,
	Hannes Reinecke <hare@...e.de>,
	Roland Dreier <roland@...estorage.com>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Boaz Harrosh <openosd@...il.com>,
	Mike Christie <michaelc@...wisc.edu>
Subject: Re: [GIT PULL] iscsi-target merge for v3.1-rc1

On Tue, Jul 26, 2011 at 1:08 PM, Olivier Galibert <galibert@...ox.com> wrote:
> On Tue, Jul 26, 2011 at 12:09:40AM -0700, Linus Torvalds wrote:
>> And it just looks unnecessarily complicated. Just a simple
>>
>> #define DIV_ROUND_UP_ULL(ll,d) \
>>   ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; })
>>
>> looks like it would work and be simpler. Avoid the conditional, do the
>> same "add 'd-1' thing as the regular ROUND_UP().
>>
>> Untested. And not much thinking involved.
>
> Overflow risk?  Of course DIV_ROUND_UP has the same issue, and looks
> slight easier to trigger, maybe.

Can we please make DIV_ROUND_UP to demultiplex based on argument type inside?
--
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