Thank you! Which the the knowledge base article that you would recommend I read to get a bit more familiar with this topic? On Fri, Jun 15, 2018 at 6:47 PM Jeff Law <law@xxxxxxxxxx> wrote: > On 06/15/2018 09:34 AM, Vassilena Treneva wrote: > > Many thanks for your quick answers. > > > > Perhaps silly questions but: > > > > 1) is there a way to check if the version that I am using really > > contains those patches? > > Running on Red Hat Enterprise Linux Server release 7.2 (Maipo) with gcc > > (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4). > Use RPM to get the precise version of the package you are using rather > than "gcc -v". "rpm -qi gcc" > > You'll be looking for a release like 4.el7_2.1 > > > > > 2) Does that mean that to avoid Spectre v2 I can add -mindirect-branch > > compiler option? Are there other options in place? > I would suggest you read the knowledge base article on the subject. In > general we do not recommend compiling user space code with spectre > mitigations. It is unnecessary. > > THe kernel and kernel modules provided by Red Hat are already build with > the proper mitigations. Out of tree kernel modules that use the kbuild > system and have been rebuilt since the release of the kernel and > compiler updates will automatically use appropriate mitigation. Out of > kernel module builds which do not use kbuild require special flags. > This is all covered in the kbase article. > > jeff >