Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1698719 > unrolled thread
| Started by | Martijn Coenen <maco@android.com> |
|---|---|
| First post | 2017-07-28 14:00 +0200 |
| Last post | 2017-07-31 09:00 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] ANDROID: binder: reconcile with android common tree Martijn Coenen <maco@android.com> - 2017-07-28 14:00 +0200
[PATCH 1/3] ANDROID: binder: add padding to binder_fd_array_object. Martijn Coenen <maco@android.com> - 2017-07-28 14:00 +0200
Re: [PATCH 0/3] ANDROID: binder: reconcile with android common tree Greg KH <gregkh@linuxfoundation.org> - 2017-07-29 01:50 +0200
Re: [PATCH 0/3] ANDROID: binder: reconcile with android common tree Martijn Coenen <maco@android.com> - 2017-07-31 09:00 +0200
| From | Martijn Coenen <maco@android.com> |
|---|---|
| Date | 2017-07-28 14:00 +0200 |
| Subject | [PATCH 0/3] ANDROID: binder: reconcile with android common tree |
| Message-ID | <u8c5Y-3fm-3@gated-at.bofh.it> |
When comparing the android common kernel branch with upstream, I found several differences. The "add padding" patch has long been applied in common, and shipping versions of Android userspace depends on this particular alignment; so while it does change UAPI, we have never shipped a userspace that used the old UAPI, so this change does not break anything. The "add hwbinder,vndbinder" patch changes the default binder device nodes to match what the latest Android userspace (O) requires. Finally, the recent patch-stack for fine-grained locking contained a patch 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/Kconfig | 2 +- drivers/android/binder.c | 2 +- include/uapi/linux/android/binder.h | 2 ++ kernel/configs/android-base.config | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) -- 2.14.0.rc0.400.g1c36432dff-goog
[toc] | [next] | [standalone]
| From | Martijn Coenen <maco@android.com> |
|---|---|
| Date | 2017-07-28 14:00 +0200 |
| Subject | [PATCH 1/3] ANDROID: binder: add padding to binder_fd_array_object. |
| Message-ID | <u8c5Z-3fm-23@gated-at.bofh.it> |
| In reply to | #1698719 |
binder_fd_array_object starts with a 4-byte header,
followed by a few fields that are 8 bytes when
ANDROID_BINDER_IPC_32BIT=N.
This can cause alignment issues in a 64-bit kernel
with a 32-bit userspace, as on x86_32 an 8-byte primitive
may be aligned to a 4-byte address. Pad with a __u32
to fix this.
Signed-off-by: Martijn Coenen <maco@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/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -132,6 +132,7 @@ enum {
/* struct binder_fd_array_object - object describing an array of fds in a buffer
* @hdr: common header structure
+ * @pad: padding to ensure correct alignment
* @num_fds: number of file descriptors in the buffer
* @parent: index in offset array to buffer holding the fd array
* @parent_offset: start offset of fd array in the buffer
@@ -152,6 +153,7 @@ enum {
*/
struct binder_fd_array_object {
struct binder_object_header hdr;
+ __u32 pad;
binder_size_t num_fds;
binder_size_t parent;
binder_size_t parent_offset;
--
2.14.0.rc0.400.g1c36432dff-goog
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-07-29 01:50 +0200 |
| Message-ID | <u8nb3-2d9-3@gated-at.bofh.it> |
| In reply to | #1698719 |
On Fri, Jul 28, 2017 at 01:56:05PM +0200, Martijn Coenen wrote: > When comparing the android common kernel branch with > upstream, I found several differences. > > The "add padding" patch has long been applied in common, > and shipping versions of Android userspace depends on this > particular alignment; so while it does change UAPI, we > have never shipped a userspace that used the old UAPI, > so this change does not break anything. > > The "add hwbinder,vndbinder" patch changes the default > binder device nodes to match what the latest Android > userspace (O) requires. > > Finally, the recent patch-stack for fine-grained locking > contained a patch that for some reason was incomplete; > "fix proc->tsk check" addresses this particular problem. 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? thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Martijn Coenen <maco@android.com> |
|---|---|
| Date | 2017-07-31 09:00 +0200 |
| Message-ID | <u9cQi-2Wn-13@gated-at.bofh.it> |
| In reply to | #1699165 |
On Sat, Jul 29, 2017 at 1:22 AM, Greg KH <gregkh@linuxfoundation.org> 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 group
leader instead of open thread") which Todd sent to LKML just two weeks
ago; it should definitely go to 4.13-final if it still can, and
basically all the -stable kernels that patch ended up in (I think Todd
proposed back to 4.4).
The other two commits are related to the multiple domains /
scatter-gather patches that were upstreamed about 6 months ago (eg
7980240b6d63e); I saw those landed in 4.11-rc1 first.
Thanks,
Martijn
>
> thanks,
>
> greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web