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: <48AD9614.6060701@qumranet.com>
Date:	Thu, 21 Aug 2008 19:21:40 +0300
From:	Avi Kivity <avi@...ranet.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Nick Piggin <nickpiggin@...oo.com.au>,
	jmerkey@...fmountaingroup.com,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 	2.6.27-rc4	released

Peter Zijlstra wrote:
> Not sure - I think all barrier clobber the full register and memory set.
> So if you access a variable after a barrier it will have to issue a
> load.
>   

IIRC a barrier only clobbers memory.  gcc must reload a variable from 
memory unless it can prove the variable's address has not escaped anywhere.

So:

void f()
{
    int v;

    v = g();
    barrier();
    do_domething_with(v);
}

Need not reload v from memory (indeed, v can be in a register for its 
entire lifetime), but

void f()
{
    int v;

    v = g();
    h(&v);
    barrier();
    do_domething_with(v);
}
 
Will force v into memory, and reload it after the barrier.

-- 
error compiling committee.c: too many arguments to function

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