Merge remote-tracking branch 'caf/LA.AF.1.1_rb1.7' into cm-12.0

Conflicts:
	drivers/misc/qseecom.c
	fs/proc/task_mmu.c
	include/net/tcp.h
	net/ipv4/syncookies.c
	net/ipv6/route.c
	net/ipv6/tcp_ipv6.c

Change-Id: I8a953e9f483a24ee45f5e1c570b6a4f92e87c6e9
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs

With this change, calling
  prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time.  For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set.  The same is true for file capabilities.

Additionally, LSM_UNSAFE_NO_NEW_PRIVS is defined to ensure that
LSMs respect the requested behavior.

To determine if the NO_NEW_PRIVS bit is set, a task may call
  prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0);
It returns 1 if set and 0 if it is not set. If any of the arguments are
non-zero, it will return -1 and set errno to -EINVAL.
(PR_SET_NO_NEW_PRIVS behaves similarly.)

This functionality is desired for the proposed seccomp filter patch
series.  By using PR_SET_NO_NEW_PRIVS, it allows a task to modify the
system call behavior for itself and its child tasks without being
able to impact the behavior of a more privileged task.

Another potential use is making certain privileged operations
unprivileged.  For example, chroot may be considered "safe" if it cannot
affect privileged tasks.

Note, this patch causes execve to fail when PR_SET_NO_NEW_PRIVS is
set and AppArmor is in use.  It is fixed in a subsequent patch.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Will Drewry <wad@chromium.org>
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>

Change-Id: I2159006d20daefe6add5adc47c22bdbcd7d79e3a
v18: updated change desc
v17: using new define values as per 3.4
Signed-off-by: James Morris <james.l.morris@oracle.com>
selinux: Report permissive mode in avc: denied messages.

We cannot presently tell from an avc: denied message whether access was in
fact denied or was allowed due to global or per-domain permissive mode.
Add a permissive= field to the avc message to reflect this information.

Change-Id: I0281c366d0815addd5b22b26d266a18a743c53f5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
msm: msm_fb: delete cabc/sre update timers on power down

Change-Id: I2b670e2bf225d54ee999ec43007d0abb998fcb1b
Merge remote-tracking branch 'upstream/cm-12.0' into cm-12.0