If we
-include Makefile.ci
and `Makefile.ci` does not exist, but we provide `make` with a way
on how to do so, it will try to create `Makefile.ci`.
This is not what we want, but I don't know how to disable this automagic.
So rename the target to `create-Makefile.ci` to avoid the conflict.
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.
Previously the test script relied on the exact sequence of numbers
returned by the used PRNG. This resulting e.g. in
```
$ USEMODULE=prng_musl_lcg make -C tests/pthread_barrier flash test
```
to fail, only because the order in which the children completed is
slightly different due to different sleep durations. This fixes the
issue.
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.
By moving all the single byte struct elements to the end, we can reduce
padding inside `dose_t` and ensure that `recv_buf` is always aligned.
This saves some RAM:
master
------
text data bss dec hex filename
36384 136 12944 49464 c138 tests/driver_dose/bin/samr21-xpro/tests_driver_dose.e
this patch
----------
text data bss dec hex filename
36484 136 12936 49556 c194 tests/driver_dose/bin/samr21-xpro/tests_driver_dose.elf
In Asynchronous Fractional baud rate mode, the baud rate can not be
greater than the source frequency divided by the oversampling (8, 16).
Currently we are always using 16x oversampling.
This makes it impossible to e.g. set a 2 MHz UART baud rate on the 16 MHz
`saml10-xpro`.
With this change, the oversampling is automatically reduced to 8x which
allows us to set 16 MHz / 8 -> 2 MHz baud rate.