smdk4412: 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: Ieeb5485c94d8b0074fc112302c81f39ff1e4bf75
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>
d710: build stage2 initramfs into kernel

Change-Id: I2c3f9dee52cd1241eb576a73893f8d8cf55bbe76
mach-exynos: cpufreq: Show list of available frequencies

This patch enables 'scaling_available_frequencies' attribute
showing list of available frequencies.

Change-Id: I9b6ad786ffaaba8ad6fe5aa9045fd793c095b5ae
smdk4412: don't use threaded vsync

The gralloc for smdk4412 waits for vsync. Having
threaded vsync in this case would be problematic
provided our gralloc implementation is different
from that of samsung.

Change-Id: I6c9a84c2bd00a43b47d86647829b9010367dca5d

Conflicts:

	arch/arm/configs/cyanogenmod_i9300_defconfig
smdk4412: merge mali r4p0 driver

Change-Id: Ief824b1dce642fd2133900cd2b0f108fbfa89b1c

Conflicts:

	arch/arm/configs/cyanogenmod_i9300_defconfig
	drivers/gpu/mali400/r3p2/mali/common/mali_kernel_mem_os.c
n7100: switch to mali r4p0

Change-Id: Iab8351fed67e3db3ce7676a7c01d4a73e63dbe54

Conflicts:

	arch/arm/configs/cyanogenmod_n7100_defconfig
mali400: use pegasus platform code from r3p2

r3p2 pegasus platform code has midas specific changes for
DVFS and also better support for Exynos4212.

This slightly improved the performance of the GPU.

Change-Id: I2ad903cd868e5c6bf1ce176aa43dfd056c19e5fc
n7100: disable threaded vsync

Change-Id: Ia8d7b7a08421e0a1798783f5d43127ed2fbb7d5b

Conflicts:

	arch/arm/configs/cyanogenmod_n7100_defconfig
Asynchronous I/O latency to a solid-state disk greatly increased
between the 2.6.32 and 3.0 kernels. By removing the plug from
do_io_submit(), we observed a 34% improvement in the I/O latency.

Unfortunately, at this level, we don't know if the request is to
a rotating disk or not.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: linux-aio@kvack.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>

Change-Id: Ida3aaade7ec1f3429be142d9f5a380eac992176c
cpufreq: update governors

Change-Id: I8251b29369bac693560f68251045a9689d0e40ce

Conflicts:

	drivers/cpufreq/cpufreq_pegasusq.c
add extra free kbytes tunable

Add a userspace visible knob to tell the VM to keep an extra amount
of memory free, by increasing the gap between each zone's min and
low watermarks.

This is useful for realtime applications that call system
calls and have a bound on the number of allocations that happen
in any short time period.  In this application, extra_free_kbytes
would be left at an amount equal to or larger than than the
maximum number of allocations that happen in any burst.

It may also be useful to reduce the memory use of virtual
machines (temporarily?), in a way that does not cause memory
fragmentation like ballooning does.

[ccross]
Revived for use on old kernels where no other solution exists.
The tunable will be removed on kernels that do better at avoiding
direct reclaim.

Change-Id: I765a42be8e964bfd3e2886d1ca85a29d60c3bb3e
Signed-off-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Colin Cross <ccross@android.com>
mm: fix extra_free_kbytes tunable for CMA

Change-Id: Ib707811881c6e2c8fd1033b522d05a7249da7247