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

9057 Commits

Author SHA1 Message Date
Benjamin Valentin
e6a06501b8 sys/riotboot: serial: add bootloader LED 2021-11-21 23:09:24 +01:00
Benjamin Valentin
f53a398bfb riotboot: serial: enter bootloader mode by pin 2021-11-21 23:09:22 +01:00
Benjamin Valentin
e17cce41b4 bootloaders/riotboot_dfu: move bootloader_selection.h to common place 2021-11-21 23:08:31 +01:00
benpicco
2d882c3521
Merge pull request #16737 from JKRhb/uncrustify
treewide: Address uncrustify suggestions
2021-11-21 15:42:05 +01:00
Ollrogge
6f9a21503b usbus/hid: fix ep_out readyness 2021-11-19 22:20:12 +01:00
4c03d10f7b
Merge pull request #17234 from fjmolinas/pr_cocci_ztimer_fixes
sys/ztimer/xtimer2ztimer.cocci: extend and fix api replacements
2021-11-19 15:18:07 +01:00
Jan Romann
9f4e839ceb
sys/riotboot: uncrustify 2021-11-19 09:54:17 +01:00
Francisco Molina
e6a79c8729 sys/ztimer/xtimer2ztimer.cocci: extend and fix api replacements 2021-11-18 18:27:23 +01:00
Karl Fessel
eb11e463df sys/ztimer: make internal head update static 2021-11-18 13:45:49 +01:00
dylad
f0a8bf9239 usbus/hid: fix ep_out readyness 2021-11-17 20:46:41 +01:00
Francisco Molina
81c5d5dbcc sys/event/timeout: split xtimer, ztimer backends, don't force usec
This PR makes `event_timeout` and `event_timeout_ztimer` two distinct
pseudomodules, where the only api difference is in the init function.

If only `event_timeout_ztimer` is selected then no default ZTIMER
backend is selected and the old init function is not implemented.

If only `event_timeout` is selected then `xtimer` is used unless
`ztimer_usec` is included. In which case the `xtimer` wrapper on top
of `ztimer` is used and `xtimer` is not directly selected. This
allows for the legacy api to be supported with `ztimer_usec` as
a drop-in replacement.

If `event_timeout` and `event_timeut_ztimer` are selected then
`event_timeout` SRC file is excluded from compilation.
2021-11-17 10:15:11 +01:00
Dylan Laduranty
aa8608eff5
Merge pull request #17064 from bergzand/pr/usbdev/xmit
USB: refactor to xmit-based API
2021-11-17 09:07:00 +01:00
Francisco
74cdb11bd1
Merge pull request #17203 from bergzand/pr/usbus/check_setup_length
usbus: check received setup request data amount
2021-11-17 08:59:07 +01:00
587d25a38e
USBUS/hid: Adapt to xmit API 2021-11-16 20:17:05 +01:00
5455c40c7a
USBUS/cdc_ecm: Adapt to xmit API 2021-11-16 20:17:04 +01:00
1a0bc3d8bc
USBUS/cdc_acm: Adapt to xmit API 2021-11-16 20:17:04 +01:00
7d9a177f25
USBUS: Adapt to xmit API
Converts the control endpoint to xmit API
2021-11-16 20:17:04 +01:00
Leandro Lanzieri
b0c380a9a9
Merge pull request #17039 from MrKevinWeiss/pr/turodefault
sys/turo: Allow default selection of json
2021-11-16 18:22:55 +01:00
chrysn
69dadf61e9
Merge pull request #17152 from maribu/sys/posix/sockets
sys/posix/socket: align struct sockaddr{,_storage}
2021-11-16 13:55:27 +01:00
59e85cf921
usbdev: Refactor to xmit API
This API change refactors the usbdev API to supply buffers via the
usbdev_ep_xmit function. This changes from the usbdev_ep_ready call to allow
separate buffers per call. An usbdev_ep_buf_t pseudotype is available and must
be used when defining buffers used for endpoints to adhere to the DMA alignment
restrictions often required with usb peripherals.

Main advantage is that the usbdev peripherals no longer have to allocate
oversized buffers for the endpoint data, potentially saving multiple KiB
of unused buffer space. These allocations are now the responsibility of
the individual USB interfaces in the firmware
2021-11-16 11:21:00 +01:00
MrKevinWeiss
5a66307314
sys/turo: Allow default selection of json 2021-11-16 08:37:45 +01:00
Francisco
5f119e3b6c
Merge pull request #17200 from bergzand/pr/usbus_cdc_ecm/check_max_frame_len
cdc_ecm: Truncate frames at max ethernet size
2021-11-16 07:54:01 +01:00
4573d5f9dc
usbus_control: check received setup request data amount
This adds a check to the usbus control stack to ensure that the amount
of data received with a setup request does not exceed the amount
indicated within the setup request
2021-11-15 19:38:16 +01:00
2ba022221b
cdc_acm: Abort line coding request on incorrect size
This adds a sanity check to the line coding request of the CDC ACM code
to chcek the length parameter in the setup request with the size of the
expected payload struct
2021-11-15 19:36:03 +01:00
3871948015
Merge pull request #17126 from bergzand/pr/benchmark/ztimer
sys/benchmark: Convert to ztimer
2021-11-15 18:56:18 +01:00
cd489cebd1
cdc_ecm: Truncate frames at max ethernet size
This truncates the incomming frames to ETHERNET_FRAME_LEN and silently
discards the rest of the frame until the end of the frame. This should
be modified to an endpoint halt condition after #17090 is merged, but
for now this should be good enough.

