| d6583096 | 08-Oct-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: arm: add .cantunwind to __gnu_mcount_nc()
The __gnu_mcount_nc() function lacks proper annotation as registers are pushed onto the stack. The unwind table information for this symbol is the
libutils: arm: add .cantunwind to __gnu_mcount_nc()
The __gnu_mcount_nc() function lacks proper annotation as registers are pushed onto the stack. The unwind table information for this symbol is therefore incorrect and stack unwinding may fail in spectacular ways. For example, xtest 1007 enters an infinite loop as ldelf tries to unwind the call stack when the TA panics:
# Platform: QEMU (buildhost)$ make CFG_FTRACE_SUPPORT=y CFLAGS_ta_arm32=-pg run (qemu)$ xtest 1007 ... E/TC:? 0 TA panicked with code 0xbeef E/LD: Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b E/LD: arch: arm E/LD: region 0: va 0x00102000 pa 0x0e300000 size 0x002000 flags rw-s (ldelf) E/LD: region 1: va 0x00104000 pa 0x0e302000 size 0x00c000 flags r-xs (ldelf) E/LD: region 2: va 0x00110000 pa 0x0e30e000 size 0x001000 flags rw-s (ldelf) E/LD: region 3: va 0x00111000 pa 0x0e30f000 size 0x004000 flags rw-s (ldelf) E/LD: region 4: va 0x00115000 pa 0x0e313000 size 0x001000 flags r--s E/LD: region 5: va 0x00116000 pa 0x0e426000 size 0x003000 flags rw-s (stack) E/LD: region 6: va 0x00149000 pa 0x00001000 size 0x02b000 flags r-xs [0] .ta_head .text .plt .rodata .gnu.hash .ARM.extab .ARM.exidx .dynsym .dynstr .hash E/LD: region 7: va 0x00174000 pa 0x0002c000 size 0x0e7000 flags rw-s [0] .dynamic .tdata .tbss .got .rel.got .rel.plt .data .init_array .bss .rel.dyn E/LD: region 8: va 0x00291000 pa 0x00000000 size 0x00b000 flags r-xs [1] .hash .gnu.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text .rodata .ARM.extab .ARM.exidx E/LD: region 9: va 0x0029c000 pa 0x0000a000 size 0x002000 flags rw-s [1] .tdata .tbss .init_array .dynamic .got .data .bss E/LD: [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00149000 (out-br/build/optee_test_ext-1.0/ta/os_test/out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf) E/LD: [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00291000 (out-br/build/optee_test_ext-1.0/ta/os_test_lib/out/libos_test.so) E/LD: Call stack: E/LD: 0x0029481c _utee_panic at optee_os/lib/libutee/arch/arm/utee_syscalls_a32.S:51 E/LD: 0x002944fc TEE_Panic at optee_os/lib/libutee/tee_api_panic.c:24 E/LD: 0x0014c494 ta_entry_panic at out-br/build/optee_test_ext-1.0/ta/os_test/os_test.c:787 E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44 E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44 E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44 [repeats indefinitely]
The bug is triggered by commit 3513f961cda0 ("arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros"). Prior to that commit, the unwind entry for __gnu_mcount_nc() was "0x1 [cantunwind]", probably because the function had no .fnstart/.fnend directive.
This commit adds a .cantunwind directive to restore the previous behavior: unwinding stops at __gnu_mcount_nc(). Since the ftrace code overwrites LR on the stack, it seems there is no simple way to produce correct and comprehensive stack dumps short of introducing an unwind helper function with a knowledge of the ftrace transformation, similar to what ftrace_return() does.
At least with this patch the unwinding code does not fail.
Fixes: 3513f961cda0 ("arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros") Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 919a5a68 | 06-Oct-2020 |
Jerome Forissier <jerome@forissier.org> |
Use fallthrough pseudo-keyword in switch/case statements
Use fallthrough; in switch/case statements. Imported libraries (libtomcrypt, libmbedtls) are not modified to minimize differences with upstre
Use fallthrough pseudo-keyword in switch/case statements
Use fallthrough; in switch/case statements. Imported libraries (libtomcrypt, libmbedtls) are not modified to minimize differences with upstream.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0887ca5f | 06-Oct-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: compiler.h: introduce fallthrough pseudo-keyword
Adds the fallthrough pseudo-keyword to be used in switch/case statements. Tested with GCC 6.2.1, 7.2.1, 8.2.1, 8.3.0, 9.2.1 and Clang 9.0.1
libutils: compiler.h: introduce fallthrough pseudo-keyword
Adds the fallthrough pseudo-keyword to be used in switch/case statements. Tested with GCC 6.2.1, 7.2.1, 8.2.1, 8.3.0, 9.2.1 and Clang 9.0.1 and 10.0.0.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 355fa095 | 24-Sep-2020 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
libutils: do not redefine ARRAY_SIZE
Do not redefine ARRAY_SIZE if it is already defined
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@lina
libutils: do not redefine ARRAY_SIZE
Do not redefine ARRAY_SIZE if it is already defined
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 0bdc8233 | 04-Sep-2020 |
Khoa Hoang <admin@khoahoang.com> |
core: thread: add compiler barrier to thread_set_exceptions()
With compiler optimizer enable (-O2) compiler generate invalid code for thread_get_id_may_fail(). The curr_thread read got re-order afte
core: thread: add compiler barrier to thread_set_exceptions()
With compiler optimizer enable (-O2) compiler generate invalid code for thread_get_id_may_fail(). The curr_thread read got re-order after exceptions unmask.
Signed-off-by: Khoa Hoang <admin@khoahoang.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3513f961 | 03-Sep-2020 |
Jerome Forissier <jerome@forissier.org> |
arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros
This change applies to arm32 assembler sources.
Instead of using UNWIND(.fnstart) after FUNC or LOCAL_FUNC and UNWIND(.fnend) before END_FUN
arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros
This change applies to arm32 assembler sources.
Instead of using UNWIND(.fnstart) after FUNC or LOCAL_FUNC and UNWIND(.fnend) before END_FUNC, let's fold these statements into the FUNC macros.
The .fnstart/.fnend directives mark the start and end of a function with an unwind table entry (.ARM.exidx) and therefore a function without them has no entry and cannot be unwound. This means that a stack dump (on abort or panic) would stop when reaching such a function.
As a result of this patch, a small number of functions now have an entry in the unwind table when they had none before (the functions which were using FUNC or LOCAL_FUNC but had no .fnstart/.fnend). It was almost always a bug and this pacth only increases the size of the .ARM.exidx section by a few bytes (tested on QEMU).
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 827be46c | 03-Sep-2020 |
Jerome Forissier <jerome@forissier.org> |
arm32: move the UNWIND() macro to <asm.S>
All the users of the UNWIND() macro include <asm.S> already, which is therefore a good place to define this macro. Let's move it from <kernel/unwind.h> to <
arm32: move the UNWIND() macro to <asm.S>
All the users of the UNWIND() macro include <asm.S> already, which is therefore a good place to define this macro. Let's move it from <kernel/unwind.h> to <asm.S>, remove a couple of duplicates in assembler files, and drop the useless includes.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e6f01334 | 03-Sep-2020 |
Jerome Forissier <jerome@forissier.org> |
core: remove stack dump macros and multiple log levels
Of the various xPRINT_STACK() macros (x in {E,I,D,F}), only EPRINT_STACK() is used. Let's simplify the code by removing the macros altogether a
core: remove stack dump macros and multiple log levels
Of the various xPRINT_STACK() macros (x in {E,I,D,F}), only EPRINT_STACK() is used. Let's simplify the code by removing the macros altogether and calling print_kernel_stack() instead. Since only the TRACE_ERROR is used, the 'level' argument to print_kernel_stack(), print_stack_arm32() and print_stack_arm64() is removed too.
In addition to simplifying the code, these changes will allow the consolidation of the stack unwinding code between core and ldelf.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 64df747c | 17-Aug-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: embed AEABI personality routines upon CFG_UNWIND
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below:
.../toolchains/aarch32/bin/arm-linux
libutils: embed AEABI personality routines upon CFG_UNWIND
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below:
.../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed
I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue.
Fixes: https://github.com/OP-TEE/optee_test/issues/440 Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e2f03e07 | 04-Jun-2020 |
Jerome Forissier <jerome@forissier.org> |
core: add stack overflow detection
This commit introduces CFG_CORE_DEBUG_CHECK_STACKS to check the stack limits using compiler instrumentation (-finstrument-functions). When enabled, the C compiler
core: add stack overflow detection
This commit introduces CFG_CORE_DEBUG_CHECK_STACKS to check the stack limits using compiler instrumentation (-finstrument-functions). When enabled, the C compiler will insert entry and exit hooks in all functions in the TEE core. On entry, the stack pointer is checked and if an overflow is detected, panic() is called.
How is this helpful since we have stack canaries already? 1. When a dead canary is found, the call stack will give no indication of the root cause of the corruption which may have happened quite some time before. Running the test case again with a debugger attached and a watchpoint on the canary is not always an option. 2. The system may corrupt the stack and hang in an exception handler before the first canary check, for instance, during boot when the temporary stack is used. This code will likely catch such issues, too.
The downside is increased stack usage and a significant runtime overhead which is why this feature should be enabled only for troubleshooting.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, QEMUv8) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f35d131b | 21-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: add sprintf()
Preparing for C++ support in TAs.
Implement sprintf() in libutils.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linar
libutils: add sprintf()
Preparing for C++ support in TAs.
Implement sprintf() in libutils.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 93aade0f | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: mempool: use recursive mutex
The mempool code can be simplified by using a recursive mutex.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carri
core: mempool: use recursive mutex
The mempool code can be simplified by using a recursive mutex.
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 ...
|
| 64fd5a92 | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: atomic.h: add atomic_{load,store}_short()
Adds atomic functions operating on the 'short int' type.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <et
libutils: atomic.h: add atomic_{load,store}_short()
Adds atomic functions operating on the 'short int' type.
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 ...
|
| f86aa9e1 | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: make thread ID a short int
Changes thread_get_id() and thread_get_id_may_fail() to return 'short int' instead of 'int'. That is, 16 bits instead of 32 on all supported architectures which is m
core: make thread ID a short int
Changes thread_get_id() and thread_get_id_may_fail() to return 'short int' instead of 'int'. That is, 16 bits instead of 32 on all supported architectures which is more than enough since the largest thread ID value is (CFG_NUM_THREADS - 1). Note, struct wait_queue_elem::handle is already a short int.
trace_ext_get_thread_id() is not changed (still returns an int) because it is part of the TA API and modifying it would needlessly introduce incompatibilities.
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 ...
|
| 2c028fde | 23-Jun-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee, ldelf: add leading underscore to syscall wrappers
libutee defines assembler wrapper functions for each OP-TEE system call. These wrappers have a utee_ prefix. This commit adds a leading und
libutee, ldelf: add leading underscore to syscall wrappers
libutee defines assembler wrapper functions for each OP-TEE system call. These wrappers have a utee_ prefix. This commit adds a leading underscore so that the names cannot clash with user-defined symbols. Doing so is common practice for "system" libraries, as defined by the C standard in a set of requirements that can be summarized as follows (excerpt from the GNU libc documentation [1]):
[R]eserved names include all external identifiers (global functions and variables) that begin with an underscore (‘_’) and all identifiers regardless of use that begin with either two underscores or an underscore followed by a capital letter are reserved names. This is so that the library and header files can define functions, variables, and macros for internal purposes without risk of conflict with names in user programs.
The utee_*() wrappers are internal to OP-TEE and are not supposed to be called directly by TAs so this should not have any user-visible impact.
Link: [1] https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 769d857b | 04-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: atomic.h: fix atomic_load_u32() types
Prior to this patch was atomic_load_u32() using wrong types, unsigned int instead of the expected uint32_t. Fix this by changing the types.
Reviewed-
libutils: atomic.h: fix atomic_load_u32() types
Prior to this patch was atomic_load_u32() using wrong types, unsigned int instead of the expected uint32_t. Fix this by changing the types.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bef33113 | 18-May-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: confine_array_index: arm64: replace csdb by hint #20
Older compilers such as GCC 6.2 do not support the csdb mnemonic [1]. For better compatibility, replace it by its equivalent: hint #20.
libutils: confine_array_index: arm64: replace csdb by hint #20
Older compilers such as GCC 6.2 do not support the csdb mnemonic [1]. For better compatibility, replace it by its equivalent: hint #20.
CC out/arm/ldelf/ta_elf_rel.o {standard input}: Assembler messages: {standard input}:274: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:371: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:667: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:776: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:1010: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:1084: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:1413: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:1495: Error: unknown mnemonic `csdb' -- `csdb' {standard input}:1671: Error: unknown mnemonic `csdb' -- `csdb' make[1]: *** [mk/compile.mk:157: out/arm/ldelf/ta_elf_rel.o] Error 1
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 7540cb75 | 27-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: confine_array_index: fix clang build trace for Thumb2
Avoid trace 'deprecated instruction in IT block [-Werror,-Winline-asm]' when building with CLang. The message states performance issue
libutils: confine_array_index: fix clang build trace for Thumb2
Avoid trace 'deprecated instruction in IT block [-Werror,-Winline-asm]' when building with CLang. The message states performance issue which is true but prefer the performance cost over the security flaw hence warning trace is removed without embedded code changed.
Fixes: 2b6dd0df52b4 ("confine_array_index.h: add A32 and T32 versions of confine_array_index()") Suggested-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c7c07720 | 25-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: confine_array_index: fix 32bit modes implementation
Fix implementation of confine_array_index() for 32bit Arm and Thumb2 modes as previous implementation did not set the return value expli
libutils: confine_array_index: fix 32bit modes implementation
Fix implementation of confine_array_index() for 32bit Arm and Thumb2 modes as previous implementation did not set the return value explicitly and relied on luck with the layout of the machine code to return the correct value.
Fixes: https://github.com/OP-TEE/optee_os/issues/3799 Fixes: 2b6dd0df52b4 ("confine_array_index.h: add A32 and T32 versions of confine_array_index()") Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu,qemu_v8) Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| a73ebd47 | 19-Mar-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
util.h: add ROUNDUP_DIV(x, y) macro
Adds the ROUNDUP_DIV(x, y) macro which Rounds up to the nearest multiple of y and then divides by y. Safe against overflow, y has to be a multiple of 2 just as in
util.h: add ROUNDUP_DIV(x, y) macro
Adds the ROUNDUP_DIV(x, y) macro which Rounds up to the nearest multiple of y and then divides by y. Safe against overflow, y has to be a multiple of 2 just as in the other two ROUNDUP*() macros.
This macro is intended to be used to convert from "number of bytes" to "number of pages" or similar units. Example: num_pages = ROUNDUP_DIV(num_bytes, SMALL_PAGE_SIZE);
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2b6dd0df | 03-Mar-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
confine_array_index.h: add A32 and T32 versions of confine_array_index()
Adds inline assembly implementations for the A32 and T32 instruction sets. The implementation is based on __load_no_speculate
confine_array_index.h: add A32 and T32 versions of confine_array_index()
Adds inline assembly implementations for the A32 and T32 instruction sets. The implementation is based on __load_no_speculate1() in <speculation_barrier.h>.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6b40e452 | 03-Mar-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: import confine_array_index.h from Fuchsia
Imports confine_array_index.h from [1].
Replaced include statements to suit OP-TEE and removed the namespace directive. Added content from [2] as
libutils: import confine_array_index.h from Fuchsia
Imports confine_array_index.h from [1].
Replaced include statements to suit OP-TEE and removed the namespace directive. Added content from [2] as a comment to clarify the license.
The speculation safe function confine_array_index() is provided with this.
Note that only AArch64 and x86_64 versions of the function is implemented in this commit.
Link: [1] https://fuchsia.googlesource.com/fuchsia/+/39d9b8c2dbb0f6133a835676f8f669b07aca6b30/zircon/system/ulib/fbl/include/fbl/confine_array_index.h Link: [2] https://fuchsia.googlesource.com/fuchsia/+/39d9b8c2dbb0f6133a835676f8f669b07aca6b30/LICENSE
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d408db99 | 12-Feb-2020 |
Jerome Forissier <jerome@forissier.org> |
ftrace: introduce CFG_FTRACE_BUF_WHEN_FULL
Function tracing can become extremely slow in case a big buffer size is used (say, CFG_FTRACE_BUF_SIZE=6000000 instead of the default 2048 bytes). This is
ftrace: introduce CFG_FTRACE_BUF_WHEN_FULL
Function tracing can become extremely slow in case a big buffer size is used (say, CFG_FTRACE_BUF_SIZE=6000000 instead of the default 2048 bytes). This is because of the "shifting" algorithm used when the buffer is full, which copies almost the full buffer before inserting a new line.
In order to mitigate this problem, this patch introduces two new methods to handle the buffer full condition:
1. Discard existing data and write new lines to the beginning of the buffer. 2. Stop adding new lines.
The method can be selected at build time with CFG_FTRACE_BUF_WHEN_FULL. Supported values are "shift", "wrap" and "stop".
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a66805b1 | 29-Jan-2020 |
Jerome Forissier <jerome@forissier.org> |
Move core/include/config.h to lib/libutils/ext/include
In order to be able to use the IS_ENABLED() macro in user space libraries, move config.h from core to libutils.
Signed-off-by: Jerome Forissie
Move core/include/config.h to lib/libutils/ext/include
In order to be able to use the IS_ENABLED() macro in user space libraries, move config.h from core to libutils.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ea4ae5cd | 21-Aug-2019 |
Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> |
trace: Add weak platform tracer function
Add weak platform tracer function This would allow each platform to carry out plat specific logging, possibly to some media for post-mortem analysis
Signed-
trace: Add weak platform tracer function
Add weak platform tracer function This would allow each platform to carry out plat specific logging, possibly to some media for post-mortem analysis
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|