Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489302
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.7 108/184] bus: arm-ccn: Do not attempt to configure XPs for cycle counter |
| Date | 2016-09-22 20:30 +0200 |
| Message-ID | <skgUW-1qI-35@gated-at.bofh.it> (permalink) |
| References | <skgid-VW-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pawel Moll <pawel.moll@arm.com> commit b7c1beb278e8e3dc664ed3df3fc786db126120a9 upstream. Fuzzing the CCN perf driver revealed a small but definitely dangerous mistake in the event setup code. When a cycle counter is requested, the driver should not reconfigure the events bus at all, otherwise it will corrupt (in most but the simplest cases) its configuration and may end up accessing XP array out of its bounds and corrupting control registers. Reported-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/bus/arm-ccn.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -895,6 +895,10 @@ static void arm_ccn_pmu_xp_dt_config(str struct arm_ccn_component *xp; u32 val, dt_cfg; + /* Nothing to do for cycle counter */ + if (hw->idx == CCN_IDX_PMU_CYCLE_COUNTER) + return; + if (CCN_CONFIG_TYPE(event->attr.config) == CCN_TYPE_XP) xp = &ccn->xp[CCN_CONFIG_XP(event->attr.config)]; else
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 4.7 108/184] bus: arm-ccn: Do not attempt to configure XPs for cycle counter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-22 20:30 +0200
csiph-web