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: <20120721163453.GB31693@parisc-linux.org>
Date:	Sat, 21 Jul 2012 10:34:53 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	zwu.kernel@...il.com
Cc:	viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Subject: Re: [PATCH] vfs: simply the code logic

On Sat, Jul 21, 2012 at 11:38:19PM +0800, zwu.kernel@...il.com wrote:
>  	if (offset >= 0 && offset <= size) {
> -		if (offset != file->f_pos) {
> -			file->f_pos = offset;
> -		}
> -		retval = offset;
> +		retval = file->f_pos = offset;
>  	}

But now you're writing to f_pos unconditionally.  That may cause
cacheline bouncing.  NAK.

Plus, you're now using a less-well-known feature of C, so while it's fewer
lines of code, it's not necessarily a simplification.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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