Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214174
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting |
| Date | 2015-08-26 22:30 +0200 |
| Message-ID | <q1Puz-7Y2-33@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <q1D0l-71b-7@gated-at.bofh.it> <q1DjI-7nv-11@gated-at.bofh.it> <q1DjI-7nv-9@gated-at.bofh.it> <q1NVL-5DV-7@gated-at.bofh.it> <q1Pbb-7Bp-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 26 Aug 2015 22:05:13 +0200 Peter Zijlstra <peterz@infradead.org> wrote:
> > Is this whole thing overkill? As far as I can see, the problem which is
> > being addressed only occurs in a couple of places (perf, wifi netlink
> > handling) and could be addressed with some local pr_debug statements. ie,
> >
> > #define err_str(e, s) ({
> > if (debugging)
> > pr_debug("%s:%d: error %d (%s)", __FILE__, __LINE__, e, s);
> > e;
> > })
> >
> > (And I suppose that if this is later deemed inadequate, err_str() could
> > be made more fancy).
>
> Not really. That is something that's limited to root. Whereas the
> problem is very much wider than that.
>
> If you set one bit wrong in the pretty large perf_event_attr you've got
> a fair chance of getting -EINVAL on trying to create the event. Good
> luck finding what you did wrong.
>
> Any user can create events (for their own tasks), this does not require
> root.
>
> Allowing users to flip your @debugging flag would be an insta DoS.
>
> Furthermore, its very unfriendly in that you have to (manually) go
> correlate random dmesg output with some program action.
It depends on who the audience is. If it's developers who are writing
userspace perf tooling then all the above won't be an issue. If it's
aimed at end users of that tooling then yes.
IOW, we're in the usual situation of discussing implementation before
anyone has explained the requirements.
Also... we're talking only of perf, so perhaps some perf-specific
reporting scheme would be better, rather than a kernel-wide thing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] perf: Introduce extended syscall error reporting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
[PATCH v2 5/6] perf/x86/intel/pt: Use extended error reporting in event initialization Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
[PATCH v2 6/6] perf/x86/intel/bts: Use extended error reporting in event initialization Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
[PATCH v2 1/6] perf: Introduce extended syscall error reporting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-08-31 20:50 +0200
Re: [PATCH v2 1/6] perf: Introduce extended syscall error reporting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-01 08:40 +0200
[PATCH v2 3/6] perf: Annotate some of the error codes with perf_err() Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
[PATCH v2 2/6] perf: Add file name and line number to perf extended error reports Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
[PATCH v2 4/6] perf/x86: Annotate some of the error codes with perf_err() Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-24 16:40 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-25 10:30 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Johannes Berg <johannes@sipsolutions.net> - 2015-08-25 11:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-25 11:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-25 11:20 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Johannes Berg <johannes@sipsolutions.net> - 2015-08-25 11:40 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-25 12:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Johannes Berg <johannes@sipsolutions.net> - 2015-08-25 12:30 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-26 07:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Johannes Berg <johannes@sipsolutions.net> - 2015-08-26 09:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-26 09:30 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-26 19:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-26 23:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Andrew Morton <akpm@linux-foundation.org> - 2015-08-26 20:50 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Peter Zijlstra <peterz@infradead.org> - 2015-08-26 22:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Andrew Morton <akpm@linux-foundation.org> - 2015-08-26 22:30 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Vince Weaver <vince@deater.net> - 2015-08-26 23:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Andrew Morton <akpm@linux-foundation.org> - 2015-08-26 23:00 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Vince Weaver <vince@deater.net> - 2015-08-26 23:20 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-28 12:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Arnaldo Carvalho de Melo <acme@infradead.org> - 2015-08-26 23:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-26 09:30 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Johannes Berg <johannes@sipsolutions.net> - 2015-08-26 09:40 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Ingo Molnar <mingo@kernel.org> - 2015-08-26 09:10 +0200
Re: [PATCH v2 0/6] perf: Introduce extended syscall error reporting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-26 13:40 +0200
csiph-web