Closed jpoimboe closed 1 year ago
I'm probably misunderstanding the mailing list thread, but I'm slightly confused about how this is going to be implemented. Say the external flags aren't used anymore both in dynrelas and livepatch code. Given a klp_reloc with just the name, sympos, type, etc., how will livepatch know where to look for the symbol? (the three options being, it's either exported and global, in another .o in the patch module and global, or in the object itself which could be local or global)
Here's my understanding. Let me know if this makes sense.
We'll have to provide the name of the object (objname) where the symbol lives. kpatch will need a little bit of rework for that.
Ah, that makes sense now.
It sounds like dynrelas would just need another field that contains the objname where the symbol (referenced by the dynrela) might live, and create-diff-object probably needs another argument for the path to Module.symvers. Doesn't sound too bad. Then we could just replace the "external" logic in livepatch with a single klp_find_object_symbol() call. I can work on this if there isn't someone working on it already.
Sounds good!
As described here:
https://lkml.kernel.org/r/20151112191917.GJ4038@treble.hsd1.ky.comcast.net