Squashed commit of the following binder cherry-picks:

commit f531bdf01369b1c587db9d5bca73ce759e5c0d63
Author: Stephen Smalley <sds@tycho.nsa.gov>
Date:   Thu Nov 15 14:01:44 2012 -0500

    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: I6ec460ede8e07dadc9f52b61534b2b0021617302

commit a344b540916504be361c0f73cb157ff38ac93d5f
Author: Sultanxda <sultanxda@gmail.com>
Date:   Mon Oct 14 22:25:25 2013 -0700

    Add permission checking for binder IPC.

    Change-Id: Ia224e29427d39a6eeb0800a65ad2a8df2e91bebc

    Conflicts:
    	drivers/staging/android/binder.c

    Conflicts:
    	drivers/staging/android/binder.c
    	include/linux/security.h
    	security/capability.c
    	security/security.c
    	security/selinux/hooks.c
    	security/selinux/include/classmap.h

commit e38bdcc6a171719b57e4de0204114ab0f5b09f42
Author: Sultanxda <sultanxda@gmail.com>
Date:   Sun Apr 28 15:27:09 2013 -0700

    Fixed compile error

commit 34c0ad7e668e0afa84443604ed3537b5406480db
Author: Sultanxda <sultanxda@gmail.com>
Date:   Mon Oct 14 22:20:51 2013 -0700

    Staging: android: binder: Fixed multi-line strings

    Changed all user visible multi-line strings to single line.
    Removed 'binder:' prefix on stings.

    Signed-off-by: Anmol Sarma <unmole.in@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

    Conflicts:
    	drivers/staging/android/binder.c

    Conflicts:
    	drivers/staging/android/binder.c

commit 6f63d420566213cb88336661e9c6aa41bdf5f7d1
Author: Arve Hjønnevåg <arve@android.com>
Date:   Tue Oct 16 15:29:52 2012 -0700

    Staging: android: binder: Add some missing binder_stat_br calls

    Cached thread return errors, death notifications and new looper
    requests were not included in the stats.

    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 41e4d99aeec151bfa0f708f557d50adc3d0b9917
Author: David Howells <dhowells@redhat.com>
Date:   Fri Feb 24 10:57:07 2012 +0000

    fs: Remove missed ->fds_bits from cessation use of fd_set structs internally

    Stephen Rothwell reported that the following commit broke the
    linux-next build:

      1fd36adcd98c: Replace the fd_sets in struct fdtable with an array of unsigned longs

    Fix places where ->fds_bits needed to be removed as the core
    kernel no longer uses fd_set internally for file descriptor
    table management.  There are two places:

     (1) drivers/staging/android/binder.c

     (2) arch/mips/kernel/kspd.c

         Question: Should sp_cleanup() in the MIPS arch be using find_next_bit()
         or fls()?

    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Ralf Bächle <ralf@linux-mips.org>
    cc: Arve Hjønnevåg <arve@android.com>
    Link: http://lkml.kernel.org/r/20120224105707.32170.11550.stgit@warthog.procyon.org.uk
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit bc1093bd4629e6cd39d3b023deb5cfd0e2d40d59
Author: Sultanxda <sultanxda@gmail.com>
Date:   Mon Oct 14 22:18:03 2013 -0700

    Wrap accesses to the fd_sets in struct fdtable

    Wrap accesses to the fd_sets in struct fdtable (for recording open files and
    close-on-exec flags) so that we can move away from using fd_sets since we
    abuse the fd_set structs by not allocating the full-sized structure under
    normal circumstances and by non-core code looking at the internals of the
    fd_sets.

    The first abuse means that use of FD_ZERO() on these fd_sets is not permitted,
    since that cannot be told about their abnormal lengths.

    This introduces six wrapper functions for setting, clearing and testing
    close-on-exec flags and fd-is-open flags:

    	void __set_close_on_exec(int fd, struct fdtable *fdt);
    	void __clear_close_on_exec(int fd, struct fdtable *fdt);
    	bool close_on_exec(int fd, const struct fdtable *fdt);
    	void __set_open_fd(int fd, struct fdtable *fdt);
    	void __clear_open_fd(int fd, struct fdtable *fdt);
    	bool fd_is_open(int fd, const struct fdtable *fdt);

    Note that I've prepended '__' to the names of the set/clear functions because
    they require the caller to hold a lock to use them.

    Note also that I haven't added wrappers for looking behind the scenes at the
    the array.  Possibly that should exist too.

    Signed-off-by: David Howells <dhowells@redhat.com>
    Link: http://lkml.kernel.org/r/20120216174942.23314.1364.stgit@warthog.procyon.org.uk
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

    Conflicts:
    	fs/open.c

commit cd33fd92a07630f7848905895d00c19645a3d1fa
Author: stratosk <stratosk@semaphore.gr>
Date:   Mon Apr 8 18:52:50 2013 +0300

    userns: Convert binder ipc to use kuids

    Cc: Arve Hjønnevåg <arve@android.com>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

commit 341fff6565d55204346b284dfca9e4682075ce06
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Wed Aug 15 18:23:36 2012 -0400

    binder: don't allow mmap() by process other than proc->tsk

    we really shouldn't do get_files_struct() on a different process
    and use it to modify the sucker later on.

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 0d0a2d5c6a37e009c9dffb254c6c7cac00be8e13
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Aug 17 16:39:37 2012 +0530

    Staging: android: binder: Remove an inconsequential conditional macro

    Removes an inconsequential conditional macro.

    Cc: Arve Hjønnevåg <arve@android.com>
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 64f985d27c55066449353c6a22b54cf185d19c85
Author: Sachin Kamat <sachin.kamat@linaro.org>
Date:   Fri Aug 17 16:39:36 2012 +0530

    Staging: android: binder: Make task_get_unused_fd_flags function static

    Silence the following warning:
    drivers/staging/android/binder.c:368:5: warning:
    symbol 'task_get_unused_fd_flags' was not declared. Should it be static?

    Cc: Arve Hjønnevåg <arve@android.com>
    Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 87ee2cd89defadeedf733654c4cf3e53a2501539
Author: Sultanxda <sultanxda@gmail.com>
Date:   Mon Oct 14 22:15:38 2013 -0700

    drivers: staging: android: binder.c: fix printk macros

    Change printk() messages to pr_* macros.

    Signed-off-by: Sherwin Soltani <sherwin@wybc.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

    Conflicts:
    	drivers/staging/android/binder.c

commit 8594bb01e1bf1bddc0963789b13eaa2dc674fea2
Author: Arve Hjønnevåg <arve@android.com>
Date:   Thu Mar 8 15:43:36 2012 -0800

    Staging: android: binder: Fix use-after-free bug

    binder_update_page_range could read freed memory if the vma of the
    selected process was freed right before the check that the vma
    belongs to the mm struct it just locked.

    If the vm_mm pointer in that freed vma struct had also been rewritten
    with a value that matched the locked mm struct, then the code would
    proceed and possibly modify the freed vma.

    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 065ada24008a289a5a6dd4025ab9a16f59ed7ce0
Author: Arve Hjønnevåg <arve@android.com>
Date:   Wed Feb 1 23:29:13 2012 +0000

    Staging: android: binder: Fix crashes when sharing a binder file between processes

    Opening the binder driver and sharing the file returned with
    other processes (e.g. by calling fork) can crash the kernel.
    Prevent these crashes with the following changes:
    - Add a mutex to protect against two processes mmapping the
      same binder_proc.
    - After locking mmap_sem, check that the vma we want to access
      (still) points to the same mm_struct.
    - Use proc->tsk instead of current to get the files struct since
      this is where we get the rlimit from.

    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

    Conflicts:
    	drivers/staging/android/binder.c

commit 0fecba48b0c25c57503c88c5f04a0ae5d50813b1
Author: Zhengwang Ruan <ruan.zhengwang@gmail.com>
Date:   Wed Mar 7 10:36:57 2012 +0800

    Staging:android: Change type for binder_debug_no_lock switch to bool

    GCC warns that module_param_named() indirectly returns a bool type value
    which is different from 'int' type binder_debug_no_lock declared. Change
    it to bool because it is a internal switch for debugging.

    Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: stratosk <stratosk@semaphore.gr>

commit 3a7961ad37228a6207be652cbc4138311dd52378
Author: Cruz Julian Bishop <cruzjbishop@gmail.com>
Date:   Sat Dec 22 09:00:45 2012 +1000

    staging: android: Fix two checkpatch issues in binder.c

    This fixes two instances of
    "static const char * array should probably be static const char * const"

    I have seen other commits doing this in other files, so I am
    assuming it should be done here as well.

    Please tell me if this is wrong :)

    Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    Conflicts:
    	drivers/staging/android/binder.c

commit aae64c177d86224576bb10484c687f203d58b607
Author: Arve Hjønnevåg <arve@android.com>
Date:   Tue Oct 16 15:29:55 2012 -0700

    Staging: android: binder: Allow using highmem for binder buffers

    The default kernel mapping for the pages allocated for the binder
    buffers is never used. Set the __GFP_HIGHMEM flag when allocating
    these pages so we don't needlessly use low memory pages that may
    be required elsewhere.

    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3b4cfe858bf0ac9412ee8d0c6e282c217152a732
Author: Arve Hjønnevåg <arve@android.com>
Date:   Tue Oct 16 15:29:54 2012 -0700

    Staging: android: binder: Fix memory leak on thread/process exit

    If a thread or process exited while a reply, one-way transaction or
    death notification was pending, the struct holding the pending work
    was leaked.

    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2af26ab2e4ae7b51fa69491d514de758b63b2ad5
Author: Kasper Hettinga <kasper.hettinga@gmail.com>
Date:   Sat Apr 6 08:54:52 2013 +0200

    Set of improvements to Staging-binder

    This is a squash of the following commits:
    ____________________________________________________
    Staging: android: fixed a space warning in binder.h

    Signed-off-by: Marco Navarra <fromenglish@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ____________________________________________________
    Staging: android: binder: Don't call dump_stack in binder_vma_open
    Staging: android: binder: Fix crashes when sharing a binder file between processes
    Staging: android: binder: Fix memory leak on thread/process exit
    Staging: android: binder: Allow using highmem for binder buffers
    Staging: android: binder: Fix use-after-free bug

    Signed-off-by: Arve HjÃ¸nnevÃ¥g <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ____________________________________________________
    staging: android: Fix two checkpatch issues in binder.c
    staging: android: Avoid using camelcase in binder.h

    Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ____________________________________________________

    Change-Id: I84d974702329bd083e57bf3c95a0123ba6504d8c