Skip to content

Coccinelle#1

Open
jockebech wants to merge 2 commits intomasterfrom
coccinelle
Open

Coccinelle#1
jockebech wants to merge 2 commits intomasterfrom
coccinelle

Conversation

@jockebech
Copy link
Copy Markdown
Owner

test

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

Testing Jenkins

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech jockebech closed this Nov 27, 2015
@jockebech jockebech reopened this Nov 27, 2015
@jockebech
Copy link
Copy Markdown
Owner Author

ok to test

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

1 similar comment
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech jockebech closed this Nov 27, 2015
@jockebech jockebech reopened this Nov 27, 2015
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

retest this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech jockebech closed this Nov 27, 2015
@jockebech jockebech reopened this Nov 27, 2015
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

1 similar comment
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

3 similar comments
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

start jenkins

1 similar comment
@jockebech
Copy link
Copy Markdown
Owner Author

start jenkins

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

3 similar comments
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

4 similar comments
@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

@jockebech
Copy link
Copy Markdown
Owner Author

test this please

jockebech pushed a commit that referenced this pull request Aug 18, 2017
The first and and fourth lines in the boot sequence below are debug
messages that should not be printed when the log level is INFO:

 INFO:    TEE-CORE: No NSEC DDR memory area defined
 INFO:    TEE-CORE:
 INFO:    TEE-CORE: OP-TEE version: 2.5.0-rc1 #1 Wed Jun 28 15:11:06 UTC 2017 aarch64
 INFO:    TEE-CORE: Shared memory address range: 3dc00000, 3f000000
 INFO:    TEE-CORE: Initialized

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Dec 18, 2018
This commit introduces an algorithm that may be used to detect improper
usage of locks at runtime. It can detect two kinds errors:

 1. A thread tries to release a lock it does not own,
 2. A thread tries to aquire a lock and the operation could *potentially*
    result in a deadlock.

