Re: perf: fuzzer leads to trace_kprobe: Could not insert message flood
From: Ingo Molnar
Date: Thu Apr 12 2018 - 03:53:47 EST
* Song Liu <songliubraving@xxxxxx> wrote:
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index d7af828..2d5fe26 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -8400,6 +8400,10 @@ static int perf_kprobe_event_init(struct perf_event *event)
>
> if (event->attr.type != perf_kprobe.type)
> return -ENOENT;
> +
> + if (!capable(CAP_SYS_ADMIN))
> + return -EACCES;
> +
> /*
> * no branch sampling for probe events
> */
> @@ -8437,6 +8441,10 @@ static int perf_uprobe_event_init(struct perf_event *event)
>
> if (event->attr.type != perf_uprobe.type)
> return -ENOENT;
> +
> + if (!capable(CAP_SYS_ADMIN))
> + return -EACCES;
This is seriously whitespace damaged: all tabs are spaces ...
Thanks,
Ingo