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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/