1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
bors[bot] 03d3874e51
Merge #19465 #19981 #19995
19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht

### Contribution description

This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.

### Testing procedure

To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.

### Porting Guide

For external boards:
 - remove the `MTD_NUMOF` definition from `board.h`
 - add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
 - `MTD_0`, `MTD_1`, … defines are no longer needed.

### Issues/PRs references

 Related to PR #19443

19981: Fletcher32: Add incremental API r=benpicco a=bergzand

### Contribution description

This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.

I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.

### Testing procedure

The test has been extended


### Issues/PRs references

None

19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool

### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by  #19954
Fixed conditions for key size macros in `crypto_sizes.h`.

#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.

### Testing procedure
Build `example/psa_crypto` for secure elements and run application

Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 # 
2023-10-19 14:33:24,373 # *** rebooting...

```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-10-19 19:01:12 +00:00
..
analog_util sys/analog_util/dac_util: fix truncation bug 2022-12-09 13:58:12 -05:00
app_metadata
arduino sys/arduino: move pseudo modules to makefiles 2023-06-28 09:09:31 +02:00
auto_init Merge #19825 2023-09-06 10:19:01 +00:00
base64
benchmark sys/benchmark: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:55 +02:00
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
bitfield sys/bitfield: don't set unrelated bits in bf_{set, clear}_all() 2023-03-17 00:08:10 +01:00
bloom
bus sys/bus: model Kconfig 2022-03-11 09:24:12 +01:00
can sys/can: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:53 +02:00
cb_mux
checksum Fletcher32: Add incremental API 2023-10-18 13:22:44 +02:00
chunked_ringbuffer
clif sys: add Kconfig support for clif 2023-05-19 15:03:42 +02:00
coding sys/coding: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:46 +02:00
color sys/color: fix rgb2hsv function 2023-06-05 13:00:23 +02:00
congure sys/congure: move dependency resolution in its own Makefile.dep 2023-06-15 10:27:38 +02:00
cpp11-compat tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
cpp_new_delete sys/cpp_new_delete: fix compilation with clang 2023-07-18 12:24:08 +02:00
crypto tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
cxx_ctor_guards
debug_irq_disable cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div
ecc sys/ecc: model in Kconfig 2023-05-24 09:53:33 +02:00
eepreg sys/eepreg: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:46 +02:00
embunit
entropy_source sys/entropy_source: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:53 +02:00
event sys/event: add event_is_queued() 2023-10-06 18:21:34 +02:00
evtimer sys/evtimer: move dependency resolution in its own Makefile.dep 2023-06-15 10:27:37 +02:00
fido2 tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
fmt Merge #19027 2023-02-17 20:09:53 +00:00
frac
fs vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
fuzzing fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
include Merge #19465 #19981 #19995 2023-10-19 19:01:12 +00:00
iolist sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
isrpipe sys/isrpipe: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:48 +02:00
libc sys/string_utils: add memchk() 2023-05-30 20:39:10 +02:00
log_color sys/log_color: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:50 +02:00
log_printfnoformat sys/log: modularize log into log_color and log_printfnoformat 2022-10-12 12:21:29 +02:00
luid sys/luid: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:49 +02:00
malloc_thread_safe sys/malloc_tracing: add module to trace dyn memory management 2022-11-15 12:59:46 +01:00
matstat
memarray
mineplex
net Merge #19968 2023-10-17 14:20:41 +00:00
newlib_syscalls_default cpu/msp430: reorganize code 2023-06-19 17:14:57 +02:00
od sys/od: increase the size of str_pos variable 2023-07-06 13:27:58 +02:00
oneway-malloc
phydat sys/phydat: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:52 +02:00
picolibc_syscalls_default sys/picolibc_syscalls_default: Fix read/write return for picolibc >= 1.8 2023-03-03 12:04:48 -08:00
pipe sys/pipe: model in Kconfig 2023-05-24 09:53:35 +02:00
pm_layered sys/pm_layered: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:52 +02:00
posix posix_sockets.c: Fix 16 bit integer compilation errors 2023-09-27 16:18:14 +00:00
preprocessor sys/preprocessor: add Kconfig file 2022-10-17 10:38:14 +02:00
progress_bar
ps
psa_crypto tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
puf_sram sys/puf_sram: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
random sys/random: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
riotboot sys/riotboot: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:56 +02:00
rtc_utils
rust_riotmodules rust_riotmodules: pub use instead of extern crate 2022-07-10 21:27:13 +02:00
rust_riotmodules_standalone Rust: Update riot-wrappers 2023-04-25 09:20:58 +02:00
saul_reg sys/saul_reg: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:51 +02:00
sched_round_robin sys/sched_round_robin: move deps resolution in its own Makefile.dep 2023-06-15 10:24:51 +02:00
schedstatistics sys/schedstatistics: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:50 +02:00
sema sys/sema*: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:49 +02:00
sema_inv sys/sema*: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:49 +02:00
senml sys/senml: cleanup dependency resolution 2023-06-15 10:24:52 +02:00
seq
shell Merge #19963 #19971 #19974 #19975 #19976 2023-10-16 15:31:25 +00:00
shell_lock sys/shell_lock: fix compilation with llvm 2023-07-18 12:24:08 +02:00
ssp sys/ssp: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:47 +02:00
stdio_nimble sys/stdio_nimble: fix -Wformat-nonliteral warning 2023-07-18 12:24:08 +02:00
stdio_null Merge #18459 #18724 #19081 #19082 #19136 2023-01-13 13:50:55 +00:00
stdio_rtt sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
stdio_semihosting core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_uart core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_udp sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
suit sys/suit: fix compilation with clang 2023-07-18 12:24:08 +02:00
test_utils sys/test_utils: fix path to rmutex test in doc 2023-05-13 18:27:58 +02:00
timex
tiny_strerror sys/tiny_strerror: make use of flash_utils.h 2023-02-27 23:25:13 +01:00
trace sys/trace: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:47 +02:00
trickle sys/trickle: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:48 +02:00
tsrb
universal_address
uri_parser sys/uri_parser: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:57 +02:00
usb sys/usbus/msc: use MTD pointers in XFA for LUN handling 2023-10-02 12:28:08 +02:00
usb_board_reset sys/usb_board_reset: allow to enable it also for stdio_usb_serial_jtag 2023-02-06 16:19:11 +01:00
ut_process sys/ut_process: move dependency resolution in its own Makefile.dep 2023-06-15 10:27:38 +02:00
uuid sys/uuid: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:56 +02:00
vfs sys/vfs*: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
vfs_util sys/vfs*: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
xtimer sys/xtimer: switch default backend to ztimer 2022-03-18 08:23:00 +01:00
zptr
ztimer Merge #19817 #19826 #19841 #19842 2023-07-24 10:50:36 +00:00
ztimer64
doc.txt sys/doc.txt: add sys_compression doxygen group 2023-02-27 15:09:08 +01:00
Kconfig sys: Add PSA Crypto Module 2023-08-31 14:38:49 +02:00
Kconfig.newlib sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
Kconfig.picolibc pkg/tinyusb: sys: fix stdio buffered inclusion in Kconfig 2023-06-17 15:12:31 +02:00
Kconfig.stdio pkg/tinyusb: sys: fix stdio buffered inclusion in Kconfig 2023-06-17 15:12:31 +02:00
Makefile sys: Add PSA Crypto Module 2023-08-31 14:38:49 +02:00
Makefile.dep sys: Add PSA Crypto Module 2023-08-31 14:38:49 +02:00
Makefile.include sys: Add PSA Crypto Module 2023-08-31 14:38:49 +02:00