1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

44391 Commits

Author SHA1 Message Date
Benjamin Valentin
2f2dcb7e34 examples/gnrc_border_router: enable setting ZEP topology 2023-10-20 17:51:05 +02:00
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
Lena Boeckmann
b2e1c69b79 examples/psa_crypto: Update example to work with SEs 2023-10-19 15:31:45 +02:00
Lena Boeckmann
130420258c sys/psa_crypto: Fix conditions for public key max export size 2023-10-19 14:12:14 +02:00
bors[bot]
14b608cb23
Merge #19985
19985: backport_pr.py: increase entries per page for branches GET r=MrKevinWeiss a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-10-18 16:59:33 +00:00
bors[bot]
cb73e0cfc6
Merge #19983
19983: pkg/nanocbor: Update for fixed nanocbor_skip_simple() r=miri64 a=bergzand


### Contribution description

`@miri64` found a bug in NanoCBOR which is fixed with the latest commit.

Important changes:
- Fixed a bug in nanocbor_skip_simple with (b|t)str types

### Testing procedure

The pkg test should still pass.


### Issues/PRs references

None


Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-10-18 12:40:52 +00:00
Martine Lenders
25917c4b36
backport_pr.py: increase entries per page for branches GET 2023-10-18 14:12:45 +02:00
ca81c7512c
pkg/nanocbor: Update for fixed nanocbor_skip_simple()
Important changes:
- Fixed a bug in nanocbor_skip_simple with (b|t)str types
2023-10-18 13:40:03 +02:00
a00702ee65
Fletcher32: Rephrase note on 16 bit word operations 2023-10-18 13:22:44 +02:00
31df2ba0aa
Fletcher32: Add incremental API 2023-10-18 13:22:44 +02:00
bors[bot]
b6772c85fd
Merge #19968
19968: gcoap: fix underflow when correcting ETag from cache r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-10-17 14:20:41 +00:00
bors[bot]
d2434e5b1b
Merge #19979
19979: dist/testbed-support: Add openmote board r=aabadie a=MrKevinWeiss

### Contribution description

As part of fixing the automated release specs test we will need support for another `cc2538` based board.  I was able to get the tests passing with adaption here and to the release specs.

### Testing procedure

### Issues/PRs references


Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
2023-10-17 13:27:20 +00:00
MrKevinWeiss
3a0ada484b
dist/testbed-support: Add openmote board 2023-10-17 13:28:05 +02:00
bors[bot]
910e0e28ed
Merge #19963 #19971 #19974 #19975 #19976
19963: sys/event/timeout: add event_timeout_is_pending() r=benpicco a=benpicco



19971: sys/shell/gnrc_netif: Fix a few blockers for sharing ifconfig shell r=benpicco a=yarrick



19974: gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked for NULL pointer dereference r=benpicco a=miri64

 


19975: pkg/nanocbor: Bump to latest commit r=benpicco a=bergzand

### Contribution description

Not much to see here

Important changes:
- Add stream-like interface for encoder
- Separate functions for number of items left in arrays and maps

### Testing procedure

The usual test should still work

### Issues/PRs references

None

19976: core: Express -1 as ~0 in thread_status_t cast r=benpicco a=SimonIT



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Erik Ekman <eekman@google.com>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: SimonIT <simonit.orig@gmail.com>
2023-10-16 15:31:25 +00:00
bors[bot]
554efb7040
Merge #19943 #19978
19943: cpu/stm32: FMC used for low-level LCD parallel interface r=maribu a=gschorcht

### Contribution description

This PR provides the implementation of the LCD low-level MCU 8080 parallel interface using the FMC peripheral.

### Testing procedure

```
BOARD=stm32f723e-disco make -C tests/drivers/st77xx flash
```
and
```
BOARD=stm32l496g-disco make -C tests/drivers/st77xx flash
```
should work on top of PR #19941. Drawing operations should be much faster.

### Issues/PRs references

Depends on PR #19941


19978: treewide: fix typos to make codespell happy r=maribu a=maribu

### Contribution description

- fixes typos in comments and docs (no generated firmware changes expected)
- fixes a typo in a string in a GUI of a utility program
- add some false positives to the ignore list

### Testing procedure

- No generated binaries (except for the GUI version of the utility program to flash the MSB-A2) should change
- The diff should not look too scary

### Issues/PRs references

