1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include
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
..
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
can drivers/mcp2515: apply the filter to a target mailbox 2022-06-30 10:07:24 +02:00
checksum Fletcher32: Rephrase note on 16 bit word operations 2023-10-18 13:22:44 +02:00
coding sys/coding: add XOR based coding module 2023-02-06 16:21:57 +01:00
congure tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
cppunit core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
crypto tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
ecc doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
embUnit sys/embUnit: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
entropy_source sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event sys/event/timeout: add event_timeout_is_pending() 2023-10-11 22:02:08 +02:00
fido2 fido2/ctap: uncrustify files 2022-09-23 16:42:52 +02:00
fs cpu/native: add host fs access via VFS 2023-04-26 00:53:14 +02:00
hashes tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
isrpipe isrpipe: change API to be in line with tsrb 2019-06-05 18:13:57 +02:00
net tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
psa_crypto/psa sys/psa_crypto: Fix conditions for public key max export size 2023-10-19 14:12:14 +02:00
riotboot bootloaders: fix bootloader button logic 2023-03-08 13:07:42 +01:00
senml sys/phydat: Fix unit confusion 2023-02-23 16:44:24 +01:00
suit sys/suit: Introduce functions to provide a manifest in memory 2023-05-27 21:01:18 +02:00
sys sys/bus: add system buses 2020-11-12 22:50:53 +01:00
test_utils tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
usb Merge #19465 #19981 #19995 2023-10-19 19:01:12 +00:00
xtimer doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
ztimer ztimer_periodic: fix example in documentation 2023-09-29 18:27:43 +02:00
ztimer64 ztimer(64): make xtimer_compat documetation visible (defgroup) 2022-08-09 14:26:49 +02:00
analog_util.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
app_metadata.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
architecture.h debug: add DEBUG_BREAKPOINT() macro 2023-04-27 13:19:17 +02:00
atomic_utils.h core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
auto_init_utils.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
auto_init.h pkg/lwip: Start rework of netif initialisation 2021-08-20 14:56:46 +02:00
base64.h sys/base64: Use void pointer for buffers in API 2020-07-02 11:10:06 +02:00
bcd.h
benchmark.h sys/benchmark: make use of ztimer stopwatch 2023-03-06 14:31:09 +01:00
bhp.h sys/bhp: add initial support for generic Bottom Half Processor 2022-08-11 10:57:53 +02:00
bit.h sys/bit: add bit_checkXX() functions 2021-06-02 14:07:17 +02:00
bitfield.h sys/bitfield: don't set unrelated bits in bf_{set, clear}_all() 2023-03-17 00:08:10 +01:00
bloom.h codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
byteorder.h cpu/msp430: reorganize code 2023-06-19 17:14:57 +02:00
c11_atomics_compat.hpp doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
cb_mux.h
chunked_ringbuffer.h sys/chunked_ringbuffer: move config to CONFIG_ namespace 2022-03-04 09:35:39 +01:00
clif.h sys/clif: Fixing out of bounds read under certain conditions 2023-02-23 15:45:03 +01:00
clk.h sys: introduce coreclk utility function 2021-12-15 12:41:36 +01:00
color.h sys/color: add color_rgb_set_brightness() 2019-11-24 23:27:05 +01:00
congure.h congure_test: initial import of CongURE test framework 2021-02-26 10:08:12 +01:00
cppunit.hpp core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
dbgpin.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
debug_irq_disable.h cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
eepreg.h
embUnit.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
entropy_source.h sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event.h sys/event: add event_is_queued() 2023-10-06 18:21:34 +02:00
evtimer_mbox.h evtimer: add mbox support 2020-08-21 15:19:22 +02:00
evtimer_msg.h
evtimer.h sys/evtimer: remove support for xtimer backend 2023-05-24 09:53:33 +02:00
flash_utils.h sys/flash_utils: add helpers for placing variables in flash 2023-02-27 12:31:03 +01:00
fmt_table.h sys/fmt: Added submodule fmt_table 2019-08-20 14:32:49 +02:00
fmt.h sys/fmt: add print_bytes_hex() 2022-11-15 22:05:42 +01:00
frac.h sys: fix remaining broken paths to tests 2023-05-13 19:08:39 +02:00
fuzzing.h fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
imath.h imath: add powi() function 2023-06-05 19:09:11 +02:00
iolist.h sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
irq.hpp core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
isrpipe.h sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
luid.h sys/luid: add luid_netdev_get_eui48() & luid_netdev_get_eui64() 2020-08-18 11:45:45 +02:00
matstat.h
memarray.h memarray: Add extend and reduce functions 2021-01-15 11:39:08 +01:00
mineplex.h
od.h sys/od: allow to specify address offset with od_hex_dump_ext() 2021-01-11 14:35:40 +01:00
phydat.h sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
pipe.h
pm_layered.h sys/pm_layered: align pm_blocker_t for speed 2022-11-04 16:50:52 +01:00
progress_bar.h sys/progress_bar: add Konfig configuration 2021-04-07 12:05:00 +02:00
ps.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
ptrtag.h sys: Add helpers for pointer tagging 2020-11-17 10:10:28 +01:00
puf_sram.h sys: fix remaining broken paths to tests 2023-05-13 19:08:39 +02:00
random.h random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
rtc_utils.h sys/rtc_utils: small doc fix of rtc_mktime 2022-06-12 15:49:01 +02:00
saul_reg.h drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin.h sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics.h schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema_inv.h sys/sema_inv: add inverse Semaphore 2021-01-17 00:17:58 +01:00
sema.h sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
senml.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
seq.h
shell_lock.h sys/shell_lock: lock shell on EOF 2023-05-26 15:04:36 +02:00
shell.h shell_lock: don't set CONFIG_SHELL_SHUTDOWN_ON_EXIT 2023-05-26 15:04:35 +02:00
stdio_base.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
stdio_nimble.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
stdio_rtt.h sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
stdio_semihosting.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
stdio_uart.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
string_utils.h sys/string_utils: add memchk() 2023-05-30 20:39:10 +02:00
suit.h suit: replace SUIT_URL_MAX with CONFIG_SOCK_URLPATH_MAXLEN 2022-06-01 13:00:51 +02:00
time_units.h sys/include/time_units.h: add more constants 2022-05-05 11:31:45 +02:00
timex.h sys: factor out US_PER_SEC etc from timex.h into time_units.h 2021-12-15 14:33:20 +01:00
tiny_strerror.h sys/tiny_strerror: add tiny_strerror_minimal 2022-10-18 23:30:15 +02:00
tm.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
trace.h sys/trace: initial commit 2020-06-10 21:21:33 +02:00
trickle.h sys/trickle: Remove xtimer and only use ztimer 2023-03-17 12:04:44 +01:00
tsrb.h sys/tsrb: add tsrb_clear 2021-12-06 11:53:59 +01:00
unaligned.h sys/unaligned: Add 64 bit version 2020-08-14 12:21:24 +02:00
universal_address.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
uri_parser.h sys/uri_parser: Adding the port as uint16 2022-09-08 11:32:49 +02:00
usb_board_reset_internal.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb_board_reset.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb.h sys/usb: Add PID/VID check in macro 2023-05-31 12:55:53 +02:00
ut_process.h ut_process: initial import of a URI template processor 2021-09-16 18:18:48 +02:00
utlist.h sys/utlist: include stddef.h 2022-02-12 18:30:58 +01:00
uuid.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
vfs_default.h drivers/mtd: add SDMMC support 2023-08-08 09:09:12 +02:00
vfs_util.h sys/vfs_util: add recursive unlink 2022-08-03 22:09:21 +02:00
vfs.h sys/vfs: add force option to vfs_umount() 2023-02-28 17:24:03 +01:00
volatile_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
xtimer.h sys/xtimer: improve documentation 2023-05-30 17:32:48 +02:00
zptr.h sys/zptr: fix typos 2020-10-02 08:15:00 +02:00
ztimer64.h sys/ztimer: add ztimer64_xtimer_compat 2022-02-24 09:10:58 +01:00
ztimer.h Merge #19392 #19398 #19399 2023-03-16 12:09:46 +00:00