Skip to content
Snippets Groups Projects
Commit 54458d84 authored by yu-hao_lin's avatar yu-hao_lin Committed by Eric1 Lin
Browse files

common: security for performance component

The fix is designed to return an error in the case of event duplication.

CVE: CVE-2016-3768
Bug: 28172137

Change-Id: I482382d0623a06e302a15756f4fa3838cd1c9c36
Reviewed-on: http://mcrd1-22-pc.corpnet.asus/code-review/master/237863


Tested-by: default avatarYu-Hao Lin <yu-hao_lin@asus.com>
Reviewed-by: default avatarYu-Hao Lin <yu-hao_lin@asus.com>
Reviewed-by: default avatarEric1 Lin <Eric1_Lin@asus.com>
parent 6ab3bae6
No related merge requests found
......@@ -240,6 +240,7 @@ armpmu_add(struct perf_event *event, int flags)
pr_err("Event: %llx failed constraint check.\n",
event->attr.config);
event->state = PERF_EVENT_STATE_OFF;
err = -EPERM;
goto out;
}
......
......@@ -473,6 +473,7 @@ static int msm_l2_test_set_ev_constraint(struct perf_event *event)
if (!(event->cpu < 0)) {
event->state = PERF_EVENT_STATE_OFF;
event->attr.constraint_duplicate = 1;
err = -EPERM;
}
}
out:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment