Re: [PATCH] fault-inject: use a shared initialization helper for the random state
From: Sang-Heon Jeon
Date: Fri Nov 13 2026 - 05:58:50 EST
2026년 11월 13일 (금) 오전 11:13, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>님이 작성:
>
> On Thu, 12 Nov 2026 23:46:34 +0900 Sang-Heon Jeon <ekffu200098@xxxxxxxxx> wrote:
>
> > fault_rnd_state can be seeded from setup_fault_attr(),
> > fault_create_debugfs_attr() and fault_config_init(), and each of them
> > uses its own guard. Configuring fault injection in more than one way
> > leads to useless reseeding.
> >
> > To prevent this, use a shared initialization helper fault_random_init()
> > in all three places. So fault_rnd_state is seeded only once per boot.
>
> Thanks, that looks nice.
>
>
> Generally, fault-injection doesn't see to get used very much, and the
> huge number of AI-generated you-messed-up-error-handling reports we're
> receiving show the cost of that.
Considering boot cmdline broken period, I agree
> syskaller can use it and those people have shown some
> interesting/useful results from its use.
It is very useful to set up a test environment as well.
> I have a side-project going where I get the LLM to drive patch testing
> on a local test machine. The AI looks at the patches, figures out test
> plans then controls their execution. One of the many things I'm
> telling it do is to fault-inject every error path which the patchset(s)
> add. It seems to do this quite well. So I'm a big user of
> fault-injection now.
>
> I'm hoping that I can also make it use kcov: use coverage
> instrumentation to verify that all code which the patchset added or
> altered has been runtime testing.
Sounds really cool. I could be really helpful.
> But oh my, it's soooooooooo slooooooooooooow. It does really
> impressive testing, but I need to make it run 10x faster :(
>
We will find a way as we always have. Let me know if there's anything
I can help with :)
Best regards,
Sang-Heon Jeon