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:	Tue, 25 Nov 2014 09:28:33 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Paul McKenney <paulmck@...ux.vnet.ibm.com>
Cc:	Christian Borntraeger <borntraeger@...ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	David Howells <dhowells@...hat.com>,
	Russell King <linux@....linux.org.uk>
Subject: Re: [PATCHv2 02/10] kernel: Provide READ_ONCE and ASSIGN_ONCE

On Tue, Nov 25, 2014 at 7:59 AM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
>
> We really need something like this to catch invalid sizes:
>
>         default: invoke_nonexistent_function();

Actually, I wonder if we should make the default: case actually just
do something like

   barrier();
   memcpy(res, p, size);
   barrier();

which in no way guarantees that it's an _atomic_ access, but it does
guarantee the semantics that you get one particular value and it won't
get reloaded later..

That would solve the crazy sparc pte issue too.


               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