5 ms·
So a key is stored in the unused portion of memory pointers which should match the key associated to the memory it points to. I couldn’t figure out from the art
by jpcooper 6y ago
So a key is stored in the unused portion of memory pointers which should match the key associated to the memory it points to. I couldn’t figure out from the article where the key is stored in the corresponding memory. Can anyone explain?
- Symmetry 6y agoI'd assume the key is stored in the hardware memory translation structures like the TLB.
- rjsw 6y agoIt doesn't look like it to me. I did propose storing type values in a TLB a long time ago but haven't run any simulations for it. Had started building some hardware to do type checking on an Atari ST but didn't finish it.
- pm215 6y agomwsealey's comment on the LWN article (in response to somebody asking that question there) has a good explanation of it. Basically exactly where the keys are stored is up to the implementation, but one reasonable implementation is for the memory controller to put them in the top part of the system DRAM (which is then not made available as 'normal' RAM). Architecturally the allocation tag space is entirely separate from system memory, though, and the only way to get at it is with the provided instructions for reading/writing tags, so any particular implementation can put any kind of storage it likes underneath. (A software model, for instance, might just allocate a separate lump of host RAM for storing the tags. QEMU's MTE emulation does that.)
- jpcooper 6y agoThanks for the explanation.