lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: Introduce function to report unsupported syscall attribute flags
On 12.09.12 13:20:43, Peter Zijlstra wrote:
> On Wed, 2012-09-12 at 13:01 +0200, Robert Richter wrote:
> > + if (notsup)
> > + pr_warn("perf: unsupported attribute flags: %016llx\n", notsup);
>
> This is a dmesg DoS..

This could be avoided by introducing a cpuinfo like sysfs file for
each pmu:

/sys/bus/event_source/devices/*/flags

Then, userspace should know how to correctly setup the syscall. All
supported attributes would be known to perf and messages would thrown
only if something goes unexpected wrong.

I suggested this already here:

https://lkml.org/lkml/2012/8/3/214
https://lkml.org/lkml/2012/9/6/472

> I'm also not sure dmesg is the right way.. could we not somehow change
> the attrs to provide better diagnostic?

I found this discussion without a solution for the problem:

http://lwn.net/Articles/374794/

Other options could be pr_debug() or trace_printk()'s for debugging
purposes. Or an error report in sysfs:

cat /sys/bus/event_source/devices/*/log

But the pmu type needs to be known for this.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center



\
 
 \ /
  Last update: 2012-09-12 16:41    [W:0.052 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site