History log of /optee_os/core/tee/tee_pobj.c (Results 1 – 18 of 18)
Revision Date Author Comments
# 5ca2c365 10-Jan-2024 Clement Faure <clement.faure@nxp.com>

core: remove unnecessary includes

Remove unnecessary includes.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander

core: remove unnecessary includes

Remove unnecessary includes.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 0f50ba5a 28-Nov-2023 Jens Wiklander <jens.wiklander@linaro.org>

core: fix objectUsage handling for persistent objects

Before this patch was the object usage field stored in the
non-persistent part of an object handle, regardless of whether the
storage object was

core: fix objectUsage handling for persistent objects

Before this patch was the object usage field stored in the
non-persistent part of an object handle, regardless of whether the
storage object was persistent. This prevents updates to this field from
being restored the next time the persistent object is opened. Updates to
the field are also not replicated to eventual other open handles for the
object. Fix this by storing the "usage" bits in a new obj_info_usage
field in struct tee_pobj for persistent objects. Updates to the field
are also written into secure storage to preserve the content the next
time the object is opened.

Fixes: b01047730e77 ("Open-source the TEE Core")
Closes: https://github.com/OP-TEE/optee_os/issues/6495
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 2b758a1a 21-Apr-2021 Jerome Forissier <jerome@forissier.org>

core: tee_pobj_get(): detect access conflict

When tee_pobj_get() is called with TEE_POBJ_USAGE_CREATE and without
TEE_DATA_FLAG_OVERWRITE, and the persistent object is found in the list of
open obje

core: tee_pobj_get(): detect access conflict

When tee_pobj_get() is called with TEE_POBJ_USAGE_CREATE and without
TEE_DATA_FLAG_OVERWRITE, and the persistent object is found in the list of
open objects, the function should return TEE_ERROR_ACCESS_CONFLICT
immediately. There is no need to call into the FS layer since we know
the object exists at this point.

Fixes: https://github.com/OP-TEE/optee_os/issues/4560
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 63146177 19-Aug-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: add tee_pobj_create_final()

Adds tee_pobj_create_final() which finalized a create operation. Until
tee_pobj_create_final() has been called the struct pobj cannot be shared
with any other objec

core: add tee_pobj_create_final()

Adds tee_pobj_create_final() which finalized a create operation. Until
tee_pobj_create_final() has been called the struct pobj cannot be shared
with any other object.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 928efd06 18-Aug-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: syscall_storage_next_enum() use live pobj

Instead of using a fake pobj in syscall_storage_next_enum() retrieve the
shared pobj instead in order to get the flags of an already opened
object.

T

core: syscall_storage_next_enum() use live pobj

Instead of using a fake pobj in syscall_storage_next_enum() retrieve the
shared pobj instead in order to get the flags of an already opened
object.

TEE_POBJ_USAGE_ENUM is supplied to tee_pobj_get() to avoid checking for
conflicts with how the pobj is already used.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6885abf2 18-Aug-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: tee_pobj_get() takes an enum tee_pobj_usage

Changes tee_pobj_get() to take an enum tee_pobj_usage usage instead of a
bool temporary.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signe

core: tee_pobj_get() takes an enum tee_pobj_usage

Changes tee_pobj_get() to take an enum tee_pobj_usage usage instead of a
bool temporary.

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# dc0f4ec2 16-May-2018 Etienne Carriere <etienne.carriere@st.com>

Remove license notice from STMicroelectronics files

Since a while the source files license info are defined by SPDX
identifiers. We can safely remove the verbose license text from the
files that are

Remove license notice from STMicroelectronics files

Since a while the source files license info are defined by SPDX
identifiers. We can safely remove the verbose license text from the
files that are owned by either only STMicroelectronics or only both
Linaro and STMicroelectronics.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 1bb92983 15-Dec-2017 Jerome Forissier <jerome.forissier@linaro.org>

Add SPDX license identifiers

Adds one SPDX-License-Identifier line [1] to each source files that
contains license text.

Generated by [2]:
spdxify.py --add-spdx optee_os/

The scancode tool [3] wa

Add SPDX license identifiers

Adds one SPDX-License-Identifier line [1] to each source files that
contains license text.

Generated by [2]:
spdxify.py --add-spdx optee_os/

The scancode tool [3] was used to double check the license matching
code in the Python script. All the licenses detected by scancode are
either detected by spdxify.py, or have no SPDX identifier, or are false
matches.

Link: [1] https://spdx.org/licenses/
Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py
Link: [3] https://github.com/nexB/scancode-toolkit
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# 05c5cd2e 08-Nov-2017 Volodymyr Babchuk <vlad.babchuk@gmail.com>

tee: fix improper calloc usage

calloc() takes number of entries as first argument, and size of entry
as a second. There was several places, where argument order was
reversed.

Signed-off-by: Volodym

tee: fix improper calloc usage

calloc() takes number of entries as first argument, and size of entry
as a second. There was several places, where argument order was
reversed.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# b2215adf 15-Mar-2017 Jens Wiklander <jens.wiklander@linaro.org>

core: FS: replace file name with struct tee_pobj

Replaces the file name with a pointer to corresponding struct tee_pobj
instead in the file operation interface.

Reviewed-by: Jerome Forissier <jerom

core: FS: replace file name with struct tee_pobj

