tee-supplicant: rpmb: switch to MMC_IOC_MULTI_CMD

On some eMMC devices, the mix of RPMB and normal MMC commands can result
in GENERAL FAILURE, which then forces OP-TEE to mark the RPMB device
as dead (part of the rollback vulnerability fix).

In order to work around this problem, the linux kernel also supports
sending all the required MMC_IOC commands in one single multiple ioctl
command request, which forces the RPMB commands to be serialized,
avoiding the issue.

As MMC_IOC_MULTI_CMD is available since linux 4.3, we should be safe to
use it by default on read / write block operations.

For reference, this issue is also nicely described at the
https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg17589.html.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Tested-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
1 file changed
tree: d07800341a2196cd00575bc32790aa2f87a69d9e
  1. libckteec/
  2. libteec/
  3. public/
  4. scripts/
  5. tee-supplicant/
  6. .gitattributes
  7. .gitignore
  8. .travis.yml
  9. Android.mk
  10. android_flags.mk
  11. CMakeLists.txt
  12. CMakeToolchain.txt
  13. config.mk
  14. flags.mk
  15. LICENSE
  16. Makefile
  17. README.md
  18. typedefs.checkpatch
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers