GCC Lands s390 Compiler-Side Changes For Spectre V2
Landing a few days ago for the Linux 4.16 kernel merge window was IBM z / s390 mitigation work for Spectre while now the necessary compiler-side changes are also present for the upcoming GCC 8 stable release.
Landing this week in the GNU Compiler Collection (GCC) code-base was the s390 architecture specific code for disabling prediction of indirect branches as part of its Spectre Variant Two work on IBM Z.
As mentioned in the s390 kernel article, the s390 approach due to its architecture is making use of the execute instruction rather than a return instruction, dubbing the mitigation technique "Expoline" rather than "Retpoline" for AMD/Intel hardware.
The new s390 compiler switches are formatted similarly to the x86 switches:
More details via this commit.
Landing this week in the GNU Compiler Collection (GCC) code-base was the s390 architecture specific code for disabling prediction of indirect branches as part of its Spectre Variant Two work on IBM Z.
As mentioned in the s390 kernel article, the s390 approach due to its architecture is making use of the execute instruction rather than a return instruction, dubbing the mitigation technique "Expoline" rather than "Retpoline" for AMD/Intel hardware.
The new s390 compiler switches are formatted similarly to the x86 switches:
-mindirect-branch-jump=(keep|thunk|thunk-extern|thunk-inline)
-mindirect-branch-call=(keep|thunk|thunk-extern)
-mfunction-return-reg=(keep|thunk|thunk-extern)
-mfunction-return-mem=(keep|thunk|thunk-extern)
More details via this commit.
2 Comments