Reduce key and backlight debug logging

Change-Id: I9be140b342bb7428a0f8f0c7aecbaeaed41bfce2
zram & zsmalloc: update to kk_3.5_rb1.19 version

Kernel HEAD: 5e18edfe83a7be6a17ec9ad424935a8ba6ca9315

Change-Id: Icb5167e3d8d4149ad71282d17a9318c15c3879e3
zram & zsmalloc: 2.6.35 build fixes for kk_3.5_rb1.19 version

Change-Id: Id0f0e807427a5f9b24adeffb2d195414ea93eeee
Merge "Reduce key and backlight debug logging" into cm-11.0
ashmem: avoid deadlock between read and mmap calls

Avoid holding ashmem_mutex across code that can page fault.  Page faults
grab the mmap_sem for the process, which are also held by mmap calls
prior to calling ashmem_mmap, which locks ashmem_mutex.  The reversed
order of locking between the two can deadlock.

The calls that can page fault are read() and the ASHMEM_SET_NAME and
ASHMEM_GET_NAME ioctls.  Move the code that accesses userspace pages
outside the ashmem_mutex.

Bug: 9261835
Change-Id: If1322e981d29c889a56cdc9dfcbc6df2729a45e9
Signed-off-by: Todd Poynor <toddpoynor@google.com>
msm: kgsl: Detect and avoid malformed ioctl codes

Because we were using _IO_NR, one could construct a malformed ioctl
code that would avoid allocating memory yet go to a function that
expected that memory. Still use _IO_NR to index the array of ioctls,
but check that the full values match before jumping to the helper
function.

CRs-fixed: 385592
Orig-Change-Id: Ic0dedbaded469035bd0a2bb0f20fecb2a3045ca5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

CVE-2012-4222:
Several integer overflows in the processing of DIAG ioctl system call
parameters allow a locally installed application to conduct denial of
service (DoS) attacks or possibly execute arbitrary code in kernel
context.
https://www.codeaurora.org/projects/security-advisories/multiple-issues-diagkgsl-system-call-handling-cve-2012-4220-cve-2012

Change-Id: Ida8c46a7fd400e7756c785d268e76a4344462a98
msm: msm_fb: remove mmio access through mmap

Disable access to mm io and add
appropriate range checks to ensure valid accesses
through framebuffer mmap. This prevents illegal
access into memory.

CRs-Fixed: 474706
Orig-Change-Id: If25166f2732433ef967e99c716440030b567aae9
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>

Integer overflow in range check when mapping framebuffer memory (CVE-2013-2596).
https://www.codeaurora.org/projects/security-advisories/integer-overflow-range-check-when-mapping-framebuffer-memory-cve-2013-2596

Change-Id: Icd5506adff62f34df7297cc32c586f81dd60a16c
Merge "msm: kgsl: Detect and avoid malformed ioctl codes" into cm-11.0
Merge "ashmem: avoid deadlock between read and mmap calls" into cm-11.0
mm: ashmem: Add cache clean and invalidate ioctls for ashmem

Change-Id: I9475feb06c961cb8b27b434eaf3b54d2666331d4
Orig-Change-Id: Idc120f9f869c1a68e5f012327aa7f599ac065fce
CRs-fixed: 291124
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
mm: ashmem: Make sure vma is valid while flushing

Ensure that the vma that the ashmem region is tied to
is valid before flushing and hold the mm semaphore so
that the vma does not get destroyed from under while
it's being flushed.

Change-Id: I5216aa3a4fa983f97909c1132d12abe777f60530
CRs-Fixed: 326685
Orig-Change-Id: I86320ffe9e6570e6ffa7dda68ab26be7aed86afd
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
lowmemorykiller: skip already freed memory

Change-Id: I1cb221ff7dad399b3b57817706812561f67c6707
msm: fix "Section mismatch" errors and "already free irq" panic for Tass LCD panel

Change-Id: I1bab9c7f63461466cbca28012160e46fe9f6195f
net: backport Adaptive RED Net Scheduler from 3.4 kernel

Change-Id: I9f520e0227f9cca8a592edac658d8577fd79d9af
binfmt_elf.c: use get_random_int() to fix entropy depleting.

Usually the entropy pool depletes very fast and stays in the 100-200 range.
After this patch, the entropy stays in the 600-1000 range without the risk of
depleting in normal workloads.

Change-Id: Ice0d0f14691046249d7b4a4d31af98ab80c6306b
cpufreq: update Ondemand governor from experimental-3.10 kernel

Change-Id: Idbac8ae56c5b304d43c2baf4d73e49b8b58f455c
Merge "cpufreq: update Ondemand governor from experimental-3.10 kernel" into cm-11.0
Merge "binfmt_elf.c: use get_random_int() to fix entropy depleting." into cm-11.0