Re: [PATCH] panic: Taint kernel if fault injection has been used
From: Greg Kroah-Hartman
Date: Fri Dec 02 2022 - 01:33:25 EST
On Fri, Dec 02, 2022 at 01:45:59PM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Since the function error injection framework in the fault injection
> subsystem can change the function code flow forcibly, it may cause
> unexpected behavior (and that is the purpose of this feature) even
> if it is applied to the ALLOW_ERROR_INJECTION functions.
> So this feature must be used only for debugging or testing purpose.
>
> To identify this in the kernel oops message, add a new taint flag
> for the fault injection. This taint flag will be set by either
> function error injection is used or the BPF use the kprobe_override
> on error injectable functions (identified by ALLOW_ERROR_INJECTION).
>
> Link: https://lore.kernel.org/all/20221121104403.1545f9b5@xxxxxxxxxxxxxxxxxx/T/#u
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> ---
> Documentation/admin-guide/tainted-kernels.rst | 5 +++++
> include/linux/panic.h | 3 ++-
> kernel/fail_function.c | 2 ++
> kernel/panic.c | 1 +
> kernel/trace/bpf_trace.c | 2 ++
> 5 files changed, 12 insertions(+), 1 deletion(-)
I think you forgot to also update tools/debugging/kernel-chktaint with
this new entry :(