> > > For the enable case, I think it would be a nice feature if we checked > > > the return code and aborted the patching operation on error. I think > > > that should be easy enough. > > > > Yeah, that should be easy. To be specific, you're only talking about > > the patching operation on the associated klp_object, not the entire > > klp_patch right? > > Oh, right, I forgot about modules. We can't stop the module from > loading, so forget that. Maybe the load hook should just return void. We can. We can stop a patch module from being loaded if there is an error coming from a hook, or we can stop a patched module (patch module is loaded) from being loaded. The latter case is not very user-friendly. We have force_load_module sysfs attribute for exactly these cases (if an admin is sure he can safely do that). It is not nice though. > > > For the unload case, it's too late to do anything, so I'd say a void > > > return code would be better. Otherwise it implies that we actually do > > > something about it. Maybe in that case we can leave it up to the user > > > to decide whether to print an error or WARN() or whatever. > > > > Good point. I can change that in v2. I agree with this point. Miroslav -- To unsubscribe from this list: send the line "unsubscribe live-patching" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html