Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
On Thu, Aug 31, 2017 at 1:32 PM, Peter Zijlstra wrote: > AFAIK people are actively working on fixing that. SCHED_DEADLINE was definitely looked at in the past. We certainly don't use it on our own devices in Android Oreo, and I am not aware of any current plans to use it.

Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
On Thu, Aug 31, 2017 at 1:32 PM, Peter Zijlstra wrote: > AFAIK people are actively working on fixing that. SCHED_DEADLINE was definitely looked at in the past. We certainly don't use it on our own devices in Android Oreo, and I am not aware of any current plans to use it. But the Android org is

Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra wrote: > You fail to support SCHED_DEADLINE, that's not optional. The reason I didn't include it is that we don't use SCHED_DEADLINE in Android userspace. Can we add support for this in a follow-up patch, or do you consider

Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
On Thu, Aug 31, 2017 at 10:18 AM, Peter Zijlstra wrote: > You fail to support SCHED_DEADLINE, that's not optional. The reason I didn't include it is that we don't use SCHED_DEADLINE in Android userspace. Can we add support for this in a follow-up patch, or do you consider it necessary for

[PATCH v2 01/13] ANDROID: binder: remove proc waitqueue

2017-08-31 Thread Martijn Coenen
no longer have to block on different waitqueues. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 255 +-- 1 file changed, 181 insertions(+), 74 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c

[PATCH v2 01/13] ANDROID: binder: remove proc waitqueue

2017-08-31 Thread Martijn Coenen
no longer have to block on different waitqueues. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 255 +-- 1 file changed, 181 insertions(+), 74 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ba9e613b42d6

[PATCH v2 02/13] ANDROID: binder: push new transactions to waiting threads.

2017-08-31 Thread Martijn Coenen
, submit the work to the proc waitqueue instead as we did previously. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 181 +-- 1 file changed, 127 insertions(+), 54 deletions(-) diff --git a/drivers/android/bind

[PATCH v2 02/13] ANDROID: binder: push new transactions to waiting threads.

2017-08-31 Thread Martijn Coenen
, submit the work to the proc waitqueue instead as we did previously. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 181 +-- 1 file changed, 127 insertions(+), 54 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android

[PATCH v2 09/13] ANDROID: binder: Don't BUG_ON(!spin_is_locked()).

2017-08-31 Thread Martijn Coenen
Because is_spin_locked() always returns false on UP systems. Use assert_spin_locked() instead, and remove the WARN_ON() instances, since those were easy to verify. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 26 ++ 1 file chang

[PATCH v2 09/13] ANDROID: binder: Don't BUG_ON(!spin_is_locked()).

2017-08-31 Thread Martijn Coenen
Because is_spin_locked() always returns false on UP systems. Use assert_spin_locked() instead, and remove the WARN_ON() instances, since those were easy to verify. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 26 ++ 1 file changed, 10 insertions(+), 16

[PATCH v2 08/13] ANDROID: binder: don't check prio permissions on restore.

2017-08-31 Thread Martijn Coenen
CAP_SYS_NICE or RLIMIT_RT_PRIO, for now it seems reasonable to not check permissions on the restore path. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/a

[PATCH v2 08/13] ANDROID: binder: don't check prio permissions on restore.

2017-08-31 Thread Martijn Coenen
CAP_SYS_NICE or RLIMIT_RT_PRIO, for now it seems reasonable to not check permissions on the restore path. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/android/binder.c b/drivers

[PATCH v2 07/13] ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl

2017-08-31 Thread Martijn Coenen
chable. Signed-off-by: Colin Cross <ccr...@android.com> Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 43 + include/uapi/linux/android/binder.h | 14 2 files changed, 57 insertions(+) diff --git

[PATCH v2 07/13] ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl

2017-08-31 Thread Martijn Coenen
Cross Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 43 + include/uapi/linux/android/binder.h | 14 2 files changed, 57 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 5edde38a77b3

[PATCH v2 10/13] ANDROID: binder: call poll_wait() unconditionally.

2017-08-31 Thread Martijn Coenen
Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.

[PATCH v2 10/13] ANDROID: binder: call poll_wait() unconditionally.

2017-08-31 Thread Martijn Coenen
Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 11 +-- 1 file changed, 1

[PATCH v2 11/13] ANDROID: binder: don't enqueue death notifications to thread todo.