Stalling the endpoint with the current stall implementation could cause
a ping of death scenario, so for now the data is truncated until the
above solution can be implemented.
2021-11-15 16:04:13 +01:00
556160b9a3
Merge pull request #17182 from ML-PA-Consulting-GmbH/fix/20211111__sys-suit__deps
sys/suit: adjust dependencies for CoAP transport
2021-11-15 15:27:47 +01:00
8c2f0dd2af
sys/benchmark: Convert to ztimer 2021-11-15 14:14:23 +01:00
Marian Buschsieweke
8a178f49e7
sys/fido2: fix CBOR parsing
The TinyCBOR library takes a `size_t *` length argument in many
functions which at function call contains the length of a buffer, and
at exit the actual size of the data. The FIDO-2 code however uses
`uint8_t` fields in `struct`s to store the data. Previously, a pointer
to that `uint8_t` filed was just casted to `size_t *`, resulting in
three neighboring bytes also being interpreted as being part of the
buffer size - which could result in undetected buffer overflows.
Similar, upon exit of the function not only the `uint8_t` sized length
`struct` member but also three neighboring bytes were written to.

I didn't care to investigate, but this really looks like crafted CBOR
payloads send to the FIDO2 implementation could result in arbitrary
code execution on the device.
2021-11-13 20:32:02 +01:00
Daniel Lockau
9e1e7be77e sys/suit: adjust dependencies for CoAP transport 2021-11-11 13:58:32 +01:00
Marian Buschsieweke
7b06e665ee
sys/architecture: add HAS_ALIGNMENT_OF() helper 2021-11-11 10:57:26 +01:00
Marian Buschsieweke
7703b37c6f
sys/posix/socket: align struct sockaddr{,_storage}
Align the first member of `struct sockaddr` and
`struct sockaddr_storage` as `uint32_t` to elevate the alignment of the
structure to level of `uint32_t`. This is needed as
`struct sockaddr_in` uses an `uint32_t` to store the IPv4 address,
previously resulting in `struct sockaddr_in` currently having a greater
alignment requirement that `struct sockaddr_storage`.
2021-11-11 09:55:24 +01:00
Kevin "Tristate Tom" Weiss
da60ba5fff
Merge pull request #17165 from leandrolanzieri/pr/sys/ztimer_kconfig_entry
sys/ztimer: rework Kconfig

To eliminate circular dependencies based in periph_rtc and xtimer_ztimer_compatibility the following changes are applied:
- Change entrypoint of ztimer as a specific backend is always required
- Add a non-module symbol for ztimer_usec that bring in the ztimer and ztimer_usec module which allows the xtimer ztimer compatibility layer to only select the ztimer_usec module preventing circular dependency issues
2021-11-11 09:21:33 +01:00
dba51edc69 net/uhcp[cd]: use modules to select client/server code 2021-11-09 21:42:45 +01:00
Leandro Lanzieri
703e66b4c1
sys/ztimer/kconfig: change entry point 2021-11-09 15:32:34 +01:00
Leandro Lanzieri
3837286750
sys/{x,z}timer/Kconfig: fix compatibility modules 2021-11-09 15:32:33 +01:00
Martine Lenders
4b2ca7a702
Merge pull request #16986 from benpicco/uhcp-debug
sys/net/uhcp: use LOG_DEBUG instead of LOG_INFO
2021-11-09 12:58:16 +01:00
Marian Buschsieweke
f7bed004ff
Merge pull request #17153 from maribu/sys/net/dns
sys/net/dns: mark dns_hdr_t as packed
2021-11-07 07:52:16 +01:00
Marian Buschsieweke
2e6eca1918
sys/net/dns: mark dns_hdr_t as packed
This structure is used to parse data from unaligned buffers, so make
sure the compiler issues instructions suitable for unaligned memory
access.
2021-11-06 20:16:56 +01:00
benpicco
1f11780c02
Merge pull request #17119 from spectraphilic/sdi12-remote
pkg/arduino_sdi_12: support the remote-revb board
2021-11-06 11:32:54 +01:00
J. David Ibáñez
77df3eedbd sys/arduino: millis() expected to have C linkage
This fixes building tests/pkg_arduino_sdi_12 for the hifive1b board.

The problem is, in build/pkg/arduino_api/api/Common.h millis is defined
within an extern "C" block. While in sys/arduino/include/arduino.hpp it
was not.
2021-11-05 10:21:26 +01:00
eaa007d412
Merge pull request #17135 from bergzand/pr/usbdev/fix_cppcheck_vera
usb(dev|bus): Fix static-check issues
2021-11-05 08:36:53 +01:00
9f510fb1ab
usbus/cdc_acm: resolve vera++ issues 2021-11-04 13:49:35 +01:00
df39337ebf
usbopt: resolve vera++ issues 2021-11-04 13:49:34 +01:00
86aa665cbc
usbus_hid: Fix possible null pointer dereference 2021-11-04 13:45:19 +01:00
b0d5e9a027
Merge pull request #17128 from dylad/pr/usbus/dfu/fix_underflow_condition
usbus/dfu: fix underflow condition while updating firmware
2021-11-04 09:50:18 +01:00
Dylan Laduranty
64a82c9a78 usbus/dfu: fix underflow condition while updating firmware
Reports dfuERROR if underflow is detected or if flash write failed
Implement DFU control CLRSTATUS while at it to clear dfuERROR by the host
2021-11-03 17:06:27 +01:00
1fa8bcc9d2
Merge pull request #17123 from bergzand/pr/stdio_semihosting/ztimer
stdio_semihosting: Convert to ztimer
2021-11-03 16:22:45 +01:00
benpicco
47029055a6
Merge pull request #8954 from zhuoshuguo/gnrc_gomach/adapt_duty_recode_para_name
gnrc_gomach: adapt duty recording parameters' namings.
2021-11-03 12:56:39 +01:00
4cfb155397
stdio_semihosting: Add unit clarification to poll define 2021-11-03 11:39:26 +01:00