Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SQL-FS #1490

Merged
merged 1 commit into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,15 @@ script:
- $make CFG_REE_FS=n CFG_RPMB_FS=y
- $make CFG_WITH_USER_TA=n CFG_CRYPTO=n CFG_SE_API=n CFG_PCSC_PASSTHRU_READER_DRV=n
- $make CFG_SMALL_PAGE_USER_TA=n
- $make CFG_SQL_FS=y
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_SQL_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y DEBUG=1
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_SQL_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y DEBUG=1
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
- $make CFG_BUILT_IN_ARGS=y CFG_PAGEABLE_ADDR=0 CFG_NS_ENTRY_ADDR=0 CFG_DT_ADDR=0 CFG_DT=y
- $make CFG_TA_GPROF_SUPPORT=y CFG_ULIBS_GPROF=y
- $make CFG_SECURE_DATA_PATH=y

# QEMU-ARMv8A
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y CFG_RPMB_FS=y CFG_SQL_FS=y
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y CFG_RPMB_FS=y
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y CFG_TA_GPROF_SUPPORT=y CFG_ULIBS_GPROF=y

# SUNXI(Allwinner A80)
Expand Down
30 changes: 6 additions & 24 deletions core/include/optee_msg_supplicant.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,16 @@
*/
#define OPTEE_MSG_RPC_CMD_FS 2

/*
* Values 3-7 are reserved in optee_msg.h for use by the kernel driver
*/
/* Was OPTEE_MSG_RPC_CMD_SQL_FS, which isn't supported any longer */
#define OPTEE_MSG_RPC_CMD_SQL_FS_RESERVED 8

/*
* SQLite file system access
* Values 3-7 are reserved in optee_msg.h for use by the kernel driver
*/
#define OPTEE_MSG_RPC_CMD_SQL_FS 8

/*
* Define protocol for messages with .cmd == OPTEE_MSG_RPC_CMD_FS or
* .cmd == OPTEE_MSG_RPC_CMD_SQL_FS and first parameter has the attribute
* OPTEE_MSG_ATTR_TYPE_VALUE_INPUT.
* Define protocol for messages with .cmd == OPTEE_MSG_RPC_CMD_FS and first
* parameter has the attribute OPTEE_MSG_ATTR_TYPE_VALUE_INPUT.
*/

/*
Expand Down Expand Up @@ -159,24 +156,9 @@
#define OPTEE_MRF_READDIR 10

/*
* Begins a new transaction (only valid for SQL FS)
*
* [in] param[0].u.value.a OPTEE_MRF_BEGIN_TRANSACTION
* End of definitions for messages with .cmd == OPTEE_MSG_RPC_CMD_FS
*/
#define OPTEE_MRF_BEGIN_TRANSACTION 11

/*
* Ends a transaction (only valid for SQL FS)
*
* [in] param[0].u.value.a OPTEE_MRF_END_TRANSACTION
* [in] param[0].u.value.b true if rolling back to previous state
*/
#define OPTEE_MRF_END_TRANSACTION 12

/*
* End of definitions for messages with .cmd == OPTEE_MSG_RPC_CMD_FS or
* .cmd == OPTEE_MSG_RPC_CMD_SQL_FS
*/
/*
* Send TA profiling information to normal world
*
Expand Down
5 changes: 1 addition & 4 deletions core/include/tee/tee_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,5 @@ extern const struct tee_file_operations ree_fs_ops;
#ifdef CFG_RPMB_FS
extern const struct tee_file_operations rpmb_fs_ops;
#endif
#ifdef CFG_SQL_FS
extern const struct tee_file_operations sql_fs_ops;
#endif

#endif
#endif /*TEE_FS_H*/
6 changes: 1 addition & 5 deletions core/include/tee/tee_fs_rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,8 @@ TEE_Result tee_fs_rpc_closedir(uint32_t id, struct tee_fs_dir *d);
TEE_Result tee_fs_rpc_readdir(uint32_t id, struct tee_fs_dir *d,
struct tee_fs_dirent **ent);

