lkml.org 
[lkml]   [2022]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] panic: Taint kernel if fault injection has been used
On Fri, 2 Dec 2022 07:33:11 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Fri, Dec 02, 2022 at 01:45:59PM +0900, Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > 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@gandalf.local.home/T/#u
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> > ---
> > 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 :(

Oops, thanks for pointing!
Let me update the patch.


--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2022-12-04 23:22    [W:0.062 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site