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: <20160502214859.GC2397@amd>
Date:	Mon, 2 May 2016 23:48:59 +0200
From:	Pavel Machek <pavel@....cz>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Jens Axboe <axboe@...nel.dk>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: another patch in #for-linus (was Re: [RFC] a corner case of
 open(2))

Hi!


> +unsigned long iov_iter_gap_alignment(const struct iov_iter *i)
> +{
> +        unsigned long res = 0;
> +	size_t size = i->count;

Something is wrong with indentation here.

> +	iterate_all_kinds(i, size, v,
> +		(res |= (!res ? 0 : (unsigned long)v.iov_base) |
> +			(size != v.iov_len ? size : 0), 0),
> +		(res |= (!res ? 0 : (unsigned long)v.bv_offset) |
> +			(size != v.bv_len ? size : 0)),
> +		(res |= (!res ? 0 : (unsigned long)v.iov_base) |
> +			(size != v.iov_len ? size : 0))
> +		);

Umm. Come on. What's that? Obfuscated C code contest? Could the logic
at least be modified to (res ? ... : 0)?

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