Re: [PATCH 07/11 v3] livepatch: Trigger WARNING if livepatch function fails due to recursion
From: Miroslav Benes
Date: Fri Nov 06 2020 - 05:07:29 EST
On Thu, 5 Nov 2020, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
>
> If for some reason a function is called that triggers the recursion
> detection of live patching, trigger a warning. By not executing the live
> patch code, it is possible that the old unpatched function will be called
> placing the system into an unknown state.
>
> Link: https://lore.kernel.org/r/20201029145709.GD16774@alley
>
> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Cc: Jiri Kosina <jikos@xxxxxxxxxx>
> Cc: Joe Lawrence <joe.lawrence@xxxxxxxxxx>
> Cc: live-patching@xxxxxxxxxxxxxxx
> Suggested-by: Miroslav Benes <mbenes@xxxxxxx>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Acked-by: Miroslav Benes <mbenes@xxxxxxx>
> ---
> Changes since v2:
>
> - Blame Miroslav instead of Petr ;-)
Thanks. Fortunately, if printk is broken in WARN_ON_ONCE(), I can always
blame Petr again :)
M