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>

v18: updated change desc
v17: using new define values as per 3.4

Conflicts:
	include/linux/prctl.h
	kernel/sys.c

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "msm: kgsl: Report GPU frequency correctly in sysfs"

This reverts commit 3ac6d78394bc11391a30de4df0fc0279cb48ce00.
Revert "msm: kgsl: Wake up GPU only for touch events"

This reverts commit ea7117e55dc8def5c9aba21da4ed39dcb140a809.
Revert "msm: kgsl: Schedule adreno_start in a high priority workqueue"

This reverts commit 00490131fb048787460e500a42c779dc6fdf6e2e.
Revert "msm: kgsl: Fix nice level for higher priority GPU start thread"

This reverts commit fadaa049ede09223cd9e3ca9eaa2b7bd9b167e26.
Revert "msm: kgsl: Add an input handler to power up the GPU on a touch event"

This reverts commit 92311dc1ec496eddea3e2992624cad50bd876270.
Revert "msm: kgsl: Allow GPU start to run in a high priority queue"

This reverts commit 248ac6316aafb1c6a2803bdb729ac28ee0b6de9a.