Add security hooks to binder and implement the hooks for SELinux.

Add security hooks to the binder and implement the hooks for SELinux.
The security hooks enable security modules such as SELinux to implement
controls over binder IPC.  The security hooks include support for
controlling what process can become the binder context manager
(binder_set_context_mgr), controlling the ability of a process
to invoke a binder transaction/IPC to another process (binder_transaction),
controlling the ability a process to transfer a binder reference to
another process (binder_transfer_binder), and controlling the ability
of a process to transfer an open file to another process (binder_transfer_file).

This support is used by SE Android, http://selinuxproject.org/page/SEAndroid.

Change-Id: I9a64a87825df2e60b9c51400377af4a9cd1c4049
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Enable setting security contexts on rootfs inodes.

rootfs (ramfs) can support setting of security contexts
by userspace due to the vfs fallback behavior of calling
the security module to set the in-core inode state
for security.* attributes when the filesystem does not
provide an xattr handler.  No xattr handler required
as the inodes are pinned in memory and have no backing
store.

This is useful in allowing early userspace to label individual
files within a rootfs while still providing a policy-defined
default via genfs.

Change-Id: Ic45e49fd98b737faccc8bac694ee35660a108c39
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Do not ratelimit audit messages. We want to see them all.

Change-Id: I19c29788cc33b0f59e0bdfe04fe67c247239c559
Apexq: fix byte overflow cause excess blue at about 80% brightness.

This solves an issue with blue flare at about 80% brightness level.

Change-Id: If89854a1a6d34bdf25a0a5e9b12bb81bec17dc41
Merge tag 'AU_LINUX_ANDROID_JB_2.6.04.03.00.109.012' of git://codeaurora.org/kernel/msm into cm-10.2

Conflicts:
	drivers/video/msm/vidc/common/enc/venc.c

Change-Id: Ie7818e5e7c868a1e57cd8ad016997b595fdfa039
Merge branch 'linux-3.4.y' of git://git.kernel.org/pub/scm/linux/kernel/git/

Conflicts:
	drivers/virtio/virtio_ring.c
	include/linux/virtio.h

Change-Id: If7d448337183f38ab838bdffd0daa8595ce0feb0

Conflicts:
	Makefile
Apexq: Update panel color offset application.

Corrects overflow errors due to inappropriate assumptions
made regarding the way that char's overflow. Taken from jf.

Change-Id: I9126b4fc698800a93d4cafad24f134b339130eaf
ApexQ: minor usb fix

power_supply.h has 14 types on this kernel

Change-Id: I6e264cf6208c5c1b4753ddf4d71c0f5f9bb0912d
msm: display: command mode panel release fence

For command mode panel, release fence should be signaled after the buffer is
sent to the panel.  For performance consideration, allow one more commit to be
queued.  Keep the second kick off as short as enough.

Change-Id: I19af075ebf480d3e81b46b1cd2ef21a2893f143e
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
msm: mdp: Change msmfb kworker to kthread

This worker can be a longer running task depending on the number
of frames queued, hence change it to a thread.

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Change-Id: Iebf7e95d0486ac43aa6a12d70442936600c0249a
msm: mdp: Update sync pt. behaviour

Add a retire fence and clean up the existing release fence
implementation

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Change-Id: Iecf7e95d0786ac43aa6a12d70442936600c0249a
msm: kgsl: Use the kmalloc/vmalloc trick for the sharedmem page array

It was previously assumed that most GPU memory allocations would be
small enough to allow us to fit the array of page pointers into one
or two pages allocated via kmalloc.  Recent reports have proven
those assumptions to be wrong - allocations on the order of 32MB will
end up trying to get 8 pages from kmalloc and 8 contiguous pages
on a busy system are a rare beast indeed.

So use the usual kmalloc/vmalloc trick instead - use kmalloc for the
page array when we can and vmalloc if we can't.

CRs-fixed: 513469
Change-Id: Ic0dedbad0a5b14abe6a8bd73342b3e68faa8c8b7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
ASoC: msm: Reduce min buffer size for low latency

The current low latency driver has 512 bytes as
the min buffer size threshold. With this reducing
the playback time to lower values is not possible.
Setting it to 128 bytes gives us more room
to try out lower buffer sizes from the user space

Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
ASoC: msm: Change QOS value for low latency path

There were variations in the time taken to
return from each write. This was due
to the delay in switching in and out of
power collapse. To manage this set QOS
value to 1ms so that the core has enough
time to wake up from power collapse

Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Revert "ASoC: msm: Decrease the playback period size of PCM driver"

This reverts commit b0580099ac7d5e735fb42946612a499bf196cda1.

Change-Id: I487797334cf75978daa3c536ff92de8a54b1f7fb
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
ASoC: msm: Flexible period size for pcm playback

PCM driver was configured for fixed buffer
size on the playback path. With this, varying
the buffer sizes on the playback path was not
possible. To fix this, support for flexible
period sizes is added by setting different
values for min and max buffer sizes

Change-Id: I7f69db4940f67e5e3a795101af1b1682afbdb530
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Prima 3.2.3.158

Change-Id: If5cecbb2f8d8f87dcbae39b85cc2e08298ed8ca2
apexq: update defconfig

Change-Id: Ie635bc439c4df942635a011771097abdf00421b0
Apexq: fix charger current reporting error bq24157.

Somebody at samsung didn't read the documentation.
When the current limit was set for 950, it read out
as 900. When the current limit was set for 500, it
read out as 100. This charger does not permit any
fast charge current limit to be set for under 550 mA.

Change-Id: I98d5a302d17bfcb5a942f5a66752f34dcfff40fc
msm: usbaudio: Fix memory allocation for USB audio module init

Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>