From: Ira Weiny <ira.weiny(a)intel.com>
get_kernel_pages() only had one caller [shm_get_kernel_pages()] which did not
need the functionality it provided. Furthermore, it called kmap_to_page()
which we are looking to removed.
Alter shm_get_kernel_pages() to no longer call get_kernel_pages() and remove
get_kernel_pages(). Along the way it was noted that shm_get_kernel_pages()
does not have any need to support vmalloc'ed addresses either. Remove that
functionality to clean up the logic.
This series also fixes and uses is_kmap_addr().
Ira Weiny (4):
highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings
tee: Remove vmalloc page support
tee: Remove call to get_kernel_pages()
mm: Remove get_kernel_pages()
drivers/tee/tee_shm.c | 41 ++++++++++++--------------------
include/linux/highmem-internal.h | 5 +++-
include/linux/mm.h | 2 --
mm/swap.c | 30 -----------------------
4 files changed, 19 insertions(+), 59 deletions(-)
base-commit: 274d7803837da78dfc911bcda0d593412676fc20
--
2.37.2
Hi All,
This series is just some refactoring in preparation to add FF-A v1.1
support. It doesn't have any memory layout or notification changes
supported in v1.1 yet.
Regards,
Sudeep
v2[2]->v3:
- Fixed the logic to set 32bit mode which was wrong.
- Ensured that we advance each partition info size by returned
size even if the size is greater than the partition_info structure,
we will still just copy the right size.
v1[1]->v2[2]:
- Merged dropping of ffa_ops in optee_ffa structure and using
ffa_dev->ops into single patch
- Added separate patch(didn't fit any patch strictly to fit in)
to rename ffa_dev_ops as ffa_ops as suggested by Sumit
- Fixed some minor comments, handling size > structure size in
partition_info_get and added extra parameter to ffa_features
to get both possible output/interface properties.
[1] https://lore.kernel.org/all/20220830100700.344594-1-sudeep.holla@arm.com
[2] https://lore.kernel.org/all/20220902124032.788488-1-sudeep.holla@arm.com
Sudeep Holla (10):
firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev
tee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly
firmware: arm_ffa: Remove ffa_dev_ops_get()
firmware: arm_ffa: Add support for querying FF-A features
firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported
firmware: arm_ffa: Make memory apis ffa_device independent
firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
firmware: arm_ffa: Add v1.1 get_partition_info support
firmware: arm_ffa: Set up 32bit execution mode flag using partiion property
firmware: arm_ffa: Split up ffa_ops into info, message and memory operations
drivers/firmware/arm_ffa/bus.c | 4 +-
drivers/firmware/arm_ffa/driver.c | 131 +++++++++++++++++++++++-------
drivers/tee/optee/ffa_abi.c | 46 +++++------
drivers/tee/optee/optee_private.h | 1 -
include/linux/arm_ffa.h | 36 +++++---
5 files changed, 151 insertions(+), 67 deletions(-)
--
2.37.3
Hi All,
This series is just some refactoring in preparation to add FF-A v1.1
support. It doesn't have any memory layout or notification changes
supported in v1.1 yet.
Regards,
Sudeep
v1[1]->v2:
- Merged dropping of ffa_ops in optee_ffa structure and using
ffa_dev->ops into single patch
- Added separate patch(didn't fit any patch strictly to fit in)
to rename ffa_dev_ops as ffa_ops as suggested by Sumit
- Fixed some minor comments, handling size > structure size in
partition_info_get and added extra parameter to ffa_features
to get both possible output/interface properties.
[1] https://lore.kernel.org/all/20220830100700.344594-1-sudeep.holla@arm.com/
Sudeep Holla (10):
firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev
tee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly
firmware: arm_ffa: Remove ffa_dev_ops_get()
firmware: arm_ffa: Add support for querying FF-A features
firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported
firmware: arm_ffa: Make memory apis ffa_device independent
firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
firmware: arm_ffa: Add v1.1 get_partition_info support
firmware: arm_ffa: Set up 32bit execution mode flag using partiion property
firmware: arm_ffa: Split up ffa_ops into info, message and memory operations
drivers/firmware/arm_ffa/bus.c | 4 +-
drivers/firmware/arm_ffa/driver.c | 130 +++++++++++++++++++++++-------
drivers/tee/optee/ffa_abi.c | 46 +++++------
drivers/tee/optee/optee_private.h | 1 -
include/linux/arm_ffa.h | 36 ++++++---
5 files changed, 150 insertions(+), 67 deletions(-)
--
2.37.3
+ TEE ML
On Fri, 2 Sept 2022 at 18:48, Maximilian Luz <luzmaximilian(a)gmail.com> wrote:
>
> Hi,
>
> On 9/2/22 09:26, Sumit Garg wrote:
> > Hi Maximilian,
> >
> > On 02/08/22 18:52, Maximilian Luz wrote:
>
> [...]
>
> >> Thanks for this information! So as far as I understand it, this is currently an
> >> interface to user-space only, i.e. does not allow in-kernel drivers for apps?
> >
> > The Linux TEE framework already provides an in-kernel interface to TEE as well via TEE bus [1]. There are already multiple kernel drivers [2] [3] [4] [5] [6] [7] using it. So an EFI driver can be an addition to that.
> >
> > Now coming on to TEE implementations, the drivers I mentioned are based on OP-TEE where devices are queried/enumerated during OP-TEE probe here [8]. So in similar manner QTEE smcinvoke driver should be able to register devices on the TEE bus.
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Doc…
> >
> > [2] drivers/char/tpm/tpm_ftpm_tee.c
> >
> > [3] drivers/char/hw_random/optee-rng.c
> >
> > [4] drivers/firmware/arm_scmi/optee.c
> >
> > [5] security/keys/trusted-keys/trusted_tee.c
> >
> > [6] drivers/firmware/broadcom/tee_bnxt_fw.c
> >
> > [7] drivers/rtc/rtc-optee.c
> >
> > [8] drivers/tee/optee/device.c
>
> Thanks for those links!
>
> I think it would indeed be good if we could make it work via that
> interface and I guess that should generally be possible. As far as I can
> see, the biggest problem might be that the current firmware doesn't seem
> to use UUIDs, so I guess we might need to emulate them somehow.
>
Okay, so I had a brief look at your driver to get an idea how QTEE
identifies its trusted/secure applications. AFAIU, it uses constant
strings as follows:
#define QCTEE_UEFISEC_APP_NAME "qcom.tz.uefisecapp"
I think we should be able to extend the TEE bus concept to accept
constant strings as device IDs as well. So if a driver wants to
support both OP-TEE and QTEE based apps then it can put corresponding
identifiers (UUID or a constant string) in the TEE device match ID
table. This way we should be able to support other TEE implementations
as I think any other identifier apart from UUID can be represented as
a constant string.
If anyone else has any better then feel free to discuss.
-Sumit
> It would be great if someone with some actual knowledge of the firmware
> used on those devices could have a look at this and provide some
> insights.
>
> My plan for now is to hold off on the UEFI variable driver until we have
> a (proper) TEE driver, which unfortunately might be a bit out of my
> depth. I'm happy to help out in any way I can though.
>
> Regards,
> Max
Hi All,
This series is just some refactoring in preparation to add FF-A v1.1 support.
It doesn't have any memory layout or notification changes supported in v1.1
yet.
Regards,
Sudeep
Sudeep Holla (9):
firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev
tee: optee: Use ffa_dev->ops directly
firmware: arm_ffa: Remove ffa_dev_ops_get()
firmware: arm_ffa: Add support for querying FF-A features
firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported
firmware: arm_ffa: Make memory apis ffa_device independent
firmware: arm_ffa: Add v1.1 get_partition_info support
tee: optee: Drop ffa_ops in optee_ffa structure
firmware: arm_ffa: Split up ffa_dev_ops into info, message and memory operations
drivers/firmware/arm_ffa/bus.c | 4 +-
drivers/firmware/arm_ffa/driver.c | 111 ++++++++++++++++++++++--------
drivers/tee/optee/ffa_abi.c | 40 +++++------
drivers/tee/optee/optee_private.h | 1 -
include/linux/arm_ffa.h | 34 +++++----
5 files changed, 127 insertions(+), 63 deletions(-)
--
2.37.2
Hello arm-soc maintainers,
Please pull this small patch which fixes a recently introduced compiler
warning the TEE subsystem.
Thanks,
Jens
The following changes since commit 1c23f9e627a7b412978b4e852793c5e3c3efc555:
Linux 6.0-rc2 (2022-08-21 17:32:54 -0700)
are available in the Git repository at:
https://git.linaro.org/people/jens.wiklander/linux-tee.git tags/tee-fix-for-v6.0
for you to fetch changes up to eccd7439709810127563e7e3e49b8b44c7b2791d:
tee: fix compiler warning in tee_shm_register() (2022-08-25 11:40:06 +0200)
----------------------------------------------------------------
Add a missing include in the TEE subsystem
----------------------------------------------------------------
Jens Wiklander (1):
tee: fix compiler warning in tee_shm_register()
drivers/tee/tee_shm.c | 1 +
1 file changed, 1 insertion(+)