TEE_Result tee_fs_rpc_begin_transaction(uint32_t id);
TEE_Result tee_fs_rpc_end_transaction(uint32_t id, bool rollback);

struct thread_specific_data;
#if defined(CFG_WITH_USER_TA) && \
(defined(CFG_REE_FS) || defined(CFG_SQL_FS) || defined(CFG_RPMB_FS))
#if defined(CFG_WITH_USER_TA) && (defined(CFG_REE_FS) || defined(CFG_RPMB_FS))
/* Frees the cache of allocated FS RPC memory */
void tee_fs_rpc_cache_clear(struct thread_specific_data *tsd);
#else
Expand Down
1 change: 0 additions & 1 deletion core/lib/libtomcrypt/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ endif

cryp-enable-all-depends = $(call cfg-enable-all-depends,$(strip $(1)),$(foreach v,$(2),CFG_CRYPTO_$(v)))
$(eval $(call cryp-enable-all-depends,CFG_REE_FS, AES ECB CTR HMAC SHA256 GCM))
$(eval $(call cryp-enable-all-depends,CFG_SQL_FS, AES ECB CTR HMAC SHA256 GCM))
$(eval $(call cryp-enable-all-depends,CFG_RPMB_FS, AES ECB CTR HMAC SHA256 GCM))

# Dependency checks: warn and disable some features if dependencies are not met
Expand Down
4 changes: 1 addition & 3 deletions core/tee/fs_htree.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@
* block 0 is represented by node 1.
*
* Where different elements are stored in the file is managed by the file
* system. In the case of SQL FS the version of the node/block is ignored
* as the atomic update is finalized with a call to
* tee_fs_rpc_end_transaction().
* system.
*/

#define HTREE_NODE_COMMITTED_BLOCK BIT32(0)
Expand Down
10 changes: 4 additions & 6 deletions core/tee/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ srcs-y += tee_svc_cryp.c
srcs-y += tee_svc_storage.c
srcs-$(CFG_RPMB_FS) += tee_rpmb_fs.c
srcs-$(CFG_REE_FS) += tee_ree_fs.c
srcs-$(CFG_SQL_FS) += tee_sql_fs.c
srcs-$(call cfg-one-enabled,CFG_REE_FS CFG_SQL_FS \
CFG_TEE_CORE_EMBED_INTERNAL_TESTS) += fs_htree.c
srcs-$(call cfg-one-enabled,CFG_REE_FS CFG_TEE_CORE_EMBED_INTERNAL_TESTS) += \
fs_htree.c
srcs-$(CFG_REE_FS) += fs_dirfile.c
srcs-$(call cfg-one-enabled,CFG_REE_FS CFG_SQL_FS) += tee_fs_rpc.c
srcs-$(call cfg-one-enabled,CFG_REE_FS CFG_SQL_FS CFG_RPMB_FS) += \
tee_fs_rpc_cache.c
srcs-$(CFG_REE_FS) += tee_fs_rpc.c
srcs-$(call cfg-one-enabled,CFG_REE_FS CFG_RPMB_FS) += tee_fs_rpc_cache.c
srcs-y += tee_fs_key_manager.c
srcs-y += tee_obj.c
srcs-y += tee_pobj.c
Expand Down
21 changes: 0 additions & 21 deletions core/tee/tee_fs_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,24 +451,3 @@ TEE_Result tee_fs_rpc_readdir(uint32_t id, struct tee_fs_dir *d,
*ent = &d->d;
return TEE_SUCCESS;
}

TEE_Result tee_fs_rpc_begin_transaction(uint32_t id)
{
struct tee_fs_rpc_operation op = { .id = id, .num_params = 1 };

op.params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
op.params[0].u.value.a = OPTEE_MRF_BEGIN_TRANSACTION;

return operation_commit(&op);
}

TEE_Result tee_fs_rpc_end_transaction(uint32_t id, bool rollback)
{
struct tee_fs_rpc_operation op = { .id = id, .num_params = 1 };

op.params[0].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT;
op.params[0].u.value.a = OPTEE_MRF_END_TRANSACTION;
op.params[0].u.value.b = rollback;

return operation_commit(&op);
}
Loading