netfilter: qtaguid: rate limit some of the printks

Some of the printks are in the packet handling path.
We now ratelimit the very unlikely errors to avoid
kmsg spamming.

Signed-off-by: JP Abgrall <jpa@google.com>
Add permission checking for binder IPC.

Do not apply permission checks to private files.

Fix security_binder_transfer_binder hook.

Drop the owning task argument to security_binder_transfer_binder
since ref->node->proc can be NULL (dead owner?).
Revise the SELinux checking to apply a single transfer check between
the source and destination tasks.  Owning task is no longer relevant.
Drop the receive permission definition as it is no longer used.

This makes the transfer permission similar to the call permission; it is only
useful if you want to allow a binder IPC between two tasks (call permission)
but deny passing of binder references between them (transfer permission).

Change-Id: I51e7a9a6662e826073b35e4f70a57f9ec73e472e
Signed-off-by: William Roberts <w.roberts@sta.samsung.com>

Conflicts:

	drivers/staging/android/binder.c
msm: kgsl: Do not check for hang when graphics core is idle

GPU hang detection logic checks register values every 2 seconds
and determines a hang if there is no change in the register values
after 2 seconds. When GPU core is idle the register values do not
change, hang detection logic should be disabled to prevent
false hangs being detected.

CRs-fixed: 402818
Change-Id: I6bd9085879fcafda9ca322221ba93e6a6ca5043c
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Fix adreno idle detection during hang

Adreno idle detection during a hang was being obstructed when
called from adreno_waittimestamp(). The variable active_cnt which
was meant to protect the device from going into suspend while
doing a waittimestamp was being set and was preventing the
check of rbbm_status register which was leading to a false hang
detection, where, if the rbbm_status register value had been
probed the device would have been found to be idle. We fix this by
having a separate function is_adreno_rbbm_status_idle() which checks
this register and report whether the core is idle or not. And we call
this function instead of the generic adreno_isidle() inside
adreno_hang_detect(). Doing this fixes at least one scenario of false
hang detection.

(cherry picked from commit 91eec5b869d9d187ddab2651449acfe929b3622a)

Change-Id: Id8630d304e53ce1d17d7dcc61138a3230d075ab9
CRs-fixed: 406631
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
msm: kgsl: Turn off the CP_DEBUG dynamic clock

The CP dynamic clock seems to be glitchy when the CP clocks are turned
back on after a power event. Turn off said dynamic clock control at
init time. The impact of leaving the dynamic clock control off is
negligible since the CP clock is only on when the CP is actually in
use.

(cherry picked from commit ed201aa291dfe13629d8c6cfa1d6e6f229b0c3c2)

Change-Id: Id383ba64bbb665abd2a58539c642f36e958cdaea
CRs-fixed: 402119
CRs-fixed: 409253
CRs-fixed: 413224
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
v2.3
Merge branch 'cm-10.1' of github.com:lyfkevin/lge-kernel-iproj into cm-10.1