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]
Date:	Fri, 6 Jun 2014 16:16:55 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	Sasha Levin <sasha.levin@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Konstantin Khlebnikov <koct9i@...il.com>,
	Dave Jones <davej@...hat.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: 3.15-rc8 mm/filemap.c:202 BUG

On Fri, Jun 6, 2014 at 4:05 PM, Hugh Dickins <hughd@...gle.com> wrote:
>
> [PATCH] mm: entry = ACCESS_ONCE(*pte) in handle_pte_fault
>
> Use ACCESS_ONCE() in handle_pte_fault() when getting the entry or orig_pte
> upon which all subsequent decisions and pte_same() tests will be made.
>
> I have no evidence that its lack is responsible for the mm/filemap.c:202
> BUG_ON(page_mapped(page)) in __delete_from_page_cache() found by trinity,
> and I am not optimistic that it will fix it.  But I have found no other
> explanation, and ACCESS_ONCE() here will surely not hurt.

The patch looks obviously correct to me, although like you, I have no
real reason to believe it really fixes anything. But we definitely
should just load it once, since it's very much an optimistic load done
before we take the real lock and re-compare.

I'm somewhat dubious whether it actually would change code generation
- it doesn't change anything with the test-configuration I tried with
- but it's unquestionably a good patch. And hey, maybe some
configurations have sufficiently different code generation that gcc
actually _can_ sometimes do reloads, perhaps explaining why some
people see problems. So it's certainly worth testing even if it
doesn't make any change to code generation with *my* compiler and
config..

          Linus
--
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