Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting
From: Vince Weaver
Date: Wed Aug 26 2015 - 17:12:40 EST
On Wed, 26 Aug 2015, Andrew Morton wrote:
> On Wed, 26 Aug 2015 16:50:33 -0400 (EDT) Vince Weaver <vince@xxxxxxxxxx> wrote:
> > I often have to resort to sprinkling the kernel with printks to find the
> > source of errors, which is a pain. It's even more fun when the user's
> > setup is slightly different enough that I can't reproduce the issue on a
> > local machine, which happens often (due to different kernels, distros
> > backporting perf fixes, different hardware, different security settings,
> > etc).
>
> Suppose you were to tell them "please do `echo 1 > /proc/whatever' then
> send me the kernel logs". Would this be good enough?
would /proc/whatever require CAP_SYS_ADMIN?
If so, then no, probably not good enough. Many of the users are trying to
run things on large computing clusters, etc, and won't have root
permissions. They quite possibly won't have access to the syslog either.
I realize that the userbase affected by this is very tiny compared to the
amount of bloat introduced to fix it.
It would have been easier if event validation were done in userspace (ala
perfmon2) rather than having everything in the kernel like perf_event
does, but too late for that. Although at some point once you start
re-using the limited number of error return codes more than once things
can get confusing very quickly.
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/