Re: [PATCH v2] panic: Taint kernel if fault injection has been used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 05, 2022 at 07:22:44AM +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.

The whole idea of tainting for kernel debugging is questionable.
There are many other *inject* kconfigs and other debug flags
for link lists, RCU, sleeping, etc.
None of them taint the kernel.

> To identify this in the kernel oops message, add a new taint flag

Have you ever seen a single oops message because of this particular
error injection?

> 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).

...

>  	/* set the new array to event->tp_event and set event->prog */
> +	if (prog->kprobe_override)
> +		add_taint(TAINT_FAULT_INJECTED, LOCKDEP_NOW_UNRELIABLE);

Nack for bpf bits.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux