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]
Message-ID: <20141012045142.GC24463@zzz>
Date:	Sat, 11 Oct 2014 23:51:42 -0500
From:	Eric Biggers <ebiggers3@...il.com>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: fs/namei.c: Misuse of sequence counts?

On Sun, Oct 12, 2014 at 05:37:37AM +0100, Al Viro wrote:
> 
> Gets clumsy in set_root_rcu() - you do *not* want it to bugger nd->inode
> when done by follow_dotdot_rcu(), so we'd need either some indication which
> caller it is, or something like struct inode **inode in argument list,
> with NULL passed from follow_dotdot_rcu(), while path_init() would give
> it &nd->inode...
> 
> Doable, but unpleasant.  And the price of that check is trivial - after all,
> in case we *don't* bugger off immediately, we have that ->d_seq in cache -
> we'd fetched it just before.

Or set_root_rcu() can be hand-inlined, like the AT_FDCWD case.  Then the only
caller of set_root_rcu() would be follow_dotdot_rcu(), and the unnecessary
__read_seqcount_begin() could be removed.  (Probably gcc can't optimize it out
currently, because of the ACCESS_ONCE().)
--
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