[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120912130253.GY8285@erda.amd.com>
Date: Wed, 12 Sep 2012 15:02:53 +0200
From: Robert Richter <robert.richter@....com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Ingo Molnar <mingo@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists