]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drivers/perf: arm-ccn: don't log to dmesg in event_init
authorMark Rutland <mark.rutland@arm.com>
Mon, 21 May 2018 17:19:49 +0000 (18:19 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:40 +0000 (14:20 +0100)
commitd6f676720ef8fda304c8bba1f85dc504ba65932d
treec40586c41988a1f6df3af1f75e38108199fb8d23
parent88d941dc4f65b2c927d778823e098adc8a0893ab
drivers/perf: arm-ccn: don't log to dmesg in event_init

BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit 1898eb61fbc9703efee886d3abec27a388cf28c3 ]

The ARM CCN PMU driver uses dev_warn() to complain about parameters in
the user-provided perf_event_attr. This means that under normal
operation (e.g. a single invocation of the perf tool), a number of
messages warnings may be logged to dmesg.

Tools may issue multiple syscalls to probe for feature support, and
multiple applications (from multiple users) can attempt to open events
simultaneously, so this is not very helpful, even if a user happens to
have access to dmesg. Worse, this can push important information out of
the dmesg ring buffer, and can significantly slow down syscall fuzzers,
vastly increasing the time it takes to find critical bugs.

Demote the dev_warn() instances to dev_dbg(), as is the case for all
other PMU drivers under drivers/perf/. Users who wish to debug PMU event
initialisation can enable dynamic debug to receive these messages.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/bus/arm-ccn.c