On 09/05/18 19:18, Martin Vaeth wrote: > As mentioned, I wonder why gcc/clang do not yet support this > horribly slow but spectre-safe option. It can't be that hard to > implement in the actual code-producing back-end.
Given the response by the gcc team to security people complaining that gcc was optimising out security-sensitive code (namely, a two-fingered salute near enough), I doubt the gcc team would have any interest in optimisations that SLOWED DOWN the resultant code. I suspect that might be one of the forces driving the kernel towards CLANG - a development team that is not obsessed with performance at the expense of breaking any code that uses undefined features. Unfortunately, when dealing with hardware, one is forced to rely on undefined features. A strong point of C, until the compiler decides to go "rogue" on you ... Cheers, Wol