Hi all, I'be trying to drill down on what is the minimum consistency model that still allows function prototype changes: Adding, removing or modifying arguments of a function or changing its return type. Because I believe this is the most important functionality that the null model, where functions are simply replaced immediately using ftrace is lacking. Under my proposed classification, LEAVE_PATCHED_SET + SWITCH_THREAD offers this. But even that is fairly complex and would require large parts of kpatch, kGraft and Masami's code. The really trivial solution is: static void lpc_ftrace_handler(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *ops, struct pt_regs *regs) { struct lpc_func *func = ops->private; if (!within_patched_set(parent_ip)) regs->ip = func->new_addr; } Obviously, within_patched_set() would need an efficient data structure, like an interval tree, to quickly decide whether the parent ip address is within the patched set. This is enough to make sure that function calls are consistent. No stack checking, no stop_machine(), no forcing threads through userspace. A disadvantage is that it doesn't give an indication when patching is over and the trampoline can be removed. For that, I currently don't see a better method than tracking kernel exits and/or stack analysis. What do you think? Vojtech -- 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