[12028] in cryptography@c2.net mail archive
Re: Did you *really* zeroize that key?
daemon@ATHENA.MIT.EDU (Marshall Clow)
Fri Nov 8 17:41:20 2002
In-Reply-To: <Pine.LNX.4.40.0211080822240.30797-100000@newbolt.sonic.net>
Date: Fri, 8 Nov 2002 14:33:40 -0800
To: bear <bear@sonic.net>, Alan Barrett <apb@cequrux.com>
From: Marshall Clow <marshall@idio.com>
Cc: cryptography@wasabisystems.com
At 8:36 AM -0800 11/8/02, bear wrote:
>I remember this issue from days when I wrote modem drivers.
>I had a fight with a compiler vendor over the interpretation
>of "volatile".
>
>They agreed with me that "volatile" meant that all *writes*
>to the memory had to happen as directed; but had taken the
>approach that *reads* of volatile memory could be optimized
>away if the program didn't do anything with the values read.
>
>This doesn't work with the UARTs that I was coding for at the
>time, because on those chips, *reads* have side effects on
>the state of the chip. If a read of the status register
>doesn't happen, then subsequent writes to the data buffer will
>not trigger a new transmit.
>
>The compiler vendor had not foreseen a situation in which
>reads might have side effects, and so the compiler didn't
>work for that task. I wound up using a different compiler.
The best volatile story (and the best piece of documentation) I know of
came from an old version of Visual C:
"The 'volatile' keyword is implemented syntacticly but not semantically"
[ This was 10+ years ago; I'm sure that MS has fixed it by now ]
--
-- Marshall
Marshall Clow Idio Software <mailto:marshall@idio.com>
Hey! Who messed with my anti-paranoia shot?
---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo@wasabisystems.com