Re: [PATCH v8 04/12] x86/spectre: Add boot time option to select Spectre v2 mitigation

From: Greg Kroah-Hartman
Date: Wed Jan 24 2018 - 08:58:57 EST


On Wed, Jan 24, 2018 at 10:56:49AM +0100, Jiri Kosina wrote:
> On Wed, 24 Jan 2018, Greg Kroah-Hartman wrote:
>
> > But will Andi's patch work well for you? Adding a MODULE_INFO() tag to
> > every module?
>
> Yes, that would work -- all the modules that get built in tree, or out of
> tree but with retpolined compiler, would have that marker that could be
> optionally checked for by the kernel.

And what is the kernel supposed to do with that info?

> > I just thought since you were already using modversions in enterprise
> > distros already, that adding it there would be the simplest.
>
> The patch as-is introduces immediate modversion mismatch between
> retpolined kernel and non-retpolined module, making each and every one
> fail to load.

Good, the patch works then, because I thought that not loading
non-retpolined modules in a kernel that was built with retpoline was the
goal here.

If that is not the intended result, then yes, the patch should be
reverted and replaced with something that actually does whatever it is
that you all want. As it is, I am totally confused as to the
requirement here...

thanks,

greg k-h