None

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-10-16 11:12:04 +00:00
Marian Buschsieweke
50490ed71b
dist/tools/lpc2k_pgm: fix typo in GUI / readme 2023-10-16 12:18:23 +02:00
Marian Buschsieweke
50d5c69e3e
dist/tools/codespell: add more false positives 2023-10-16 12:18:08 +02:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
Marian Buschsieweke
4452f0729b
boards/lsn50: change image
Either the wiki is down, or the image was removed from upstream. This
replaces it with the same image hosted on the zephyr doc. As a site
effect, code spell likes the new URL much more.
2023-10-16 12:01:15 +02:00
SimonIT
d778e2eb5f
core: Express -1 as ~0 in thread_status_t cast 2023-10-15 23:54:16 +02:00
Gunar Schorcht
c548efd268 tests/drivers/st77xx: blacklist nucleo-l031k6 2023-10-13 16:39:14 +02:00
a250dfeef0
pkg/nanocbor: Bump to latest commit
Important changes:
- Add stream-like interface for encoder
- Separate functions for number of items left in arrays and maps
2023-10-13 15:25:23 +02:00
Gunar Schorcht
391f303d41 tests/drivers/st77xx: add benchmarking 2023-10-12 18:19:04 +02:00
Gunar Schorcht
eb9515132c boards/stm32l496g-disco: enable FMC support for LCD 2023-10-12 18:19:03 +02:00
Gunar Schorcht
71a97c2ee9 boards/stm32f723e-disco: enable FMC support for LCD 2023-10-12 18:19:03 +02:00
Gunar Schorcht
94fdead641 cpu/stm32: add FMC support for LCD with parallel interface 2023-10-12 18:19:03 +02:00
bors[bot]
3a4ec8d21e
Merge #19972
19972: RFC: Support enabling/disabling lwIP netifs from gnrc_netif shell r=miri64 a=yarrick



Co-authored-by: Erik Ekman <eekman@google.com>
2023-10-12 14:27:46 +00:00
Martine Lenders
988db6923d
gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked
... for NULL pointer dereference.
2023-10-12 16:24:18 +02:00
Erik Ekman
ee6ca2b6ce sys/shell/gnrc_netif: Use l2util versions of link addr helpers
To avoid dependency on gnrc files.
As suggested in #16965
2023-10-12 10:23:24 +02:00
bors[bot]
715da20ad6
Merge #19973
19973: sys/shell/gnrc_txtsnd: Move to separate module r=yarrick a=yarrick



Co-authored-by: Erik Ekman <eekman@google.com>
2023-10-12 08:20:25 +00:00
Erik Ekman
ea545d2028 sys/shell/gnrc_txtsnd: Move to separate module 2023-10-11 22:55:37 +02:00
bors[bot]
357e4063a1
Merge #19970
19970: sys/shell/gnrc_netif: fix ifconfig set language issue r=yarrick a=krzysztof-cabaj

### Contribution description

This PR fix some language issues in the output of `ifconfig set`.

### Testing procedure

Compile any program with `gnrc_netif` module, for example `examples/gcoap`. 
Compare last line of presented outputs.

Output of `ifconfig help` without this PR.

```
All up, running the shell now
> ifconfig help
ifconfig help
usage: ifconfig help
usage: ifconfig <if_id> [up|down]
usage: ifconfig <if_id> set <key> <value>
      Sets an hardware specific specific value
```

Output of `ifconfig help` with this PR.

```
All up, running the shell now
> ifconfig help
ifconfig help
usage: ifconfig
usage: ifconfig help
usage: ifconfig <if_id> [up|down]
usage: ifconfig <if_id> set <key> <value>
      Sets a hardware specific value
```

### Issues/PRs references
None

Co-authored-by: krzysztof-cabaj <kcabaj@gmail.com>
2023-10-11 20:19:12 +00:00
Benjamin Valentin
2dc4412471 tests/sys/events: add event_timeout_is_pending() to test 2023-10-11 22:02:20 +02:00
Benjamin Valentin
7a66f1cc42 sys/event/timeout: add event_timeout_is_pending() 2023-10-11 22:02:08 +02:00
Erik Ekman
726e2eb045 sys/shell/gnrc_netif: Set lwIP netif state on up/down 2023-10-11 21:46:55 +02:00
Erik Ekman
c49cd446a8 pkg/lwip: Allow setting netif active state 2023-10-11 21:46:55 +02:00
Erik Ekman
0fc7898b34 sys/shell/gnrc_netif: Show interface up/down state 2023-10-11 21:46:55 +02:00
Erik Ekman
8e996c0a75 pkg/lwip: Allow reading netif active state 2023-10-11 21:46:55 +02:00
Erik Ekman
4f6b2759be sys/net: Add NETOPT_ACTIVE for netif on/off state
Similar to forcing interface up/down on Linux.
In lwIP this is separate to link state.
2023-10-11 21:46:55 +02:00
Erik Ekman
28b8536063 sys/shell/gnrc_netif: print v6 addresses based on ipv6 module
To support lwIP better (dont require gnrc_ipv6)