2017-08-31 Thread Martijn Coenen
). Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 68780b8e856c..2d23f8699d40 100644 --- a/drivers/android/binder.c

[PATCH v2 11/13] ANDROID: binder: don't enqueue death notifications to thread todo.

2017-08-31 Thread Martijn Coenen
). Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 68780b8e856c..2d23f8699d40 100644 --- a/drivers/android/binder.c +++ b/drivers/android

[PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
the priority of T2 *before* waking it up. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 217 --- 1 file changed, 188 insertions(+), 29 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c

[PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-31 Thread Martijn Coenen
the priority of T2 *before* waking it up. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 217 --- 1 file changed, 188 insertions(+), 29 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 5366726db968

[PATCH v2 04/13] ANDROID: binder: add min sched_policy to node.

2017-08-31 Thread Martijn Coenen
] for the SCHED_NORMAL/SCHED_BATCH policies. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 28 + include/uapi/linux/android/binder.h | 41 - 2 files changed, 60 insertions(+), 9 del

[PATCH v2 04/13] ANDROID: binder: add min sched_policy to node.

2017-08-31 Thread Martijn Coenen
] for the SCHED_NORMAL/SCHED_BATCH policies. Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 28 + include/uapi/linux/android/binder.h | 41 - 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/drivers

[PATCH v2 05/13] ANDROID: binder: improve priority inheritance.

2017-08-31 Thread Martijn Coenen
By raising the priority of a thread selected for a transaction *before* we wake it up. Delay restoring the priority when doing a reply until after we wake-up the process receiving the reply. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.

[PATCH v2 05/13] ANDROID: binder: improve priority inheritance.

2017-08-31 Thread Martijn Coenen
By raising the priority of a thread selected for a transaction *before* we wake it up. Delay restoring the priority when doing a reply until after we wake-up the process receiving the reply. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 74

[PATCH v2 12/13] ANDROID: binder: don't queue async transactions to thread.

2017-08-31 Thread Martijn Coenen
ing trasnaction requires taking the same lock, userspace will deadlock. By queueing the async transaction to the proc workqueue, we make sure it's only picked up when a thread is ready for proc work. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 8 +--- 1 fil

[PATCH v2 12/13] ANDROID: binder: don't queue async transactions to thread.

2017-08-31 Thread Martijn Coenen
ing trasnaction requires taking the same lock, userspace will deadlock. By queueing the async transaction to the proc workqueue, we make sure it's only picked up when a thread is ready for proc work. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 8 +--- 1 file changed, 5 inserti

[PATCH v2 13/13] ANDROID: binder: Add tracing for binder priority inheritance.

2017-08-31 Thread Martijn Coenen
This allows to easily trace and visualize priority inheritance in the binder driver. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 4 drivers/android/binder_trace.h | 24 2 files changed, 28 insertions(+) diff

[PATCH v2 13/13] ANDROID: binder: Add tracing for binder priority inheritance.

2017-08-31 Thread Martijn Coenen
This allows to easily trace and visualize priority inheritance in the binder driver. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 4 drivers/android/binder_trace.h | 24 2 files changed, 28 insertions(+) diff --git a/drivers/android/binder.c

[PATCH v2 00/13] ANDROID: binder: RT priority inheritance and small fixes.

2017-08-31 Thread Martijn Coenen
inheritance' have already been reviewed by Android engineers and are merged in Android's common kernel trees. --- Colin Cross (1): ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl Martijn Coenen (12): ANDROID: binder: remove proc waitqueue ANDROID: binder: push new transactions to waiting

[PATCH v2 00/13] ANDROID: binder: RT priority inheritance and small fixes.

2017-08-31 Thread Martijn Coenen
inheritance' have already been reviewed by Android engineers and are merged in Android's common kernel trees. --- Colin Cross (1): ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl Martijn Coenen (12): ANDROID: binder: remove proc waitqueue ANDROID: binder: push new transactions to waiting

[PATCH v2 06/13] ANDROID: binder: add RT inheritance flag to node.

2017-08-31 Thread Martijn Coenen
Allows a binder node to specify whether it wants to inherit real-time scheduling policy from a caller. This inheritance may not always be desirable, for example in cases where the binder call runs untrusted and therefore potentially unbounded code. Signed-off-by: Martijn Coenen <m...@android.

