Hi,
Here's my latest patches for the generic TEE subsystem. There's two
patches with incompatible driver API changes which makes the OP-TEE
driver fail to compile. I'm fixing that in
"optee: incompatible tee subsystem api change" as a separate commit to
make it easy to squash the different patches later when we send it to
the kernel mailing list.
While this review is ongoing the patches are also available at
https://github.com/jenswi-linaro/linux/tree/tee-dev3
I'll make a pull request of this when this review is done.
Jens Wiklander (7):
tee: bugfix refcount
tee: fix tee_shm_va2pa() and tee_shm_pa2va()
tee: shared memory from CMA or res_mem
tee: rename struct tee_filp
optee: incompatible tee subsystem api change
tee: update module reference counter
tee: bugfix error handling of tee_shm_alloc()
drivers/sec-hw/Makefile | 3 +-
drivers/sec-hw/optee/Kconfig | 3 +-
drivers/sec-hw/optee/Makefile | 3 +-
drivers/sec-hw/optee/core.c | 222 +++++++++++++++++++++++++++++++++++++++
drivers/sec-hw/optee/optee.c | 201 -----------------------------------
drivers/sec-hw/tee.c | 76 ++++++++------
drivers/sec-hw/tee_private.h | 51 ++++++---
drivers/sec-hw/tee_shm.c | 204 +++++++++++++++++-------------------
drivers/sec-hw/tee_shm_pool.c | 232 +++++++++++++++++++++++++++++++++++++++++
include/linux/sec-hw/tee_drv.h | 75 ++++++++++---
10 files changed, 697 insertions(+), 373 deletions(-)
create mode 100644 drivers/sec-hw/optee/core.c
delete mode 100644 drivers/sec-hw/optee/optee.c
create mode 100644 drivers/sec-hw/tee_shm_pool.c
--
1.9.1
Hi,
I think we should move the generic TEE subsystem to /drivers/tee and
/include/linux/tee since we're only dealing with TEE.
What do you think should we move from sec-hw to tee?
Regards,
Jens
Hi,
Here's some small fixes to the generic TEE subsystem.
I've created a pull request of the same patches at
https://github.com/TrustZoneGenericDriver/linux/pull/1
Jens Wiklander (2):
tee: bugfix and export tee_shm_fd()
tee: bugfix tee_shm_alloc()
drivers/sec-hw/tee.c | 9 ++++++++-
drivers/sec-hw/tee_private.h | 2 --
drivers/sec-hw/tee_shm.c | 7 ++++++-
include/linux/sec-hw/tee_drv.h | 7 +++++++
4 files changed, 21 insertions(+), 4 deletions(-)
--
1.9.1
From: Javier González <javier(a)javigon.com>
Hi,
Here's the proposal I described the other day. The goal is to provide
support for kernel submodules. I encountered some challenges that I
would like to discuss with you:
- Command and parameters: In the patchset Jens sent, all ommunication
with the TEE is opaque. This is good for user space but not for kernel
submodules. I propose adding a tee_cmd and tee_parameters. The value
is opaque and can be flourished by the TEE if necessary.
- Command list: If we want kernel submodules to use the TEE as they use
TPM we need a list of commands that all (most) TEEs would support. We
need to have this discussion and maybe bring more parties to it.
Probably Global Platform's use cases are a good place to start.
- Session: I miss the concept of a session. The responsability is very
similar to tee_filp. I would suggest to change the name to tee_session.
I believe that it makes it more clear.
- Position: I like sec-hw :) But we need to bring at least another piece
of secure hardware to this location in order to motivate a new
submodule. TPM is the most obvious. We would then need to move all
into /drivers/sec-hw/?? I assume your do not like trustzone since it
is very specific for some of you - is tee good? I did not want to
send a patch without discussing the naming first.
Finally, regarding the process: is sending patches, discussing, and then
applying to github a process you all fell comfortable with? Suggestions
are welcome.
Best,
Javier
Javier González (1):
tee: add tee operations for kernel submodules
drivers/sec-hw/tee.c | 175 +++++++++++++++++++++++++++++++++++++++--
drivers/sec-hw/tee_private.h | 14 ++++
include/linux/sec-hw/tee.h | 98 ++++++++++++++++++++++-
include/linux/sec-hw/tee_drv.h | 11 ---
4 files changed, 279 insertions(+), 19 deletions(-)
--
1.9.1