Also don't require IPv6 for printing link type

With this sc_gnrc_netif can compile and work when using lwIP
(with l2util module added):

```
> ifconfig
Iface  ET1  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 6  Link: up
          L2-PDU:1500  Source address length: 6
          Link type: wireless
          inet6 addr: fe80::260a:c4ff:fee6:e9c  scope: link
          inet6 addr: 2001:db8::260a:c4ff:fee6:e9c  scope: global

Iface  ET0  HWaddr: 24:0A:C4:E6:0E:9F  Link: up
          L2-PDU:1500  Source address length: 6
          Link type: wired
          inet6 addr: fe80::260a:c4ff:fee6:e9f  scope: link
          inet6 addr: 2001:db8::260a:c4ff:fee6:e9f  scope: global

>
```

Still works in gnrc_networking example:

```
> ifconfig
Iface  8  HWaddr: 24:0A:C4:E6:0E:9F  Link: up
          L2-PDU:1500  MTU:1500  HL:64  RTR
          RTR_ADV
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::260a:c4ff:fee6:e9f  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ffe6:e9f
          inet6 group: ff02::1a
```
2023-10-11 19:56:33 +02:00
bors[bot]
7bc783e7af
Merge #19966
19966: sys/event: add event_is_queued() r=benpicco a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-10-11 12:18:43 +00:00
bors[bot]
ff71a106ab
Merge #19954
19954: sys/psa_crypto: Ed25519 (EdDSA) support r=miri64 a=mguetschow

### Contribution description

- implement [`psa_sign_message()`](https://armmbed.github.io/mbed-crypto/html/api/ops/sign.html#c.psa_sign_message) and [`psa_verify_message()`](https://armmbed.github.io/mbed-crypto/html/api/ops/sign.html#c.psa_verify_message) for the two already supported [`PSA_ALG_ECDSA`](https://armmbed.github.io/mbed-crypto/html/api/ops/sign.html#c.PSA_ALG_ECDSA) algorithms, together with the CryptoCell and `micro-ecc` backends (*not* for the SE backend)
- add support for [`PSA_ALG_PURE_EDDSA`](https://armmbed.github.io/mbed-crypto/html/api/ops/sign.html#c.PSA_ALG_PURE_EDDSA), together with the CryptoCell hardware and `c25519` software backend (*not* for the SE backend)
- wipe private key data from stack for both ECDSA and EdDSA algorithms using `explicit_bzero()` (opinions from experienced Riot maintainers about usage of `goto` to avoid duplicating that function call before every `return`?)


### Testing procedure

- `examples/psa_crypto` has been updated to include EdDSA
- successfully tested configurations:
  - `nrf52840dk` with cryptocell (hardware) and `c25519` (software) backend
  - `native` with software backend


### Issues/PRs references

Thanks `@Einhornhool` for the PSA Crypto framework implementation #18547  which is great to work with!

Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
2023-10-11 08:29:28 +00:00
Martine Lenders
8d1cb1bd2b
gcoap: fix underflow when correcting ETag from cache 2023-10-10 14:41:45 +02:00
Mikolai Gütschow
b2262ae388
Makefile: mark periph_init_ecc_ed25519 as non-existant 2023-10-09 16:47:04 +02:00
Mikolai Gütschow
da41dd1dbe
psa-crypto: remove redundant memcpy 2023-10-09 13:52:52 +02:00
Mikolai Gütschow
d8d5478f0a
pkg/driver_cryptocell_310: fix typo in Makefile 2023-10-09 10:23:42 +02:00
Mikolai Gütschow
7b9c113c99
sys/psa_crypto: wipe temporary private key copies from stack 2023-10-09 10:21:45 +02:00
Mikolai Gütschow
335c4f8c0c
sys/psa_crypto: fix PSA signing macros
guarding {sign,verify}_{hash,message} functions

see 72718dd87e/include/psa/crypto_values.h\#L1678
2023-10-09 10:21:45 +02:00
Mikolai Gütschow
963775bdd9
sys/psa_crypto: add support for Ed25519 (EdDSA) 2023-10-09 10:21:44 +02:00
krzysztof-cabaj
ce9c8830ec sys/shell/gnrc_netif: fix ifconfig set language issue 2023-10-06 14:41:43 -04:00