Gentoo Archives: gentoo-user

From: Ian Zimmerman <itz@××××××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Spectre-NG
Date: Wed, 09 May 2018 22:50:31
Message-Id: 20180509225012.tbzlrx2b623tkc7f@matica.foolinux.mooo.com
In Reply to: Re: [gentoo-user] Re: Spectre-NG by Wols Lists
1 On 2018-05-09 20:04, Wols Lists wrote:
2
3 > > As mentioned, I wonder why gcc/clang do not yet support this
4 > > horribly slow but spectre-safe option. It can't be that hard to
5 > > implement in the actual code-producing back-end.
6 >
7 > Given the response by the gcc team to security people complaining that
8 > gcc was optimising out security-sensitive code (namely, a two-fingered
9 > salute near enough), I doubt the gcc team would have any interest in
10 > optimisations that SLOWED DOWN the resultant code.
11 >
12 > I suspect that might be one of the forces driving the kernel towards
13 > CLANG - a development team that is not obsessed with performance at
14 > the expense of breaking any code that uses undefined features.
15
16 I'm afraid I side with the gcc people in this interminable flamewar.
17
18 Code may be "security-sensitive" but buggy. Is the compiler writer
19 really responsible for guessing what the programmer meant to accomplish
20 with buggy code? It would of course be preferable if the compiler could
21 just abort with an error when it detects UB, but that turns out to be
22 very hard to impossible in the case of C. That's just a built in
23 problem with the language.
24
25 Further, I don't think the llvm/clang position on these cases is all
26 that different, although there may be a difference in emotional
27 attitude.
28
29 > Unfortunately, when dealing with hardware, one is forced to rely on
30 > undefined features. A strong point of C, until the compiler decides to
31 > go "rogue" on you ...
32
33 I don't understand what you mean here. In the disputed cases there was
34 always a well-defined way (slightly more verbose but not prohibitively
35 so) to code the desired behavior.
36
37 --
38 Please don't Cc: me privately on mailing lists and Usenet,
39 if you also post the followup to the list or newsgroup.
40 To reply privately _only_ on Usenet and on broken lists
41 which rewrite From, fetch the TXT record for no-use.mooo.com.

Replies

Subject Author
Re: [gentoo-user] Re: Spectre-NG Wol's lists <antlists@××××××××××××.uk>