On Wed, Jan 17, 2018 at 12:22:48PM +0100, Thomas Seeling wrote: > Hallo, > > > am I right in understanding that for compiling a new kernel with > retpoline resiliency I need a patched gcc until this is covered in an > official gcc release?
For the *full* version, yes. But : 1. Linus thinks the asm updates, which don't need patched gcc, are the more important part: https://lkml.org/lkml/2018/1/14/159 2. GCC upstream changed the thunk names, but see https://lkml.org/lkml/2018/1/14/195 and Linus's reponse I'm not sure if upstream has switched the names back (yet). The patches that fedora used, and which I'm using on 7.2.0, are at http://www.linuxfromscratch.org/~ken/retpoline-test/gcc-7-retpoline.patch > Would it be possible to build a concurrent intermediate gcc which does > not affect the mainline one by choosing some different env variables? > > Tschau...Thomas Probably (specifically, --prefix). I used the instructions in BLFS for rebuilding gcc (but only with C and C++), and used it to replace the existing version. That, on 4.14.14-rc1, gives me $cat /sys/devices/system/cpu/vulnerabilities/spectre_v2 Mitigation: Full generic retpoline The patch only adds new code for the thunks, AFAICS it doesn't alter anything which doesn't know about the new stuff. Anyway, if you want to build separately, I guess you can build in /opt/kgcc (the old place to put a *kernel* version of gcc, while keeping it away from /usr) and put that first on your PATH. But I haven't done something liek that for years, maybe I've forgotten some detail. ĸen > -- > "Do you wanna be a legend or a passing footprint on the sands of time?" > > -- > http://lists.linuxfromscratch.org/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > > Do not top post on this list. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > http://en.wikipedia.org/wiki/Posting_style -- Truth, in front of her huge walk-in wardrobe, selected black leather boots with stiletto heels for such a barefaced truth. - Unseen Academicals -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
