Spectre V1 diagnostic / mitigation

Richard Biener rguenther@suse.de
Wed Dec 19 11:51:00 GMT 2018


On Wed, 19 Dec 2018, Florian Weimer wrote:

> * Richard Biener:
> 
> > The cost is probably target dependent - on x86 it's simply a $fs based
> > load/store.
> 
> Do you need to reserve something in the TCB for this?

No idea.  But I figured using TLS with the patch only works when
optimizing and not with -O0.  Huh.  Anyway, it should be equivalent
to what presence of

__thread void *_SV1MASK = (void *)-1l;

requires (plus I make that symbol GNU_UNIQUE).  I see this
allocates -1 in the .tdata section marked TLS.

Richard.

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)



More information about the Gcc mailing list