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").

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: davej@redhat.com
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Patch-mainline: linux-kernel @ 04/13/13, 19:49
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.com>
msm: kgsl: Improved bounds checking on user specified parameters

Verify that the user specified length for a PMEM region is smaller
than the size of the entire region as reported by the kernel APIs.

CRs-fixed: 380282
Change-Id: Ic0dedbad0127bdaed70eafc00238b44f982b093b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
gpu: ion: Correcting Klockwork errors

Change-Id: I9f0d909782ee2c00aae73c25a7234756cfe2f5f3
CRs-Fixed: 566918
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
hwmon: pm8xxx-adc: Fix buffer overflow issue

Fix buffer overflow problem with array
pm8xxx_amux_scaling_ratio.

CRs-Fixed: 566906
Change-Id: I03fdb2171d3027b84659820d5027eddc1f59d6e4
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
ASoC: msm: qdsp6v2: Copy frame data based on frame length

Copying data based on count will result in copying
uninitialized data to userspace which can potentially
disclose sensitive data. Fix by copying data based on
frame instead.

CRs-Fixed: 552528, 552531
Change-Id: I307b285ef2aefe00b953cf650582e9ff7e03ceb1
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Merge "ASoC: msm: qdsp6v2: Copy frame data based on frame length"
usb: usb_bam: Fix issue for not checking NULL returned value

Ensure to correctly check the right pointer returned
from a call to function platform_get_resource_byname()
in order to prevent accessing this pointer afterwards
in case this pointer is NULL.

Change-Id: I8f6ba2944a4c60d2b4e668686c8bf7bc2640f46b
CRs-Fixed: 535640
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Lena Salman <esalman@codeaurora.org>
msm: ipc: Check pointer validity before dereferencing it

Transport OPEN and CLOSE events are handled by dynamically allocating a
work. Check that the work item is properly allocated before dereferencing
it.

Change-Id: Icb73548f0747494791f14f9c8014f8effd4b844c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: ipc: Access pointers after a successful check

Some pointers in msm_ipc_router_extract_msg function are accessed either
before a NULL pointer check or if one of the conditions in the check is
true.

Fix the code to dereference those pointers only after the pointer is not
NULL and the other associated conditions are true.

CRs-Fixed: 471110
Change-Id: Ic45fe118818caa6985e5e56403ab3cc467174cf6
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: Remove files no longer buildable under arch/arm/mach-msm

Removed the files to reduce efforts as we move driver code out of mach-msm

Change-Id: I592d5df4ecd410c3ae0f2aefd58850db75ea25d3

Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
Merge "msm: Remove files no longer buildable under arch/arm/mach-msm"
Merge "hwmon: pm8xxx-adc: Fix buffer overflow issue"
Merge "msm: ipc: Access pointers after a successful check"
Merge "gpu: ion: Correcting Klockwork errors"
Merge "msm: ipc: Check pointer validity before dereferencing it"
Merge "usb: usb_bam: Fix issue for not checking NULL returned value"
Merge "perf: Treat attr.config as u64 in perf_swevent_init()"
Merge "msm: kgsl: Improved bounds checking on user specified parameters"