Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libteec.so 32-bit does not communicate well with 64-bit kernel module #210

Closed
robercano opened this issue Mar 9, 2015 · 9 comments
Closed

Comments

@robercano
Copy link

Hi,

I'm compiling OP-TEE, Android flavor for the Juno board and I'm able to run the hello_world example. However when compiling hello_world in 32-bits and using libteec.so 32-bit version the TEE_OPEN_SESSION ioctl fails. I've checked and it seems to be a problem of a 32-bit client talking to a 64-bit driver. Are there any plans on supporting this combination?

Thanks in advance,
Roberto

@pascal-brand38
Copy link
Contributor

Hello,

This is a known limitations. We plan to support it.
Unfortunately, we do not have any detailed plan on when it will be achieved.

Best regards,
Pascal.

@robercano
Copy link
Author

Hi Pascal,

Thanks for the prompt response. No good news for me then :)

Do you have an estimation of the amount of work it would take? Just to know if it would be worth it for me to work on that on my side, or wait for you guys.

Thanks again,
Roberto

@jbech-linaro
Copy link
Contributor

@gabr1e11 I think it's worth for you to give it a try. We are currently discussing kernel upstreaming in general, so our focus is in another area. Start by having a look at the structures shared between secure and normal world (see mainly the data used in ioctl, open and release in the file_operations). @jforissier gave me a link the other day to a document in the Linux kernel docs that gives some good hints about what to think about when making changes like this. You'll find that document here.

@robercano
Copy link
Author

@jbech-linaro many thanks for the heads up. Apparently our client once compiled for 64-bit kind of works (at least it does not crash). Anyway if I feel like I need to port the library/driver to 32 bit I'll let you know so we can sync up.

Thanks!

@robercano
Copy link
Author

@jbech-linaro Hi again! Still doing some work with OP-TEE and Juno and now I've stomped again against a 32/64 problem. Is there any news regarding this? Or some specific plans? Many thanks again for the info.

@ghost ghost mentioned this issue Aug 26, 2015
@jbech-linaro
Copy link
Contributor

Hi @gabr1e11 , sorry for the very late reply, I've totally missed this. The following two pull requests will handle that problem and I think we are going to merge that soon.

// Regards Joakim

@robercano
Copy link
Author

Hi @jbech-linaro, many thanks! I will eventually come back to OPTEE and this will really help.

@jbech-linaro
Copy link
Contributor

@gabr1e11 , both patches I've mentioned above has now been merged. If that is working for you also, then I'd suggest that we close this particular issue. What do you think?

@robercano
Copy link
Author

@jbech-linaro I haven't tried those patches but I agree this can be closed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants