EXPORT_SYMBOL_GPL(paravirt_ops);
This pretty much has to be EXPORT_SYMBOL(), otherwise we just required all modules to be GPL...
J
Quoted 2 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
This pretty much has to be
EXPORT_SYMBOL(), otherwise we just required all modules to be GPL...
muwhahaha
The plan is working...
Yeah, I agree. We had to do similar for LSM.
thanks,
-chris
Quoted 6 lines · Chris Wright
Quoted 3 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
This pretty much has to be
EXPORT_SYMBOL(), otherwise we just required all modules to be GPL...
Quoted 10 lines
muwhahaha
The plan is working...
Yeah, I agree. We had to do similar for LSM.
thanks,
-chris
EXPORT_SYMBOL_GPL is still possible - if you patch over every op in paravirt_ops. Then only the paravirt modules need to be GPL, not all modules.
Zach
Quoted 3 lines · * Zachary Amsden ([email protected]) wrote:
EXPORT_SYMBOL_GPLis still possible - if you patch over every op inparavirt_ops. Then only the paravirt modules need to be GPL, not all modules.
Problem is the pervasive nature. So any old module that was doing local_irq_disable() will need access to the paravirt_ops structure via
local_irq_disable() -> raw_local_irq_disable -> paravirt_ops.irq_disable()
IOW, all modules need paravirt_ops access, otherwise non-GPL modules will fail to load with "Unknown symbol paravirt_ops." We can't make an interface change like that.
thanks,
-chris
Quoted 7 lines · Chris Wright
Quoted 4 lines · * Zachary Amsden ([email protected]) wrote:
EXPORT_SYMBOL_GPLis still possible - if you patch over every op inparavirt_ops. Then only the paravirt modules need to be GPL, not all modules.
Quoted 9 lines
Problem is the pervasive nature. So any old module that was doing
local_irq_disable()will need access to theparavirt_opsstructure via
local_irq_disable()->raw_local_irq_disable->paravirt_ops.irq_disable()IOW, all modules need
paravirt_opsaccess, otherwise non-GPL modules will fail to load with "Unknown symbolparavirt_ops." We can't make an interface change like that.
But my point is that if you patch everything in the paravirt_ops struct, no module other than the paravirt_ops backend code needs paravirt_ops access, so paravirt_ops can still be GPL only. The problem is you would need to patch everything.
Zach
Quoted 4 lines · Zachary Amsden
But my point is that if you patch everything in the
paravirt_opsstruct, no module other than theparavirt_opsbackend code needsparavirt_opsaccess, soparavirt_opscan still be GPL only. The problem is you would need to patch everything.
Sure, but the default code leaves the module with a static dependency on paravirt_ops, even if it doesn't have a dynamic one. If you patch every single pv_op, then you could just make the static code ".fill ud2" and have no dependency - but I don't think that's where we want to go.
J
Quoted 4 lines · * Zachary Amsden ([email protected]) wrote:
But my point is that if you patch everything in the
paravirt_opsstruct, no module other than theparavirt_opsbackend code needsparavirt_opsaccess, soparavirt_opscan still be GPL only. The problem is you would need to patch everything.
Oh, I see what you mean, yes. There was some discussion of that, basically run through generic patch, then ->patch() or some such.
Quoted 8 lines · Chris Wright
Quoted 4 lines · * Zachary Amsden ([email protected]) wrote:
But my point is that if you patch everything in the
paravirt_opsstruct, no module other than theparavirt_opsbackend code needsparavirt_opsaccess, soparavirt_opscan still be GPL only. The problem is you would need to patch everything.Oh, I see what you mean, yes. There was some discussion of that, basically run through generic patch, then ->patch() or some such.
There is another solution. You can simply make the users of paravirt_ops that aren't important enough to patch static functions in the kernel.
That plus the removal from the callers that always get patched should make the GPL export safe.
Eric