[CentOS] C7 Kernel module compilation

Wed Aug 7 18:15:47 UTC 2019
Akemi Yagi <amyagi at gmail.com>

On Wed, Aug 7, 2019 at 9:00 AM Alessandro Baggi
<alessandro.baggi at gmail.com> wrote:
>
> Il 07/08/19 01:02, Phil Perry ha scritto:
> > On 06/08/2019 14:45, Alessandro Baggi wrote:

> > Please post the actual error message in dmesg or /var/log/messages.
> >
> > It's likely that the kernel is just grumbling that the module is not
> > signed (missing key), but it's just noise unless you're using
> > SecureBoot. Posting the actual message in full will help determine if
> > that is the case.
> >
> > Thanks
> >
> > Phil
>
> Hi, thank you for your reply,
> I solve adding in "General Setup" values of current kernel on
> localversion option and adding Module.symver from
> /boot/symver-version.gz to module directory.
>
> Now I get another problem compiling the third party module (i2c-nct6775):
>
> "CONFIG_RETPOLINE=y but not supported by the compiler. Compiler update
> recomended. Stop."
>
> I tried using scl gcc7 and 8 but get the same issue.
>
> I checked that retpoline is related to Spectre but checking on centos with:
>
> cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
>
> I get:
>
> Mitigation: IBRS (kernel), IBPB
>
> and RETPOLINE seems disabled (I'm wrong?).
>
> I ridden in a blog post that I can disable this check commenting out
> some lines starting from N. 166 of arch/Makefile but I don't think this
> is the best approach.
>
> At this point I can't understand what means the previous error and why I
> get this error when compiling i2c-nct6775.
>
> Can someone point me in the right direction?

Please post the output from:

rpm -qa kernel\* | sort

and

uname -r

Akemi