1. 17 7月, 2017 29 次提交
  2. 02 3月, 2017 2 次提交
  3. 25 2月, 2017 1 次提交
  4. 23 2月, 2017 1 次提交
  5. 10 2月, 2017 7 次提交
    • M
      binder: Add support for file-descriptor arrays · def95c73
      Martijn Coenen 提交于
      This patch introduces a new binder_fd_array object,
      that allows us to support one or more file descriptors
      embedded in a buffer that is scatter-gathered.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      def95c73
    • M
      binder: Add support for scatter-gather · 7980240b
      Martijn Coenen 提交于
      Previously all data passed over binder needed
      to be serialized, with the exception of Binder
      objects and file descriptors.
      
      This patchs adds support for scatter-gathering raw
      memory buffers into a binder transaction, avoiding
      the need to first serialize them into a Parcel.
      
      To remain backwards compatibile with existing
      binder clients, it introduces two new command
      ioctls for this purpose - BC_TRANSACTION_SG and
      BC_REPLY_SG. These commands may only be used with
      the new binder_transaction_data_sg structure,
      which adds a field for the total size of the
      buffers we are scatter-gathering.
      
      Because memory buffers may contain pointers to
      other buffers, we allow callers to specify
      a parent buffer and an offset into it, to indicate
      this is a location pointing to the buffer that
      we are fixing up. The kernel will then take care
      of fixing up the pointer to that buffer as well.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      [jstultz: Fold in small fix from Amit Pundir <amit.pundir@linaro.org>]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7980240b
    • M
      binder: Add extra size to allocator · 4bfac80a
      Martijn Coenen 提交于
      The binder_buffer allocator currently only allocates
      space for the data and offsets buffers of a Parcel.
      This change allows for requesting an additional chunk
      of data in the buffer, which can for example be used
      to hold additional meta-data about the transaction
      (eg a security context).
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bfac80a
    • M
      binder: Refactor binder_transact() · a056af42
      Martijn Coenen 提交于
      Moved handling of fixup for binder objects,
      handles and file descriptors into separate
      functions.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a056af42
    • M
      binder: Support multiple /dev instances · ac4812c5
      Martijn Coenen 提交于
      Add a new module parameter 'devices', that can be
      used to specify the names of the binder device
      nodes we want to populate in /dev.
      
      Each device node has its own context manager, and
      is therefore logically separated from all the other
      device nodes.
      
      The config option CONFIG_ANDROID_BINDER_DEVICES can
      be used to set the default value of the parameter.
      
      This approach was favored over using IPC namespaces,
      mostly because we require a single process to be a
      part of multiple binder contexts, which seemed harder
      to achieve with namespaces.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      [jstultz: minor checkpatch warning fix]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac4812c5
    • M
      binder: Deal with contexts in debugfs · 14db3181
      Martijn Coenen 提交于
      Properly print the context in debugfs entries.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      14db3181
    • M
      binder: Support multiple context managers · 342e5c90
      Martijn Coenen 提交于
      Move the context manager state into a separate
      struct context, and allow for each process to have
      its own context associated with it.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Serban Constantinescu <serban.constantinescu@arm.com>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Cc: Rom Lemarchand <romlem@google.com>
      Cc: Android Kernel Team <kernel-team@android.com>
      Signed-off-by: NMartijn Coenen <maco@google.com>
      [jstultz: Minor checkpatch fix]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      342e5c90