The potential deadlock detection assumes that the code adheres to a strict
locking hierarchy, in other word, that there is a partial ordering on the
locks so that there can be no situation where circular waits can occur. To
put things simply, any two locks should be acquired in the same order in
the same thread. This addresses the following case:

  [Thread #1]  [Thread #2]

    lock(A)
                 lock(B)
    lock(B)
                 lock(A) <-- deadlock!
      ...

The algorithm builds the lock hierarchy dynamically and reports as soon as
a violation is detected.

The interface is made of two functions: lockdep_lock_acquire() and
lockdep_lock_release(), which are meant to be introduced in the
implementation of the actual lock objects. The "acquire" hook tells the
algorithm that a particular lock is about to be requested by a particular
thread, while the "release" hook is meant to be called before the lock is
actually released. If an error is detected, debugging information is sent
to the console, and panic() is called. The debugging information includes
the lock cycle that was detected (in the above example, {A, B}), as well
as the call stacks at the points where the locks were acquired.

The good thing with such an instrumentation of the locking code is that
there is no need to wait for an actual deadlock to occur in order to
detect potential problems. For instance, the timing of execution in the
above example could be different but the problem would still be detected:

  [Thread #1]  [Thread #2]

    lock(A)
    lock(B)
    unlock(B)
    unlock(A)
                 lock(B)
                 lock(A) <-- error!

A pseudo-TA is added for testing (pta/core_lockdep_tests.c).

This code is based on two sources:
- A presentation called "Dl-Check: dynamic potential deadlock detection
tool for Java programs" [1], although the somewhat complex MNR algorithm
for topological ordering of a DAG was not used;
- A depth-first search algorithm [2] was used instead.

Link: [1] https://www.slideshare.net/IosifItkin/tmpa2017-dlcheck-dynamic-potential-deadlock-detection-tool-for-java-programs
Link: [2] https://en.wikipedia.org/wiki/Topological_sorting#Depth-first_search
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>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Aug 2, 2019
The memory tests in core_self_tests.c call the malloc()/calloc() API
without doing anything meaningful with the output. It turns out that a
clever compiler (read: Clang) will detect this and aggressively
optimize the code, to the point that a call to calloc() is removed
entirely. Here is a reduced test case for the record:

 $ cat test.c
 #include <stdlib.h>

 int main(int argc, char *argv[])
 {
 	return calloc(1000000, 1) ? 1 : 0;
 }
 $ clang --target=arm-linux-gnueabihf -Os -c test.c
 $ llvm-objdump -d test.o

 test.o:	file format ELF32-arm-little

 Disassembly of section .text:
 0000000000000000 main:
        0:	01 00 a0 e3 	mov	r0, #1
        4:	1e ff 2f e1 	bx	lr

No call to calloc() in the generated code! As strange as it may seem,
this is reportedly a valid behavior for the compiler [1].

This optimization is obviously not wanted for the test that tries to
check that allocation of a very large buffer fails in OP-TEE.

This commit adds the -fno-builtins flag to the compiler command for that
particular source file, thus preventing the optimization and making the
test pass.

Link: [1] https://bugs.llvm.org/show_bug.cgi?id=37304
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Jan 9, 2020
When CFG_FTRACE_SUPPORT=y, thumb mode should not be used in TA code,
because the ftrace code assumes arm instructions. Therefore we have to
pass the -marm switch to the compiler and assembler. This is correctly
done for the C compiler but not for the assembler. The same applies to
assembler files in the TEE core when CFG_SYSCALL_FTRACE=y.

More generally and for simplicity, we will assume that all _a32.S files
should be compiled in arm mode and therefore add -marm to
arm32-platform-aflags. Any exception can be handled via file-specific
flags in sub.mk.

Fixes a crash in the setjmp()/longjmp() test of xtest 1006 when Linaro's
GCC 6.2 is used to build the user space libutils.a (more precisely:
lib/libutils/isoc/arch/arm/setjmp_a32.S):

 E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault)
 E/TC:? 0  fsr 0x00000005  ttbr0 0x0e19206a  ttbr1 0x0e18806a  cidr 0x2
 E/TC:? 0  cpu #1          cpsr 0x60000110
 E/TC:? 0  r0 0x00000000      r4 0x00115780    r8 0x00000000   r12 0x00115658
 E/TC:? 0  r1 0x00000001      r5 0x0011fb8c    r9 0x00000000    sp 0x001156a0
 E/TC:? 0  r2 0x00000000      r6 0x60000110   r10 0x00000000    lr 0x00000000
 E/TC:? 0  r3 0x00000000      r7 0x00000000   r11 0x001156bc    pc 0x00000000
 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 0x00a000 flags r-xs (ldelf)
 E/LD:  region  2: va 0x0010e000 pa 0x0e30c000 size 0x001000 flags rw-s (ldelf)
 E/LD:  region  3: va 0x0010f000 pa 0x0e30d000 size 0x003000 flags rw-s (ldelf)
 E/LD:  region  4: va 0x00112000 pa 0x0e310000 size 0x001000 flags r--s
 E/LD:  region  5: va 0x00113000 pa 0x0e444000 size 0x003000 flags rw-s (stack)
 E/LD:  region  6: va 0x0011b000 pa 0x00001000 size 0x024000 flags r-xs [0]
 E/LD:  region  7: va 0x0013f000 pa 0x00025000 size 0x10f000 flags rw-s [0]
 E/LD:  region  8: va 0x00266000 pa 0x00000000 size 0x003000 flags r-xs [1]
 E/LD:  region  9: va 0x00269000 pa 0x00002000 size 0x002000 flags rw-s [1]
 E/LD:  region 10: va 0x00300000 pa 0x40a67570 size 0x001000 flags rw-- (param)
 E/LD:   [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x0011b000
 E/LD:   [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00266000
 E/LD:  Call stack:
 E/LD:   0x00000000

Note: the crash is due to the fact that the compiler was configured for
-mthumb by default, whereas Arm's GCC 8.3 for instance defaults to
-marm. The compiler switches can be checked with:

 $ echo 'void f() {};' | \
     arm-linux-gnueabihf-gcc -frecord-gcc-switches -xc -c - -o test
 $ readelf -p .GCC.command.line test

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 27, 2020
Tracing the log syscall is of very little value since it will generate
some output to the console anyways. Worse, it pollutes the TA output in
case of a panic or an abort. For example:

 o regression_4005.1 AE case 0 algo 0x40000710 line 2819
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#27 (syscall_cryp_obj_alloc)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#15 (syscall_cryp_state_alloc)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#27 (syscall_cryp_obj_alloc)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#30 (syscall_cryp_obj_populate)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#29 (syscall_cryp_obj_reset)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#31 (syscall_cryp_obj_copy)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#28 (syscall_cryp_obj_close)
 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#34 (syscall_authenc_init)
 F/TC:?? 0 trace_syscall:132 syscall #2 (syscall_panic)
 E/TC:?? 0
 E/TC:?? 0 TA panicked with code 0xffff0006
 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log)
 E/LD:  Status of TA cb3e5ba0-adf1-11e0-998b-0002a5d5c51b
 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log)
 E/LD:   arch: aarch64
 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log)
 E/LD:  region  0: va 0x40004000 pa 0x100062d000 size 0x002000 flags rw-s (ldelf)
 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log)
 E/LD:  region  1: va 0x40006000 pa 0x100062f000 size 0x00d000 flags r-xs (ldelf)
 ...

Therefore, skip the trace if the syscall number it TEE_SCN_LOG.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds an assert() that  mbedtls_mpi_write_binary() succeeds in
crypto_bignum_bn2bin().

This fixes coverity scan:
CID 1501843 (#1 of 1): Unchecked return value (CHECKED_RETURN).

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds an assert() that  mbedtls_mpi_copy() succeeds in
crypto_bignum_copy().

This fixes coverity scan:
CID 1501791 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
The gcd parameter passed to TEE_BigIntComputeExtendedGcd() must not
be NULL so skip the unnecessary NULL check.

This fixes coverity scan:
CID 1501842 (#1 of 1): Dereference after null check (FORWARD_NULL)

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds an assert() that  snprintf() succeeds in file_num_to_str().

This fixes coverity scan:
CID 1501823 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
system_dlsym() takes a uuid in one of the memref parameters. Prior to
this patch that memref wasn't checked correctly in all cases.
system_dlsym() passes the uuid to ldelf_dlsym() which uses this uuid so
the pointer must be valid and of the expected size. Fix this by checking
that the pointer is non-NULL and of the correct size.

This fixes coverity scan:
CID 1501812 (#1 of 1): Dereference after null check (FORWARD_NULL)

Fixes: ebef121 ("core, ldelf: add support for runtime loading of shared libraries")
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds another check of srcLen in TEE_CipherDoFinal() before calling
tee_buffer_update() to make sure that we don't dereference destLen when
it's NULL.

This fixes coverity scan:
CID 1501811 (#1 of 1): Dereference after null check (FORWARD_NULL)

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds a check for the return value from snprintf() in
add_res_mem_dt_node(). In case snprintf() has failed of truncates the
output a debug warning in the log.

This fixes coverity scan:
CID 1501804 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Adds checks in e32_relocate() that sym_tab is assigned a symbol table
before using it.

This fixes coverity scan:
CID 1501826 (#1 of 3): Explicit null dereferenced (FORWARD_NULL)
CID 1501826 (#2 of 3): Explicit null dereferenced (FORWARD_NULL)
CID 1501826 (#3 of 3): Explicit null dereferenced (FORWARD_NULL)

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
In tee_fs_dirfile_get_tmp() dirh->files is checked to be not NULL
leading but at another place dirh->nbits is checked instead before
accessing dirh->files. Both checks are OK since dirh->files mustn't be
NULL if dirh->nbits is larger than 0.

This confuses coverity to emit a warning, so change the function to
check dirh->nbits instead.

This fixes coverity scan:
CID 1501821 (#1 of 1): Dereference after null check (FORWARD_NULL)

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
In populate_files() db->files is checked to be not NULL leading but at
another place db->nbits is checked instead before accessing db->files.
Both checks are OK since db->files mustn't be NULL if db->nbits is
larger than 0.

This confuses coverity to emit a warning, so change the function to
check db->nbits instead.

This fixes coverity scan:
CID 1501793 (#1 of 1): Dereference after null check (FORWARD_NULL)

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Current Mechanisms Specification
Version 2.40 Plus Errata 01
2.1.4 PKCS #1 RSA key pair generation

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Add support for performing RSA signing & verification operations for:

- PKCS #1 v1.5 RSA with supplied hash value
- Multi stage MD5
- Multi stage SHA-1
- Multi stage SHA-224
- Multi stage SHA-256
- Multi stage SHA-384
- Multi stage SHA-512

Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Current Mechanisms Specification
Version 2.40 Plus Errata 01
2.1 RSA

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Add support for performing RSA PSS signing & verification operations for:

- PKCS #1 RSA PSS with supplied hash value
- Multi stage SHA-1
- Multi stage SHA-224
- Multi stage SHA-256
- Multi stage SHA-384
- Multi stage SHA-512

Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Current Mechanisms Specification
Version 2.40 Plus Errata 01
2.1.10 PKCS #1 RSA PSS

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Add support for performing PKCS #1 RSA OAEP encryption & decryption
operations for:

- MGF1 SHA-1
- MGF1 SHA-224
- MGF1 SHA-256
- MGF1 SHA-384
- MGF1 SHA-512

Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Current Mechanisms Specification
Version 2.40 Plus Errata 01
2.1.8 PKCS #1 RSA OAEP

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Nov 18, 2021
Different requirements are in place when importing RSA public key vs.
generaing a new RSA key pair.

Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Current Mechanisms Specification
Version 2.40 Plus Errata 01
2.1.2 RSA public key objects
and
2.1.4 PKCS #1 RSA key pair generation

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Apr 27, 2022
Updates ree_fs_open() to close the dirfile on error. This should take
care of the rare case were the internal file handle in the dirfile has
been closed due to an error.

Fixes an error like:
E/TC:1 1 Core data-abort at address 0xc0 (translation fault)
E/TC:1 1  esr 0x96000006  ttbr0 0x600000e19a020   ttbr1 0x00000000   cidr 0x0
E/TC:1 1  cpu #1          cpsr 0x00000004
E/TC:1 1  x0  00000000000000c0 x1  0000000000000078
E/TC:1 1  x2  000000000e1a0c88 x3  000000000e1a0c28
E/TC:1 1  x4  0000000000000078 x5  000000000e128220
E/TC:1 1  x6  000000000000001f x7  0000000000000000
E/TC:1 1  x8  0000000000000000 x9  0000000000000000
E/TC:1 1  x10 0000000000000000 x11 0000000000000000
E/TC:1 1  x12 0000000000000000 x13 0000000040014f80
E/TC:1 1  x14 0000000000000000 x15 0000000000000000
E/TC:1 1  x16 000000000e12f318 x17 0000000000000000
E/TC:1 1  x18 0000000000000000 x19 0000000000000078
E/TC:1 1  x20 0000000000000000 x21 000000000e1a0c28
E/TC:1 1  x22 00000000ffffffff x23 000000000e1a0c88
E/TC:1 1  x24 000000000e1891c4 x25 000000000e17d1b0
E/TC:1 1  x26 000000000e17de50 x27 000000000e1891c4
E/TC:1 1  x28 0000000000000000 x29 000000000e1a0b90
E/TC:1 1  x30 000000000e128254 elr 000000000e128260
E/TC:1 1  sp_el0 000000000e1a0b90
E/TC:1 1 TEE load address @ 0xe100000
E/TC:1 1 Call stack:
E/TC:1 1  0x0e128260 ree_fs_read_primitive at core/tee/tee_ree_fs.c:311
E/TC:1 1  0x0e129324 read_dent at core/tee/fs_dirfile.c:89
E/TC:1 1  0x0e129770 tee_fs_dirfile_find at core/tee/fs_dirfile.c:213
E/TC:1 1  0x0e128f1c set_name at core/tee/tee_ree_fs.c:664
E/TC:1 1  0x0e125954 tee_svc_storage_init_file at core/tee/tee_svc_storage.c:297
E/TC:1 1  0x0e10d514 tee_svc_do_call at core/arch/arm/tee/arch_svc_a64.S:140
E/TC:1 1  0x0e1062ec thread_svc_handler at core/arch/arm/kernel/thread.c:1585 (discriminator 4)
E/TC:1 1  0x0e103618 el0_svc at core/arch/arm/kernel/thread_a64.S:651

Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
jockebech pushed a commit that referenced this pull request Apr 27, 2022
Add size check in the crypto driver for RSA sign and verify functions.
For both functions, the encoded message length has some size
constraints [1].

[1]: Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography
https://datatracker.ietf.org/doc/html/rfc3447#section-9.1.1

Fixes: f5a70e3 ("drivers: crypto: generic resources for crypto device driver - RSA")
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
jockebech pushed a commit that referenced this pull request Jan 9, 2025
…uild

Fix an issue with the build number in the version string. While at it,
factor out the duplicated code into mk/macros.mk.

Before:

 $ rm -rf out/
 $ make out/arm-plat-vexpress/core/version.o
  UPD     out/arm-plat-vexpress/core/.buildcount
  GEN     out/arm-plat-vexpress/core/version.o
cat: out/arm-plat-vexpress/core/.buildcount: No such file or directory

In addition to the error message, note the missing build number after the
hash sign:

 $ strings out/arm-plat-vexpress/core/version.o | grep UTC
 4.3.0-48-g9c97e7d52 (gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)) # Wed Aug 14 16:17:07 UTC 2024 arm

After:

 $ rm -rf out/
 $ make out/arm-plat-vexpress/core/version.o
  UPD     out/arm-plat-vexpress/core/.buildcount
  GEN     out/arm-plat-vexpress/core/version.o
 $ strings out/arm-plat-vexpress/core/version.o | grep UTC
 4.3.0-48-g9c97e7d52-dev (gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)) #1 Wed Aug 14 16:17:24 UTC 2024 arm

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant