Re: [PATCH v3] Add kernel config option for tweaking kernel behavior.

From: Linus Torvalds
Date: Mon Apr 13 2020 - 14:13:59 EST


On Sun, Apr 12, 2020 at 11:34 PM Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Existing kernel config options are defined based on "whether you want to
> enable this module/feature or not". And such granularity is sometimes
> too rough-grained for fuzzing tools which try to find bugs inside each
> module/feature.

I still detest making this a hardcoded build-time config option.

A kernel parameter that sets a flag seems much simpler. More
importantly, having it be something sanely named, and something you
can set independently some other way, would allow a regular kernel to
then run a fuzzer as root.

Some kind of "not even root" flag, which might be per-process and not
possible to clear once set (so that your _normal_ system binaries
could still do the root-only stuff, but then you could start a fuzzing
process with that flag set, knowing that the fuzzing process - and
it's children - are not able to do things).

Honestly, in a perfect world, it has nothing at all to do with
fuzzing, and people could even have some local rules like "anybody who
came in through ssh from the network will also have this flag set".

Linus