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-next>] [day] [month] [year] [list]
Message-Id: <200709211313.01040.vgusev@sw.ru>
Date:	Fri, 21 Sep 2007 13:13:00 +0400
From:	Vitaliy Gusev <vgusev@...ru>
To:	Trond Myklebust <trond.myklebust@....uio.no>
Cc:	linux-kernel@...r.kernel.org, devel@...nvz.org
Subject: Problem: LTP linkat01 test fails on nfs directory (NFS v3)

Hello.

Tested kernels: 2.6.18, 2.6.22, 2.6.23-rc2

Steps to reproduce: Suppose that we have mounted some directory from nfs v3 
server with default options. Also we  have the two directories in this 
mountpoint and each directory has hard linked file. Try to open those files 
and write to one and read from another. Data will not be equal. (Testcase: 
attached hardlink_test.c)

Analysis: Although these hard linked files have same nfs_fattr::fileid but 
have different nfs_fh fhandle. In this case nfs_find_actor() function 
(fs/nfs/inode.c) returns false during opening each file:

nfs_find_actor()
{
...
	if (nfs_compare_fh(NFS_FH(inode), fh))
		return 0;
...
}

Therefore for each of hard links new struct inode is allocated. It leads to 
cache aliasing.

Please explain why nfs_find_actor() function compares file handles?

-- 
Thanks,
Vitaliy Gusev


View attachment "hardlink_test.c" of type "text/x-csrc" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