| b5219b4c | 15-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: bugfix reading beyond end of file
Bugfix for reading beyond end of a persistent object when the file position is larger the the size of the data stream. Applies to both REE FS and SQL FS.
Rev
core: bugfix reading beyond end of file
Bugfix for reading beyond end of a persistent object when the file position is larger the the size of the data stream. Applies to both REE FS and SQL FS.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bfe62b88 | 15-Sep-2016 |
Joakim Bech <joakim.bech@linaro.org> |
ta-dev-kit: Remove use of platform_flags.mk
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) Reviewed-by: Jerome Forissier <jerome.forissier
ta-dev-kit: Remove use of platform_flags.mk
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 66d9cacf | 10-Jul-2016 |
Philip Attfield <opensource@sequiturlabs.com> |
plat-rpi3: Initial support for RPi3
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro
plat-rpi3: Initial support for RPi3
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| caa9cf53 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: SQL FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
storage: SQL FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 15ace8d3 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: REE FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
storage: REE FS concurrency
Allow concurrent access by multi-session/multi-instance TA.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b81882b2 | 13-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: protect TA directory with a mutex
There is a race condition in the code that creates and deletes trusted storage. If multiple threads invoke a multi-session TA to create and delete differen
storage: protect TA directory with a mutex
There is a race condition in the code that creates and deletes trusted storage. If multiple threads invoke a multi-session TA to create and delete different files (such as xtest 6016), the following can occur:
Thread 1 (create file1) | Thread 2 (delete file2) | | unlink("/TA_dir/file2"); mkdir("/TA_dir"); | | rmdir("/TA_dir"); create("/TA_dir/file1"); | => ENOENT |
Add a mutex to prevent this race condition.
Note: the bug is currently not triggered by xtest 1016 because the test is run for RPMB FS only, and because directory operations are no-ops in the RPMB implementation. The fix will be needed when enabling single-TA concurrency with the REE and SQL backends.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ab43577d | 15-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
travis: be quieter when checking coding rules
Reduce verbosity of checkpatch.pl while still allowing warnings and errors.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
travis: be quieter when checking coding rules
Reduce verbosity of checkpatch.pl while still allowing warnings and errors.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| d8b94110 | 14-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
travis: improve the display of commits
When running checkpatch.pl, show the abbreviated SHA1 and the commit subject instead of the full SHA1 only.
Signed-off-by: Jerome Forissier <jerome.forissier@
travis: improve the display of commits
When running checkpatch.pl, show the abbreviated SHA1 and the commit subject instead of the full SHA1 only.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 3891de79 | 14-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
travis: also check whole diff when pull request has several commits
Address a common situation when a pull request is reviewed. Suppose a PR contains one commit, which causes checkpatch warnings. Th
travis: also check whole diff when pull request has several commits
Address a common situation when a pull request is reviewed. Suppose a PR contains one commit, which causes checkpatch warnings. The author pushes a new commit to fix the warnings. Travis will still complain because it checks every commit in the PR, and the author has no way to make sure the fix is actually correct. To alleviate this problem, add a call to checkpatch that will process the whole diff added by the PR branch to the target branch (i.e., git diff HEAD^1...HEAD^2). In the above example, the Travis status will still be fail until all commits actually comply with the rules, but the PR author can check that his/her contribution is OK as a whole.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| bfdfbe74 | 08-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: add no-map property to res mem
Adds a "no-map" property to the optee@xxx node. Before this patch the node looked like: optee@78000000 { reg = <0x78000000 0x800000>; }; With this patch
core: arm: add no-map property to res mem
Adds a "no-map" property to the optee@xxx node. Before this patch the node looked like: optee@78000000 { reg = <0x78000000 0x800000>; }; With this patch it becomes: optee@78000000 { reg = <0x78000000 0x800000>; no-map; };
This makes it clear to the Linux kernel that it must leave it to the OP-TEE driver to map the reserved memory.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6bb8d499 | 31-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
hikey: increase heap size from 24 KiB to 32 KiB
The current heap size is not enough to run `xtest` when the newly added SQLite FS is enabled (CFG_SQL_FS=y). Let's increase it a bit.
Signed-off-by:
hikey: increase heap size from 24 KiB to 32 KiB
The current heap size is not enough to run `xtest` when the newly added SQLite FS is enabled (CFG_SQL_FS=y). Let's increase it a bit.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 93d4bae9 | 02-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
tee_mm_get_pool_stats(): fix reset of max_allocated
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklan
tee_mm_get_pool_stats(): fix reset of max_allocated
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 52f8b816 | 01-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: add heap allocation failure statistics
Adds the following statistics to the heap allocator and export then via the static TA `core/arch/arm/sta/stats.c` (all of them can be reset):
- num_all
core: add heap allocation failure statistics
Adds the following statistics to the heap allocator and export then via the static TA `core/arch/arm/sta/stats.c` (all of them can be reset):
- num_alloc_fail: number of calls to malloc()/calloc()/realloc() that returned NULL - biggest_alloc_fail: the size in bytes of the largest allocation request that resulted in a failure - biggest_alloc_fail_used: the number of bytes that were allocated at that time
Depends on CFG_WITH_STATS=y.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f3316eeb | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
travis: add CFG_CORE_SANITIZE_{UNDEFINED,KADDRESS}
Adds test compiles for QEMU virt with CFG_CORE_SANITIZE_UNDEFINED and CFG_CORE_SANITIZE_KADDRESS.
Reviewed-by: Etienne Carriere <etienne.carriere@
travis: add CFG_CORE_SANITIZE_{UNDEFINED,KADDRESS}
Adds test compiles for QEMU virt with CFG_CORE_SANITIZE_UNDEFINED and CFG_CORE_SANITIZE_KADDRESS.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1d171f95 | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tes
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v7) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b18dfc62 | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add .early_bss section
Adds .early_bss to be used for variables that would normally land in .bss, but must not since they are updated before .bss is cleared. This section replaces earlier work
core: add .early_bss section
Adds .early_bss to be used for variables that would normally land in .bss, but must not since they are updated before .bss is cleared. This section replaces earlier workarounds using __data for such variables.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 80637c4f | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: rename _end symbol to __end
Renames the _end symbol to __end for consistency with other linker symbols.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wi
core: arm: rename _end symbol to __end
Renames the _end symbol to __end for consistency with other linker symbols.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a50cb361 | 28-Jul-2016 |
Matt Ma <matt.ma@linaro.org> |
ltc: sync from official develop branch
All source files under src directory and header files under include directory have been synced, but have not added all macros newly added in official develop b
ltc: sync from official develop branch
All source files under src directory and header files under include directory have been synced, but have not added all macros newly added in official develop branch and the last synced SHA1 in official develop branch is 6ad52252688bb34f90b5e79da4830a927e87b81f
Signed-off-by: Matt Ma <matt.ma@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: David Brown <david.brown@linaro.org>
show more ...
|
| a681faba | 02-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
trace.h: add macros to unwind and print the call stack (kernel only)
Adds [EIDF]PRINT_STACK() for debugging purposes. Depends on CFG_CORE_UNWIND=y. As a side-effect, also adds a few things that may
trace.h: add macros to unwind and print the call stack (kernel only)
Adds [EIDF]PRINT_STACK() for debugging purposes. Depends on CFG_CORE_UNWIND=y. As a side-effect, also adds a few things that may be useful on their own: __always_inline, read_pc(), read_fp(), read_lr().
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0722881d | 02-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm64: SMC handler: initialize frame pointer to 0
init_regs() should set the frame pointer (x29) to zero to indicate the end of the frame record chain, as required by the Aarch64 AAPCS. Withou
core: arm64: SMC handler: initialize frame pointer to 0
init_regs() should set the frame pointer (x29) to zero to indicate the end of the frame record chain, as required by the Aarch64 AAPCS. Without this, there is no guarantee that unwind_stack() will terminate.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e04653bd | 26-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
travis: run coding style tool on each commit in a pull request
`git format-patch --stdout -1` do not work as expected. In addition to checking only one commit (as opposed to all the commits in a PR)
travis: run coding style tool on each commit in a pull request
`git format-patch --stdout -1` do not work as expected. In addition to checking only one commit (as opposed to all the commits in a PR), it may pick the wrong commit. For instance, when the PR contains several commits, it shows the tip of the target branch instead of the tip of the PR branch. So we have to modify the way the commits are selected.
There are two reasons why a Travis build is triggered: either a pull request, or a branch is pushed to a monitored repository. One can tell the two cases appart thanks to the $TRAVIS_PULL_REQUEST environment variable.
- In the first case (pull request), HEAD is always a merge commit between the development branch and the target branch. Use `git rev-list` to expand the list of commits in HEAD^1..HEAD^2 (those that are in the dev branch but not in the target branch) and ask format-patch to show exactly those commits with `-1 <commit-sha1>`. As a result, all the patches will be checked individually. - In the second case (not a pull request), HEAD is typically not a merge, it is simply the tip of the development branch being monitored. Using '-1 HEAD' is fine.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| b6f862e8 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
storage: sqlfs: save memory when sql_fs_ftruncate() extends a file
There is no need to actually allocate a buffer filled with zeroes in sql_fs_ftruncate(). Instead, update write_block_partial() so t
storage: sqlfs: save memory when sql_fs_ftruncate() extends a file
There is no need to actually allocate a buffer filled with zeroes in sql_fs_ftruncate(). Instead, update write_block_partial() so that a NULL data pointer means all null bytes. This eliminates a large (4K) temporary allocation.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 086a6557 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: promote mdbg_check() messages to TRACE_INFO from TRACE_DEBUG
The memory tracing feature enabled by CFG_TEE_CORE_MALLOC_DEBUG=y or CFG_TEE_TA_MALLOC_DEBUG=y is quite convenient to track mem
libutils: promote mdbg_check() messages to TRACE_INFO from TRACE_DEBUG
The memory tracing feature enabled by CFG_TEE_CORE_MALLOC_DEBUG=y or CFG_TEE_TA_MALLOC_DEBUG=y is quite convenient to track memory leaks or other shortages. Unfortunately, the allocation summary is dumped with the TRACE_DEBUG severity so it is easily burried in lots of debug output. In addition, tracking memory leaks frequently involves running code in a loop, so that the leak better stands out from other allocations. Doing so with debug logs enabled tends to slow things down more than necessary.
Therefore this commit promotes the mdbg_check() message to TRACE_INFO.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 820e8e4c | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
travis: build with CFG_TEE_CORE_MALLOC_DEBUG=y
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wikla
travis: build with CFG_TEE_CORE_MALLOC_DEBUG=y
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 351ecd11 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: fix compile error when CFG_TEE_CORE_MALLOC_DEBUG=y
When CFG_TEE_CORE_MALLOC_DEBUG is enabled, but CFG_TEE_CORE_DEBUG is not, the compiler complains about unused parameters/functions. Fix them
core: fix compile error when CFG_TEE_CORE_MALLOC_DEBUG=y
When CFG_TEE_CORE_MALLOC_DEBUG is enabled, but CFG_TEE_CORE_DEBUG is not, the compiler complains about unused parameters/functions. Fix them by adding __maybe_unused qualifiers.
lib/libutils/isoc/bget_malloc.c: In function ‘assert_header’: lib/libutils/isoc/bget_malloc.c:688:44: error: unused parameter ‘hdr’ [-Werror=unused-parameter] static void assert_header(struct mdbg_hdr *hdr) ^ lib/libutils/isoc/bget_malloc.c: At top level: lib/libutils/isoc/bget_malloc.c:595:16: error: ‘bget_buf_size’ defined but not used [-Werror=unused-function] static bufsize bget_buf_size(void *buf) ^ cc1: all warnings being treated as errors
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|