Re: [PATCH] error-injection: Add prompt for function error injection

Jiri Kosina
2022-12-02T00:46:56Z

On Thu, 1 Dec 2022, Linus Torvalds wrote:

> > The hid-bpf framework depends on it.
>
> Ok, this is completely unacceptably disgusting hack.
>
> That needs fixing.
>
> > Either hid-bpf or bpf core can add
> > "depends on FUNCTION_ERROR_INJECTION"
>
> No, it needs to be narrowed down a lot. Nobody sane wants error
> injection just because they want some random HID thing.
>
> And no, BPF shouldn't need it either.
>
> This needs to be narrowed down to the point where HID can say "I want
> *this* particular call to be able to be a bpf call.
>
> Stop this crazy "bpf / hid needs error injection" when that then
> implies a _lot_ more than that, plus is documented to be something
> entirely different anyway.
>
> I realize that HID has mis-used the "we could just use error injection
> here to instead insert random bpf code", but that's a complete hack.
>
> Plus it seems to happily not even have made it into mainline anyway,
> and only exists in linux-next. Let's head that disgusting hack off at
> the pass.
>
> I'm going to apply Steven's patch, because honestly, we need to fix
> this disgusting mess *before* it gets to mainline, rather than say
> "oh, we already have broken users in next, so let's bend over
> backwards for that".
>
> The code is called "error injection", not "random bpf extension"

Seems like quite a few parallel threads are currently going on about this,
so it's a little bit hard to catch up for me as I am apparently CCed only
on some of them.

Anyway, I believe [1] that ERROR_INJECTION has been designed as a
debugging feature in the first place, and should stay so. After figuring
out now that HID-BPF actually has hard dependence on it, I fully agree [2]
that the series should be ditched for 6.2 and will work with Benjamin to
have it removed from current hid.git#for-next.

[1] https://lore.kernel.org/all/nycvar.YEU.7.76.2211211716270.27249@gjva.wvxbf.pm/
[2] https://lore.kernel.org/lkml/nycvar.YFH.7.76.2212020135390.6045@cbobk.fhfr.pm/

--
Jiri Kosina
SUSE Labs