[PATCH v2 06/13] ANDROID: binder: add RT inheritance flag to node.

2017-08-31 Thread Martijn Coenen
Allows a binder node to specify whether it wants to inherit real-time scheduling policy from a caller. This inheritance may not always be desirable, for example in cases where the binder call runs untrusted and therefore potentially unbounded code. Signed-off-by: Martijn Coenen --- drivers

Re: [PATCH 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-25 Thread Martijn Coenen
Hi Thomas, On Fri, Aug 25, 2017 at 5:08 PM, Thomas Gleixner wrote: > Sorry, but this has not much to do with real priority inheritance. Can you clarify what "real priority inheritance" is, or are you more concerned about this particular implementation of it? > > It's a poor

Re: [PATCH 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-25 Thread Martijn Coenen
Hi Thomas, On Fri, Aug 25, 2017 at 5:08 PM, Thomas Gleixner wrote: > Sorry, but this has not much to do with real priority inheritance. Can you clarify what "real priority inheritance" is, or are you more concerned about this particular implementation of it? > > It's a poor mans pseudo PI

[PATCH 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-25 Thread Martijn Coenen
Adds support for SCHED_BATCH/SCHED_FIFO/SCHED_RR priority inheritance. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 164 ++- 1 file changed, 135 insertions(+), 29 deletions(-) diff --git a/drivers/android/bind

[PATCH 02/13] ANDROID: binder: push new transactions to waiting threads.

2017-08-25 Thread Martijn Coenen
, submit the work to the proc waitqueue instead as we did previously. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 181 +-- 1 file changed, 127 insertions(+), 54 deletions(-) diff --git a/drivers/android/bind

[PATCH 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-08-25 Thread Martijn Coenen
Adds support for SCHED_BATCH/SCHED_FIFO/SCHED_RR priority inheritance. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 164 ++- 1 file changed, 135 insertions(+), 29 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android

[PATCH 02/13] ANDROID: binder: push new transactions to waiting threads.

2017-08-25 Thread Martijn Coenen
, submit the work to the proc waitqueue instead as we did previously. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 181 +-- 1 file changed, 127 insertions(+), 54 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android

[PATCH 01/13] ANDROID: binder: remove proc waitqueue

2017-08-25 Thread Martijn Coenen
Removes the process waitqueue, so that threads can only wait on the thread waitqueue. Whenever there is process work to do, pick a thread and wake it up. This also fixes an issue with using epoll(), since we no longer have to block on different waitqueues. Signed-off-by: Martijn Coenen &l

[PATCH 01/13] ANDROID: binder: remove proc waitqueue

2017-08-25 Thread Martijn Coenen
Removes the process waitqueue, so that threads can only wait on the thread waitqueue. Whenever there is process work to do, pick a thread and wake it up. This also fixes an issue with using epoll(), since we no longer have to block on different waitqueues. Signed-off-by: Martijn Coenen

[PATCH 04/13] ANDROID: binder: add min sched_policy to node.

2017-08-25 Thread Martijn Coenen
] for the SCHED_NORMAL/SCHED_BATCH policies. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 26 ++- include/uapi/linux/android/binder.h | 41 - 2 files changed, 61 insertions(+), 6 deletions(-)

[PATCH 04/13] ANDROID: binder: add min sched_policy to node.

2017-08-25 Thread Martijn Coenen
] for the SCHED_NORMAL/SCHED_BATCH policies. Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 26 ++- include/uapi/linux/android/binder.h | 41 - 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 08/13] ANDROID: binder: don't check prio permissions on restore.

2017-08-25 Thread Martijn Coenen
CAP_SYS_NICE or RLIMIT_RT_PRIO, for now it seems reasonable to not check permissions on the restore path. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/a

[PATCH 06/13] ANDROID: binder: add RT inheritance flag to node.

2017-08-25 Thread Martijn Coenen
Allows a binder node to specify whether it wants to inherit real-time scheduling policy from a caller. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 22 +- include/uapi/linux/android/binder.h | 8 2 files chang

[PATCH 08/13] ANDROID: binder: don't check prio permissions on restore.

2017-08-25 Thread Martijn Coenen
CAP_SYS_NICE or RLIMIT_RT_PRIO, for now it seems reasonable to not check permissions on the restore path. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/android/binder.c b/drivers

[PATCH 06/13] ANDROID: binder: add RT inheritance flag to node.

2017-08-25 Thread Martijn Coenen
Allows a binder node to specify whether it wants to inherit real-time scheduling policy from a caller. Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 22 +- include/uapi/linux/android/binder.h | 8 2 files changed, 25 insertions(+), 5

[PATCH 11/13] ANDROID: binder: don't enqueue death notifications to thread todo.

2017-08-25 Thread Martijn Coenen
). Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index e8a70a7c789c..12ab16bb676c 100644 --- a/drivers/android/binder.c

[PATCH 11/13] ANDROID: binder: don't enqueue death notifications to thread todo.

2017-08-25 Thread Martijn Coenen
). Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index e8a70a7c789c..12ab16bb676c 100644 --- a/drivers/android/binder.c +++ b/drivers/android

[PATCH 10/13] ANDROID: binder: call poll_wait() unconditionally.

2017-08-25 Thread Martijn Coenen
Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.

[PATCH 10/13] ANDROID: binder: call poll_wait() unconditionally.

2017-08-25 Thread Martijn Coenen
Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 11 +-- 1 file changed, 1

[PATCH 09/13] ANDROID: binder: Don't BUG_ON(!spin_is_locked()).

2017-08-25 Thread Martijn Coenen
Because is_spin_locked() always returns false on UP systems. Use assert_spin_locked() instead, and remove the WARN_ON() instances, since those were easy to verify. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 26 ++ 1 file chang

[PATCH 07/13] Add BINDER_GET_NODE_DEBUG_INFO ioctl

2017-08-25 Thread Martijn Coenen
chable. Signed-off-by: Colin Cross <ccr...@android.com> Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 43 + include/uapi/linux/android/binder.h | 14 2 files changed, 57 insertions(+) diff --git

[PATCH 09/13] ANDROID: binder: Don't BUG_ON(!spin_is_locked()).

2017-08-25 Thread Martijn Coenen
Because is_spin_locked() always returns false on UP systems. Use assert_spin_locked() instead, and remove the WARN_ON() instances, since those were easy to verify. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 26 ++ 1 file changed, 10 insertions(+), 16

[PATCH 07/13] Add BINDER_GET_NODE_DEBUG_INFO ioctl

2017-08-25 Thread Martijn Coenen
Cross Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 43 + include/uapi/linux/android/binder.h | 14 2 files changed, 57 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index e6778c696942

[PATCH 12/13] ANDROID: binder: don't queue async transactions to thread.

2017-08-25 Thread Martijn Coenen
ing trasnaction requires taking the same lock, userspace will deadlock. By queueing the async transaction to the proc workqueue, we make sure it's only picked up when a thread is ready for proc work. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 8 +--- 1 fil

[PATCH 12/13] ANDROID: binder: don't queue async transactions to thread.

2017-08-25 Thread Martijn Coenen
ing trasnaction requires taking the same lock, userspace will deadlock. By queueing the async transaction to the proc workqueue, we make sure it's only picked up when a thread is ready for proc work. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 8 +--- 1 file changed, 5 inserti

[PATCH 13/13] ANDROID: binder: Add tracing for binder priority inheritance.

2017-08-25 Thread Martijn Coenen
This allows to easily trace and visualize priority inheritance in the binder driver. Change-Id: I8449ae4b002e55c5e9517a47f3581e05eef051d8 Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 4 drivers/android/binder_trace.h | 24 +

[PATCH 13/13] ANDROID: binder: Add tracing for binder priority inheritance.

2017-08-25 Thread Martijn Coenen
This allows to easily trace and visualize priority inheritance in the binder driver. Change-Id: I8449ae4b002e55c5e9517a47f3581e05eef051d8 Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 4 drivers/android/binder_trace.h | 24 2 files changed, 28

[PATCH 05/13] ANDROID: binder: improve priority inheritance.

2017-08-25 Thread Martijn Coenen
By raising the priority of a thread selected for a transaction *before* we wake it up. Delay restoring the priority when doing a reply until after we wake-up the process receiving the reply. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.

[PATCH 05/13] ANDROID: binder: improve priority inheritance.

2017-08-25 Thread Martijn Coenen
By raising the priority of a thread selected for a transaction *before* we wake it up. Delay restoring the priority when doing a reply until after we wake-up the process receiving the reply. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 74