Replaces the file name with a pointer to corresponding struct tee_pobj
instead in the file operation interface.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey, GP)
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260, GP)
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5acf809a 28-Nov-2016 Jens Wiklander <jens.wiklander@linaro.org>

core: protect tee_pobj functions with mutex

The tee_pobj functions can be called concurrently, add a mutex to
protect the internal state.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

core: protect tee_pobj functions with mutex

The tee_pobj functions can be called concurrently, add a mutex to
protect the internal state.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP Base model)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# b44708c1 18-Apr-2016 Jerome Forissier <jerome.forissier@linaro.org>

core: secure storage: dual filesystems support

Adds support for multiple filesystems by keeping a pointer to
tee_file_operations in the tee_pobj and tee_storage_enum structures.

Two identifiers are

core: secure storage: dual filesystems support

Adds support for multiple filesystems by keeping a pointer to
tee_file_operations in the tee_pobj and tee_storage_enum structures.

Two identifiers are added to the API to be used as the storage_id
parameter, so that TAs may dynamically choose the filesystem:
- TEE_STORAGE_PRIVATE_REE (requires CFG_REE_FS=y)
- TEE_STORAGE_PRIVATE_RPMB (requires CFG_RPMB_FS=y)
The value TEE_STORAGE_PRIVATE will select the REE FS if available,
otherwise RPMB. At least one FS has to be enabled at build time. Only
the REE filesystem is enabled by default.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...


# 84431ae3 22-Apr-2015 Cedric Chaumont <cedric.chaumont@st.com>

GP Internal Core API v1.1 : TEE_CreatePersistentObject

Deprecated TEE_DATA_FLAG_EXCLUSIVE
Replaced by TEE__DATA_FLAG_OVERWRITE

Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com>
Reviewed-by: J

GP Internal Core API v1.1 : TEE_CreatePersistentObject

Deprecated TEE_DATA_FLAG_EXCLUSIVE
Replaced by TEE__DATA_FLAG_OVERWRITE

Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards)
Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)

show more ...


# abd4a750 12-Feb-2015 Pascal Brand <pascal.brand@st.com>

Persistent Object Sharing Rules adjust with respect to GP v1.1

This patch implements this part of the GlobalPlatform Internal Core API v1.1

Multiple handles may be opened on the same object simulta

Persistent Object Sharing Rules adjust with respect to GP v1.1

This patch implements this part of the GlobalPlatform Internal Core API v1.1

Multiple handles may be opened on the same object simultaneously using
the functions TEE_OpenPersistentObject or TEE_CreatePersistentObject,
but sharing MUST be explicitly allowed. More precisely, at any one
time the following constraints apply: If more than one handle is opened
on the same object, and if any of these object handles was opened with
the flag TEE_DATA_FLAG_ACCESS_READ, then all the object handles MUST have
been opened with the flag TEE_DATA_FLAG_SHARE_READ. There is a corresponding
constraint with the flags TEE_DATA_FLAG_ACCESS_WRITE and
TEE_DATA_FLAG_SHARE_WRITE. Accessing an object with write-meta rights is
exclusive and can never be shared.

When one of the functions TEE_OpenPersistentObject or
TEE_CreatePersistentObject is called and if opening the object would violate
these constraints, then the function returns the return code
TEE_ERROR_ACCESS_CONFLICT.

Fix #174

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Suggested-by: xlyu <jpmhesheit@gmail.com>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...


# 4de4bebc 20-Oct-2014 Jens Wiklander <jens.wiklander@linaro.org>

Merge tee_{core,uta}_trace.h into libutil

Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h
in libutil. Since the trace functions now resides libutil they have
to rely on core and li

Merge tee_{core,uta}_trace.h into libutil

Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h
in libutil. Since the trace functions now resides libutil they have
to rely on core and libutee to provide functions to print to the
log device.

* Keeps compatible interface from tee_kta_trace.h
* Adds TAMSG() and TAMSG_RAW() to log TA related events
* Removes the TRACE_ALWAYS level

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform)
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)

show more ...


# c507e4c2 09-Oct-2014 Jens Wiklander <jens.wiklander@linaro.org>

Remove unused function tee_pobj_init

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>


# c0346845 05-Jun-2014 Jens Wiklander <jens.wiklander@linaro.org>

Add plat-vexpress

* Initial support for Versatile Express of FVP with ARM Trusted
Firmware (ATF below)

* Use entry vector for entering TEE

Align interface between TEE and secure monitor with t

Add plat-vexpress

* Initial support for Versatile Express of FVP with ARM Trusted
Firmware (ATF below)

* Use entry vector for entering TEE

Align interface between TEE and secure monitor with the interface
between OPTEED in ATF and TEE.

Uses an ATF compatible entry vector for entering TEE from internal
secure monitor.

Internal secure monitor saves entry reason to be able to tell when
switching back to nonsecure world if r0-r3 should be preserved (FIQ case)
or returned as is (normal call case).

* Many small fixes of generic problems that could affect other platforms
too.

* Disable unaligned data accesses by adding compiler flag
-mno-unaligned-access

* Adds support for Versatile Express of QEMU with 8 MiB of secure DRAM

show more ...


# b0104773 12-Jun-2014 Pascal Brand <pascal.brand@st.com>

Open-source the TEE Core

Signed-off-by: Pascal Brand <pascal.brand@st.com>