perf: Treat attr.config as u64 in perf_swevent_init()
authorPreetham Chandru R <pchandru@nvidia.com>
Wed, 15 May 2013 11:31:46 +0000 (16:31 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Wed, 22 May 2013 16:18:11 +0000 (09:18 -0700)
commitc75951a17ef41e0cc108f1ced0213bc2620f6534
tree0b37ac55ad4d00ad205aded00a8db331bb9687d5
parent32ef1c46e812807ff555b9a8bcf362fc814e14fc
perf: Treat attr.config as u64 in perf_swevent_init()

Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().

Introduced in commit b0a873ebb ("perf: Register PMU
implementations").

Bug 1289245

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
(cherry picked from commit 8176cced706b5e5d15887584150764894e94e02f)
Change-Id: Idde0330d7430f2ba1645f4dfed063c5df9bbb44a
Reviewed-on: http://git-master/r/228851
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
kernel/events/core.c