linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

driver: tee: Handle NULL pointer indication from client #73

Closed jforissier closed 4 years ago

jforissier commented 4 years ago

TEE Client introduce a new capability "TEE_GEN_CAP_MEMREF_NULL" to handle the support of the shared memory buffer with a NULL pointer.

This capability depends on TEE Capabilities and driver support. Driver and TEE exchange capabilities at driver initialization.

Signed-off-by: Michael Whitfield michael.whitfield@nxp.com Signed-off-by: Cedric Neveux cedric.neveux@nxp.com Reviewed-by: Jens Wiklander jens.wiklander@linaro.org Reviewed-by: Joakim Bech joakim.bech@linaro.org Tested-by: Joakim Bech joakim.bech@linaro.org (QEMU) [jf: cherry-picked and applied to branch rpi3-optee-4.14] Signed-off-by: Jerome Forissier jerome@forissier.org

jbech-linaro commented 4 years ago

Thanks Jerome! Acked-by: Joakim Bech <joakim.bech@linaro.org>

jforissier commented 4 years ago

Note: this is completely untested :open_mouth:... just a cherry-pick from the optee branch into the RPi3 branch. This is needed by the newly introduced xtest 1025.

jbech-linaro commented 4 years ago

Note: this is completely untested .

Implies that I need to blow away some dust from my RPi3 device ... better sooner then later (3.9.0) :)

jbech-linaro commented 4 years ago

Been playing with updating to the RPi kernel to the latest kernel available (https://github.com/raspberrypi/linux/), which I can successfully use now (https://github.com/jbech-linaro/manifest/tree/rpi-optee-4.19.y), I did try this PR there, i.e., I cherry-picked that commit, but 1025 still fails. Haven't done any investigation to figure out why, likewise didn't try this PR on our current OP-TEE RPi3-kernel version.