mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 09:55:32 +00:00
Note an interrogation about integer value representation
Especially 0 values may need special treatment since they can't be used as an array size. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
6a530e8d26
commit
3ff79066b1
|
@ -840,6 +840,19 @@ psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION
|
|||
|
||||
## Open questions
|
||||
|
||||
### Value representation
|
||||
|
||||
#### Integers
|
||||
|
||||
It would be better if there was a uniform requirement on integer values. Do they have to be JSON integers? C preprocessor integers (which could be e.g. a macro defined in some header file)? C compile-time constants (allowing `sizeof`)?
|
||||
|
||||
This choice is partly driven by the use of the values, so they might not be uniform. Note that if the value can be zero and it's plausible that the core would want to statically allocate an array of the given size, the core needs to know whether the value is 0 so that it could use code like
|
||||
```
|
||||
#if ACME_FOO_SIZE != 0
|
||||
uint8_t foo[ACME_FOO_SIZE];
|
||||
#endif
|
||||
```
|
||||
|
||||
### Driver declarations
|
||||
|
||||
#### Declaring driver entry points
|
||||
|
|
Loading…
Reference in a new issue