[PATCH 00/13] ANDROID: binder: RT priority inheritance and small fixes.

2017-08-25 Thread Martijn Coenen
. Colin Cross (1): Add BINDER_GET_NODE_DEBUG_INFO ioctl Martijn Coenen (12): ANDROID: binder: remove proc waitqueue ANDROID: binder: push new transactions to waiting threads. ANDROID: binder: add support for RT prio inheritance. ANDROID: binder: add min sched_policy to node. ANDROID

[PATCH 00/13] ANDROID: binder: RT priority inheritance and small fixes.

2017-08-25 Thread Martijn Coenen
. Colin Cross (1): Add BINDER_GET_NODE_DEBUG_INFO ioctl Martijn Coenen (12): ANDROID: binder: remove proc waitqueue ANDROID: binder: push new transactions to waiting threads. ANDROID: binder: add support for RT prio inheritance. ANDROID: binder: add min sched_policy to node. ANDROID

Re: [PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-31 Thread Martijn Coenen
On Sat, Jul 29, 2017 at 1:22 AM, Greg KH wrote: > Ok, do some of these need to go to Linus now for 4.13-final and to the > stable trees to match up with the 3 that are already proposed for the > stable trees? If so, which ones? "fix proc->tsk check" is a fix for

Re: [PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-31 Thread Martijn Coenen
On Sat, Jul 29, 2017 at 1:22 AM, Greg KH wrote: > Ok, do some of these need to go to Linus now for 4.13-final and to the > stable trees to match up with the 3 that are already proposed for the > stable trees? If so, which ones? "fix proc->tsk check" is a fix for "c4ea41ba195d ("binder: use

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-28 Thread Martijn Coenen
tman <gre...@linuxfoundation.org> > wrote: >> On Thu, Jul 27, 2017 at 02:38:30PM +0530, Amit Pundir wrote: >>> Hi, >>> >>> On 25 July 2017 at 14:43, Martijn Coenen <m...@google.com> wrote: >>> > Hi John, >>> > >>

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-28 Thread Martijn Coenen
Thu, Jul 27, 2017 at 02:38:30PM +0530, Amit Pundir wrote: >>> Hi, >>> >>> On 25 July 2017 at 14:43, Martijn Coenen wrote: >>> > Hi John, >>> > >>> > On Mon, Jul 24, 2017 at 11:07 PM, John Stultz >>> > wrote: >>&g

[PATCH 1/3] ANDROID: binder: add padding to binder_fd_array_object.

2017-07-28 Thread Martijn Coenen
this. Signed-off-by: Martijn Coenen <m...@android.com> --- include/uapi/linux/android/binder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 51f891fb1b18..7668b5791c91 100644 --- a/include/uapi/linux/a

[PATCH 1/3] ANDROID: binder: add padding to binder_fd_array_object.

2017-07-28 Thread Martijn Coenen
this. Signed-off-by: Martijn Coenen --- include/uapi/linux/android/binder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 51f891fb1b18..7668b5791c91 100644 --- a/include/uapi/linux/android/binder.h +++ b

[PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-28 Thread Martijn Coenen
that for some reason was incomplete; "fix proc->tsk check" addresses this particular problem. Martijn Coenen (3): ANDROID: binder: add padding to binder_fd_array_object. ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES. ANDROID: binder: fix proc->tsk check. drivers/android

[PATCH 3/3] ANDROID: binder: fix proc->tsk check.

2017-07-28 Thread Martijn Coenen
Commit c4ea41ba195d ("binder: use group leader instead of open thread")' was incomplete and didn't update a check in binder_mmap(), causing all mmap() calls into the binder driver to fail. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 2 +- 1

[PATCH 0/3] ANDROID: binder: reconcile with android common tree

2017-07-28 Thread Martijn Coenen
that for some reason was incomplete; "fix proc->tsk check" addresses this particular problem. Martijn Coenen (3): ANDROID: binder: add padding to binder_fd_array_object. ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES. ANDROID: binder: fix proc->tsk check. drivers/android

[PATCH 3/3] ANDROID: binder: fix proc->tsk check.

2017-07-28 Thread Martijn Coenen
Commit c4ea41ba195d ("binder: use group leader instead of open thread")' was incomplete and didn't update a check in binder_mmap(), causing all mmap() calls into the binder driver to fail. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 2 +- 1 file changed, 1 inser

[PATCH 2/3] ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES.

2017-07-28 Thread Martijn Coenen
These will be required going forward. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/Kconfig| 2 +- kernel/configs/android-base.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig

[PATCH 2/3] ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES.

2017-07-28 Thread Martijn Coenen
These will be required going forward. Signed-off-by: Martijn Coenen --- drivers/android/Kconfig| 2 +- kernel/configs/android-base.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig index 832e885349b1

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-27 Thread Martijn Coenen
dir wrote: >> Hi, >> >> On 25 July 2017 at 14:43, Martijn Coenen <m...@google.com> wrote: >> > Hi John, >> > >> > On Mon, Jul 24, 2017 at 11:07 PM, John Stultz <john.stu...@linaro.org> >> > wrote: >> >>

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-27 Thread Martijn Coenen
pr_err("%d: vma mm and task mm mismatch\n", proc->pid); I'll prep a patch to fix this ASAP. On Thu, Jul 27, 2017 at 3:23 PM, Greg Kroah-Hartman wrote: > On Thu, Jul 27, 2017 at 02:38:30PM +0530, Amit Pundir wrote: >> Hi, >>

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-25 Thread Martijn Coenen
Hi John, On Mon, Jul 24, 2017 at 11:07 PM, John Stultz wrote: > > 12-31 16:00:36.632 2518 2584 E hw-ProcessState: Using /dev/hwbinder > failed: unable to mmap transaction memory. This doesn't look right. Is there anything in the kernel log? > 12-31 16:00:36.632 2518

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-25 Thread Martijn Coenen
Hi John, On Mon, Jul 24, 2017 at 11:07 PM, John Stultz wrote: > > 12-31 16:00:36.632 2518 2584 E hw-ProcessState: Using /dev/hwbinder > failed: unable to mmap transaction memory. This doesn't look right. Is there anything in the kernel log? > 12-31 16:00:36.632 2518 2566 D bt_hci :

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-23 Thread Martijn Coenen
On Thu, Feb 23, 2017 at 9:24 PM, John Stultz wrote: > > So, just for context, Android does have a userland LMK daemon (using > the mempressure notifiers) as you mentioned, but unfortunately I'm > unaware of any devices that ship with that implementation. I've previously

Re: [PATCH] staging, android: remove lowmemory killer from the tree

2017-02-23 Thread Martijn Coenen
On Thu, Feb 23, 2017 at 9:24 PM, John Stultz wrote: > > So, just for context, Android does have a userland LMK daemon (using > the mempressure notifiers) as you mentioned, but unfortunately I'm > unaware of any devices that ship with that implementation. I've previously worked on enabling

Re: [PATCH 01/10] ANDROID: binder: Add strong ref checks

2016-10-24 Thread Martijn Coenen
On Mon, Oct 24, 2016 at 3:20 PM, Martijn Coenen <m...@android.com> wrote: > From: Arve Hjønnevåg <a...@android.com> > > Prevent using a binder_ref with only weak references where a strong > reference is required. > > Signed-off-by: Arve Hjønnevåg <a...@android.co

Re: [PATCH 01/10] ANDROID: binder: Add strong ref checks

2016-10-24 Thread Martijn Coenen
On Mon, Oct 24, 2016 at 3:20 PM, Martijn Coenen wrote: > From: Arve Hjønnevåg > > Prevent using a binder_ref with only weak references where a strong > reference is required. > > Signed-off-by: Arve Hjønnevåg Signed-off-by: Martijn Coenen > --- > drive

Re: [PATCH 02/10] ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct

2016-10-24 Thread Martijn Coenen
On Mon, Oct 24, 2016 at 3:20 PM, Martijn Coenen <m...@android.com> wrote: > From: Arve Hjønnevåg <a...@android.com> > > Prevents leaking pointers between processes > > Signed-off-by: Arve Hjønnevåg <a...@android.com> Signed-off-by: Martijn Coenen <m...@an

Re: [PATCH 02/10] ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct

2016-10-24 Thread Martijn Coenen
On Mon, Oct 24, 2016 at 3:20 PM, Martijn Coenen wrote: > From: Arve Hjønnevåg > > Prevents leaking pointers between processes > > Signed-off-by: Arve Hjønnevåg Signed-off-by: Martijn Coenen > --- > drivers/android/binder.c | 5 + > 1 file changed, 5 inse

[PATCH 03/10] android: binder: split flat_binder_object.

2016-10-24 Thread Martijn Coenen
backwards compatibility to existing user-space clients. All binder objects just share a header. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 158 +--- include/uapi/linux/android/binder.h | 31 ++- 2 files c

[PATCH 05/10] android: binder: deal with contexts in debugfs.

2016-10-24 Thread Martijn Coenen
Properly print the context in debugfs entries. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c

[PATCH 02/10] ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct

2016-10-24 Thread Martijn Coenen
From: Arve Hjønnevåg Prevents leaking pointers between processes Signed-off-by: Arve Hjønnevåg --- drivers/android/binder.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 3681759..3c71b98

[PATCH 10/10] android: binder: support for file-descriptor arrays.

2016-10-24 Thread 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. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 141 i

[PATCH 03/10] android: binder: split flat_binder_object.

2016-10-24 Thread Martijn Coenen
backwards compatibility to existing user-space clients. All binder objects just share a header. Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 158 +--- include/uapi/linux/android/binder.h | 31 ++- 2 files changed, 137 insertions

[PATCH 05/10] android: binder: deal with contexts in debugfs.

2016-10-24 Thread Martijn Coenen
Properly print the context in debugfs entries. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 3358156..ed4e432 100644

[PATCH 02/10] ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct

2016-10-24 Thread Martijn Coenen
From: Arve Hjønnevåg Prevents leaking pointers between processes Signed-off-by: Arve Hjønnevåg --- drivers/android/binder.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 3681759..3c71b98 100644 --- a/drivers/android/binder.c

[PATCH 10/10] android: binder: support for file-descriptor arrays.

2016-10-24 Thread 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. Signed-off-by: Martijn Coenen --- drivers/android/binder.c| 141 include/uapi/linux/android

[PATCH 07/10] android: binder: refactor binder_transact()

2016-10-24 Thread Martijn Coenen
Moved handling of fixup for binder objects, handles and file descriptors into separate functions. Signed-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 309 ++- 1 file changed, 172 insertions(+), 137 deletions(-) diff

[PATCH 00/10] android: binder: support for domains and scatter-gather.

2016-10-24 Thread Martijn Coenen
ode. Arve Hjønnevåg (2): ANDROID: binder: Add strong ref checks ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct Martijn Coenen (8): android: binder: split flat_binder_object. android: binder: support multiple context managers. android: binder: deal wit

[PATCH 07/10] android: binder: refactor binder_transact()

2016-10-24 Thread Martijn Coenen
Moved handling of fixup for binder objects, handles and file descriptors into separate functions. Signed-off-by: Martijn Coenen --- drivers/android/binder.c | 309 ++- 1 file changed, 172 insertions(+), 137 deletions(-) diff --git a/drivers/android

[PATCH 00/10] android: binder: support for domains and scatter-gather.

2016-10-24 Thread Martijn Coenen
ode. Arve Hjønnevåg (2): ANDROID: binder: Add strong ref checks ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct Martijn Coenen (8): android: binder: split flat_binder_object. android: binder: support multiple context managers. android: binder: deal wit

[PATCH 09/10] android: binder: support for scatter-gather.

2016-10-24 Thread Martijn Coenen
-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c| 244 ++-- include/uapi/linux/android/binder.h | 44 +++ 2 files changed, 275 insertions(+), 13 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 1

[PATCH 09/10] android: binder: support for scatter-gather.

2016-10-24 Thread Martijn Coenen
-by: Martijn Coenen --- drivers/android/binder.c| 244 ++-- include/uapi/linux/android/binder.h | 44 +++ 2 files changed, 275 insertions(+), 13 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 18a3254..76dda7b 100644

[PATCH 06/10] android: binder: support multiple /dev instances.

2016-10-24 Thread Martijn Coenen
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. Signed-off-by: Martijn Coenen <m...@android.

[PATCH 08/10] android: binder: add extra size to allocator.

2016-10-24 Thread Martijn Coenen
-off-by: Martijn Coenen <m...@android.com> --- drivers/android/binder.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index f2a0ae6..18a3254 100644 --- a/drivers/android/binder.c

<    1   2   3   4   >