1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
bors[bot] c6c84cccc9
Merge #19199 #19205 #19207
19199: sys/suit: Ensure previous thread is stopped before reusing its stack r=benpicco a=chrysn

### Contribution description

Closes: https://github.com/RIOT-OS/RIOT/issues/19195

If the thread has released the mutex but the thread has not terminated (which happens in the situation that would previously have overwritten a still active thread's state), then a warning is shown and the trigger is ignored.

### Testing procedure

This should work before and after:

* `make -C examples/suit_update BOARD=native all term`
* `aiocoap-client coap://'[fe80::3c63:beff:fe85:ca96%tapbr0]'/suit/trigger -m POST --payload 'coap://[2001:db8::]/foo'`
* In parallel, on the RIOT shell, run `suit fetch coap://[2001:db8::]/foo`
* After the first download fails, the second one starts right away ("suit_worker: update failed, hdr invalid" / "suit_worker: started").

Run again with the worker thread on low priority:

```patch
diff --git a/sys/suit/transport/worker.c b/sys/suit/transport/worker.c
index a54022fb28..e26701a64c 100644
--- a/sys/suit/transport/worker.c
+++ b/sys/suit/transport/worker.c
`@@` -70 +70 `@@`
-#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN - 1
+#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN + 1
```

Before, this runs the download once silently (no clue why it doesn't run it twice, but then again, I claim there's concurrent memory access from two thread, so who knows what happens). After, it runs a single download and shows an error message for the second one once the first is complete ("Ignoring SUIT trigger: worker is still busy.").

### Issues/PRs references

This may be made incrementally easier by https://github.com/RIOT-OS/RIOT/pull/19197 -- that PR as it is now would spare us the zombification (because returning would do that), and having a `wait` function would allow us to turn the new error case into a success.

19205: boards/common: add common timer config for GD32VF103 boards r=benpicco a=benpicco



19207: examples/gnrc_border_router: static: use router from advertisements by default r=benpicco a=benpicco




Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-01-27 21:01:39 +00:00
..
analog_util sys/analog_util/dac_util: fix truncation bug 2022-12-09 13:58:12 -05:00
app_metadata
arduino codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
auto_init Merge #18477 #19101 #19155 2023-01-16 14:03:15 +00:00
base64
benchmark sys/benchmark: fix divide by zero if runs < 1000 2022-02-08 12:52:48 +01:00
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
bitfield sys/bitfield: add bf_popcnt() 2022-11-10 23:44:50 +01:00
bloom
bus sys/bus: model Kconfig 2022-03-11 09:24:12 +01:00
can core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
cb_mux
checksum sys/checksum: add CRC-16 implementation without lookup table 2022-10-06 17:43:20 +02:00
chunked_ringbuffer sys/chunked_ringbuffer: model in Kconfig 2022-03-04 09:35:50 +01:00
clif sys/clif: Fixing out of bounds read under certain conditions 2022-10-26 13:44:01 +02:00
color
congure congure_abe: initial import of TCP ABE congestion control 2022-10-17 16:44:39 +02:00
cpp11-compat sys/cpp11-compat: Fix kconfig model 2022-08-16 10:57:26 +02:00
cpp_new_delete sys: remove -std=c++11 2022-01-13 17:50:59 +01:00
crypto sys/crypto: remove deprecated CIPHER_AES_128 2022-01-07 11:14:10 +01:00
cxx_ctor_guards doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
debug_irq_disable cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div
ecc treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
eepreg
embunit
entropy_source
event sys/event: ensure that a queue has a waiter before waiting for flags 2022-04-14 17:10:24 +02:00
evtimer sys/evtimer: use now returned by set 2021-12-14 13:24:29 +01:00
fido2 fido2/ctap: uncrustify files 2022-09-23 16:42:52 +02:00
fmt sys/fmt: add print_bytes_hex() 2022-11-15 22:05:42 +01: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 core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
include Merge #19178 #19186 2023-01-23 01:25:37 +00:00
iolist sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
isrpipe sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
libc sys/string_utils: add strscpy() 2022-09-26 19:06:46 +02:00
log_color sys/log_color: guard from compiling for esp 2022-10-12 13:45:29 +02:00
log_printfnoformat sys/log: modularize log into log_color and log_printfnoformat 2022-10-12 12:21:29 +02:00
luid
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 gnrc_ipv6_nib: use static DNS server from auto_init_sock_dns if present 2023-01-27 19:15:13 +01:00
newlib_syscalls_default cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
od sys/od/kconfig: add od_string 2022-03-11 09:20:24 +01:00
oneway-malloc
phydat sys/phydat: add functions for Unix time conversion to phydat 2023-01-21 11:01:42 +01:00
picolibc_syscalls_default sys/picolibc_syscalls_default: make stdin and stderr strong refs 2021-10-20 11:21:57 +02:00
pipe
pm_layered Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath" 2023-01-16 11:28:30 +01:00
posix treewide: fix typos found by recent codespell 2022-11-24 14:53:48 +01:00
preprocessor sys/preprocessor: add Kconfig file 2022-10-17 10:38:14 +02:00
progress_bar
ps schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
puf_sram sys/puf_sram: cleanup header 2022-12-05 16:13:21 +01:00
random random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
riotboot sys/riotboot: add tinyUSB DFU support 2023-01-15 18:09:55 +01:00
rtc_utils sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
rust_riotmodules rust_riotmodules: pub use instead of extern crate 2022-07-10 21:27:13 +02:00
rust_riotmodules_standalone rust: Update dependencies 2022-10-04 00:28:46 +02:00
saul_reg drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
sema_inv
senml sys/senml: add SenML modules 2022-02-11 12:38:21 +01:00
seq
shell shell/gnrc_icmpv6_echo: make use of gnrc_icmpv6_echo helper functions 2023-01-18 14:47:24 +01:00
shell_lock sys/shell_lock: do not call strlen, less jumpy 2023-01-16 21:11:58 +01:00
ssp
stdio_nimble core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_null Merge #18459 #18724 #19081 #19082 #19136 2023-01-13 13:50:55 +00:00
stdio_rtt core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +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: Ensure previous thread is stopped before reusing its stack 2023-01-25 18:04:28 +01:00
test_utils sys/test_utils/netdev_ieee802154_minimal: model in Kconfig 2023-01-19 15:34:18 +01:00
timex
tiny_strerror sys/tiny_strerror: add missing error codes 2023-01-12 08:39:30 +01:00
trace treewide: make all modules use Kconfig ZTIMER_USEC indirection 2022-03-17 14:33:07 +01:00
trickle
tsrb sys/tsrb: add peek functions 2021-11-24 17:54:44 +01:00
universal_address
uri_parser sys/uri_parser: fixing potential out of bounds read when consuming ports 2022-12-05 15:41:33 +01:00
usb core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
usb_board_reset pkg/tinyusb: board reset feature moved 2023-01-03 10:05:54 +01:00
ut_process ut_process: add ; after DEBUG() 2021-12-09 11:20:44 +01:00
uuid
vfs vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
vfs_util sys/vfs_util: bugfix rec. delete, rel. components 2022-08-30 17:53:36 +02:00
xtimer sys/xtimer: switch default backend to ztimer 2022-03-18 08:23:00 +01:00
zptr
ztimer ztimer: introduce ztimer_mutex_unlock_after() 2023-01-13 00:08:55 +01:00
ztimer64 sys/ztimer64: properly clear timer on removal 2022-03-01 11:03:10 +01:00
doc.txt
Kconfig debug_irq_disable: add module to debug time spent in irq_disable 2022-11-24 21:27:20 +01:00
Kconfig.newlib sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
Kconfig.picolibc sys/libc: model Kconfig 2021-10-01 11:26:15 +02:00
Kconfig.stdio cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Makefile sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
Makefile.dep Merge #19010 #19149 2023-01-15 23:31:00 +00:00
Makefile.include sys: add tinyusb_dfu and riotboot_tinyusb_dfu to makefiles 2023-01-15 18:09:55 +01:00