Skip to contentSkip to conversation

staging: Fix build issues with new binder API

RFC PATCH In review John Stultz 3 participants 6 messages Feb 26, 2014 – Feb 27, 2014 1 message not in the archive Staging

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 staging: Fix build issues with new binder API

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

Until that implementation is done, remove the choice for 32bit ARM, automatically enabling the old 32bit binder protocol.

This can be reverted once a 64bit __get_user_asm_* implementation is merged.

Cc Greg KH <[email protected]>
Cc Colin Cross <[email protected]>
Cc Arve Hjønnevåg <[email protected]>
Cc Serban Constantinescu <[email protected]>
Cc Android Kernel Team <[email protected]>
---
 drivers/staging/android/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/Kconfig +1 -1
index 1c779ef..ab28d2b 100644
@@ -21,7 +21,7 @@ config ANDROID_BINDER_IPC
 	  between said processes.
 
 config ANDROID_BINDER_IPC_32BIT
-	bool "Use old (Android 4.4 and earlier) 32-bit binder API"
+	bool
 	depends on !64BIT && ANDROID_BINDER_IPC
 	default y
 	---help---
Signature · 1 line
1.8.3.2
maintainer
#1 lore raw
Quoted 2 lines · John Stultz

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

So no one ever tested this out on ARM? Really, that seems odd...

Anyway, if you want this to always be on, that's fine with me, your choice :)

#2 lore raw
Quoted 4 lines · Greg KH
Quoted 2 lines · John Stultz

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

So no one ever tested this out on ARM? Really, that seems odd...

Its my bad, I was focused on the 32bit legacy compatibility code in my testing because the userspace I have only works with that.

Arve actually warned about this in one of his mails, but I mistakenly thought it was an issue w/ 3.10 and earlier kernels and had since been addressed.

Quoted 2 lines

Anyway, if you want this to always be on, that's fine with me, your choice :)

I think its the best option for now, but wanted to send it out for comment to see if anyone objected.

I'm about to head for a conference so I'll be offline until around Monday. While at the conference I'm going to be working with folks to see if we can't get the real solution (a __get_user_asm_64 implementation) sorted. But if there are no objections, it might be best to queue this for staging-next so folks don't hit the issue in the meantime.

thanks
-john

maintainer
#3 lore raw
Quoted 20 lines · John Stultz
Quoted 4 lines · Greg KH
Quoted 2 lines · John Stultz

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

So no one ever tested this out on ARM? Really, that seems odd...

Its my bad, I was focused on the 32bit legacy compatibility code in my testing because the userspace I have only works with that.

Arve actually warned about this in one of his mails, but I mistakenly thought it was an issue w/ 3.10 and earlier kernels and had since been addressed.

Quoted 2 lines

Anyway, if you want this to always be on, that's fine with me, your choice :)

I think its the best option for now, but wanted to send it out for comment to see if anyone objected.

Quoted 6 lines

I'm about to head for a conference so I'll be offline until around Monday. While at the conference I'm going to be working with folks to see if we can't get the real solution (a __get_user_asm_64 implementation) sorted. But if there are no objections, it might be best to queue this for staging-next so folks don't hit the issue in the meantime.

Yes, the "real" solution would be best, but I'll queue this up for now, thanks.

greg k-h

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 2 lines · John Stultz

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

It is impossible to implement this. Many have tried before.

Quoted 6 lines

Until that implementation is done, remove the choice for 32bit ARM, automatically enabling the old 32bit binder protocol.

This can be reverted once a 64bit __get_user_asm_* implementation is merged.

I think the best solution is to use __copy_from_user for the 64-bit access. You can wrap it in a helper function if you want to speed up the native-word-size case.

Arnd

#6 lore raw
Quoted 9 lines · Arnd Bergmann
Quoted 2 lines · John Stultz

The new 64bit binder API causes build issues on 32bit ARM due to the lack of 64bit __get_user_asm_* implementation.

It is impossible to implement this. Many have tried before.

Quoted 4 lines

Until that implementation is done, remove the choice for 32bit ARM, automatically enabling the old 32bit binder protocol.

Quoted 5 lines
Quoted 2 lines

This can be reverted once a 64bit __get_user_asm_* implementation is merged.

I think the best solution is to use __copy_from_user for the 64-bit access. You can wrap it in a helper function if you want to speed up the native-word-size case.

Ah. Thanks for the context and the tip. Will try to get an appropriate solution there then.

thanks
-john