Re: [PATCH 3/4] x86,module: Detect VMX vs SLD conflicts

From: Steven Rostedt
Date: Tue Apr 07 2020 - 10:49:34 EST


On Tue, 7 Apr 2020 16:35:43 +0200
Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

> > Hypervisors, which have been modified and are known to work correctly,
> > can add:
> >
> > MODULE_INFO(sld_safe, "Y");
> >
> > to explicitly tell the module loader they're good.
>
> What's to keep any out-of-tree module from adding this same module info
> "flag" and just lie about it? Isn't that what you are trying to catch
> here, or is it a case of, "if you lie, your code will break" as well?

Keeping with the analogy to module kabi breakage, that would basically be
the same as an out of tree module fixing the api but not using it properly.
It will break.

All this is doing is to make sure VM modules that haven't been updated to
handle split lock detection, wont be loaded if split lock detection is
enabled. Saying you can handle SLD and not handling it is just broken code
and we can't really protect against that.

-- Steve