include: Add a missing file

Change-Id: I228983c447b38e1ec1ca934ddcc0cd09342e90ed
deb: mdm: Implement RESET_CHARM in the ioctl function.

Use RESET_CHARM to do subsystem-restart.

Change-Id: I90adbfcad310d7f1c95c93cc4f713ca282456060
Signed-off-by: tzuhsuan_chen <tzuhsuan_chen@asus.com>
staging: android: ashmem: Avoid deadlock with mmap/shrink

Both ashmem_mmap and ashmem_shrink take the ashmem_lock. It may
be possible for ashmem_mmap to invoke ashmem_shrink:

-000|mutex_lock(lock = 0x0)
-001|ashmem_shrink(?, sc = 0x0) <--- try to take ashmem_mutex again
-002|shrink_slab(shrink = 0xDA5F1CC0, nr_pages_scanned = 0, lru_pages
-002|=
-002|124)
-003|try_to_free_pages(zonelist = 0x0, ?, ?, ?)
-004|__alloc_pages_nodemask(gfp_mask = 21200, order = 1, zonelist =
-004|0xC11D0940,
-005|new_slab(s = 0xE4841E80, ?, node = -1)
-006|__slab_alloc.isra.43.constprop.50(s = 0xE4841E80, gfpflags =
-006|2148925462, ad
-007|kmem_cache_alloc(s = 0xE4841E80, gfpflags = 208)
-008|shmem_alloc_inode(?)
-009|alloc_inode(sb = 0xE480E800)
-010|new_inode_pseudo(?)
-011|new_inode(?)
-012|shmem_get_inode(sb = 0xE480E800, dir = 0x0, ?, dev = 0, flags =
-012|187)
-013|shmem_file_setup(?, ?, flags = 187)
-014|ashmem_mmap(?, vma = 0xC5D64210) <---- Acquire ashmem_mutex
-015|mmap_region(file = 0xDF8E2C00, addr = 1772974080, len = 233472,
-015|flags = 57,
-016|sys_mmap_pgoff(addr = 0, len = 230400, prot = 3, flags = 1, fd =
-016|157, pgoff
-017|ret_fast_syscall(asm)
-->|exception
-018|NUR:0x40097508(asm)
---|end of frame

Avoid this deadlock by using mutex_trylock in ashmem_shrink; if the mutex
is already held, do not attempt to shrink.

Change-Id: I222bbf55856d5849da813b730de0636c80966c8e
Reported-by: Matt Wagantall <mattw@codeaurora.org>
Reported-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Reported-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Reported-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1)

If uaddr == uaddr2, then we have broken the rule of only requeueing from
a non-pi futex to a pi futex with this call.  If we attempt this, then
dangling pointers may be left for rt_waiter resulting in an exploitable
condition.

This change brings futex_requeue() in line with futex_wait_requeue_pi()
which performs the same check as per commit 6f7b0a2a5c0f ("futex: Forbid
uaddr == uaddr2 in futex_wait_requeue_pi()")

[ tglx: Compare the resulting keys as well, as uaddrs might be
  	different depending on the mapping ]

Fixes CVE-2014-3153.

Change-Id: I005cd643afde4aff64b487ed02324669bbadd148
Reported-by: Pinkie Pie
Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
flo: merge branch 'android-msm-flo-3.4-kitkat-mr2'

Squashed commit of the following:

commit 03485a63505ab9b25df1884c0ef92982be192223
commit 2e4946a60e539d649fcce01cf55d642dd720cfaf
commit e513e6f36a82ecad02797ea53d1bb6eacea0f8a1
commit f2db089ac8e3f6832596be74df3a4ae8cba47bef
commit 4b156207a026940f6c8f66c1b8f305e63fdee15d
commit 67acf1f09b9e16bcb113d7f629d604edfa5ab8a1
commit 154225a0b35ac8a18e6ce49d1e3780946f80eba2
commit 36eb1e171d340f301d416d66eb312ba4cc6a64dc
commit 26f062e80d31d925b2870c73551b49c09717a57a
commit cfe519425c7dfda3d764ce06710e80d08703810f
commit a485048325fae8859ca2b376e86ed1b16ce74111
commit dbb87f48782c059a82abfe2e3fcbc2cf7e0c6074
commit 7508f158f05e1e911828ecb8f79229577006f8e5
commit 46a4286c205fe24bf74e39056f9273e863cfda60
commit d650d9d57d5fda80a4f2f008894614d4a6029058
commit 566be020a7ad104bdba37c55e04a8e1a5be2cfce
commit 47ffde4d191deadad205454d430b1bfb14db5ccb
commit ab9ff8d565d783d19035da9ed6a34e6630e39102
commit f914bf18a19ca36a71d545990c2b6eb8582c88ed
commit c15d2bff5e39467a6cce73b3445cb621a873596e
commit 509a910962cffbe82d8ddb884f789e595f23bb39
commit 46ddac57f76947e8be7ed2b4462dc9347fc17639
commit ac9222cf61b2646a1862fb222365e52a0d1c498d
commit 142f315b1fac51d07b9693c68a202c3a0211d965
commit db8bac79346d40eb786cd54a424fd2e8e3316051
commit 6b52b61f92b152e58ffc956753d3844c3ed7da00
commit 8533ea5918d9cf88b6a48c3167c097bd32a3b813
commit 8aa1d8469172e13f1d27f53ba0f461c7184d8f50
commit dc67ad4656a3f89e57a1488aea1e6569b11a7239
commit 1bd3e73b679d69770cf7caa31ec610b4212d6aa3
commit 80c8e829b20667d547dbddb9f3b396dcb95c79fb
commit 16a09d7e31c2ff5cc8dd5e0ec87ab68d91d0a254
commit cd5b15c8b85ed37c92e30f261465ffaa86c265cd
commit cfe51cf7a7b3872422a31ab3d4dd08deaa55b5ac
commit 7c8d00ffff577a0177c217da7789d16f004c5df8
commit c13b8e14788c779646e3c858bf9e22c271272ade
commit b60cd31fc36fb95f810c843109cab358d12e341c
commit 00acad4065e81cb19a9a270cac2ff496ce57ea63
commit 0f98967daa0979fbcd998c256cfcf9708b6acca1
commit 328ee785f8430c858b20af47e436493144e6abd4
commit 6fa1fe7eb46ee41a076cafb85157c0125a613ba8
commit 9c7966d4440bd6df10f3638545c3e3cb52b5b56c
commit 1b3aadfe27d54c71d3f50042109023828d2b9ada
commit e7e0508ea7bbd3026d1f72d5cf9e679c934bc222
commit af2f3c6ec8f539dfe823bcabc662c9a4965b6f57
commit 058935190048f5513c0adb278ed7b39017bacb10
commit f6447215c1454fc53e11da0720a06afb657fe263
commit 78230996357e73ae2dc7bf185a5b7e828aa7293a
commit 983d37aa1723ef70a84c7a6a074adc4a58eaee8b
commit 5149a5e2c3873650524fb9ad66f3a9670c38d501
commit ec7e738fc5f21a55cd94d358bd7a1898d674bdb6
commit 7a8fee787091abe9326188181062b69349349e4a
commit baed9f57c5bd5682fc8eabd9d14409a8e71083e0
commit dc89b65747d377aad6afca1f21e3959a81e57e15
commit 4db6746941e6ac1a69cf68b626392c9d250cbf21

Change-Id: I4750072df5f07403b09834eb24dbb24424e5af8d
Revert "flo: merge branch 'android-msm-flo-3.4-kitkat-mr2'"

This reverts commit 388b2b8cb48f2771a81ade7a5bc41cb5d13d28bd.

going to perform non-squashed merge

Change-Id: I4bf44921310812b75902647516f62ae94bff1697
mdp: flo: Set minimum IB value for 4 layers

For 4 layer MDP composition, if the total composed area
doesn't cover the whole screen, there is a potential hole
in our calculation where we don't request enough bandwidth
especially for larger displays such as flo.
Pin the minimum bandwidth to ~1.6G (empirical) to fix this.

Bug: 10954796
Change-Id: I7a3de0ac82326271202833d5e79d851d871eeabf
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Revert "mdp: flo: Set minimum IB value for 4 layers"

This reverts commit d93dd121b067a91725c252895957518e154ff55f.

Change-Id: If6a76efb7338220204c5448e0f780c2d79896bd8
flo: Merge remote-tracking branch 'aosp/android-msm-flo-3.4-kitkat-mr2' into work
Merge remote-tracking branch 'aosp/android-msm-flo-3.4-l-preview' into android-5.0
Merge remote-tracking branch 'aosp/android-msm-flo-3.4-lollipop-release' into android-5.0
ion: Hack headers mismatch

Change-Id: I68db9ba1e5aaaa8ab36e46dd4150edc0e1b95a17