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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 12 Aug 2008 16:07:55 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Hisashi Hifumi <hifumi.hisashi@....ntt.co.jp>
Cc:	Christoph Hellwig <hch@...radead.org>, akpm@...ux-foundation.org,
	jack@....cz, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re: [patch 12/17] vfs: pagecache usage optimization for pagesize!=blocksize

On Tuesday 12 August 2008 13:57, Hisashi Hifumi wrote:
> Hi Nick.
>
> >This patch unfortunately appears like it may introduce an
> >uninitialized memory leak due to a data race between one
> >thread initializing a buffer then marking it uptodate, and
> >the other testing buffer uptodate then reading from the
> >buffer (buffer, read as: page memory covered by buffer head).
> >
> >For reference, this is basically the same class of data race
> >that I fixed 0ed361dec36945f3116ee1338638ada9a8920905
>
> I think the same issue that your patch 0ed361dec36945f3116ee
> 1338638ada9a8920905 "fix PageUptodate data race" pointed out
> is there around buffer_head without my patch "vfs: pagecache usage
> optimization for pagesize!=blocksize".
> Because set_buffer_uptodate or buffer_uptodate are used without
> distinct locking facility (lock_buffer, or lock_page) in many places,
> so it would be needed to deal with memory ordering issue.

Right.


> Do you add wmb/rmb to BUFFER_FNS macros?

That would fix it, yes. But now the patch is no longer a single
predictable branch but will make the code measurably larger and
slower. On some architectures these can cost hundreds or thousands
of cycles.

So IMO it requires either more thought for a better fix, or we
now need more justification that we want to do this rather than
a artificial microbenchmark numbers.
--
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