Commit graph

460 commits

Author SHA1 Message Date
bunnie
e4e6db8bc9 fix implicit lifetime warning 2024-12-02 18:54:26 +08:00
bunnie
83e26ff4c7 update num-derive dependency
this became mandatory in 1.83 to remove warnings. I think it
should have no impact on functionality.
2024-12-02 18:52:59 +08:00
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
f494da21cc absorb new xous-ipc version 2024-09-23 22:05:50 +08:00
bunnie
2e9b19d62d fail, don't panic on serialization failure
this allows us to handle the error. probably should propagate
on to xous-ipc
2024-09-23 19:02:19 +08:00
bunnie
8cd1cef679 cleanup bulk read on PDDB
we don't have to pass a "size" field anymore; since we're end-offset
from pos, just pass pos and use that to chain records.
2024-09-23 18:07:50 +08:00
bunnie
cdc841124d fix a xous-ipc change but now conflated with reformatting 2024-09-23 14:18:45 +08:00
bunnie
75954de8d6 commit the version bump 2024-09-23 01:46:25 +08:00
bunnie
4c7c9312c1 change xous-ipc api to 0.10.0 2024-09-23 00:24:48 +08:00
bunnie
be227adde1 removed sized strings from pddb interchange structures
I think this is safe to do because no strings can be directly
serialized into the PDDB's structures. The place to check for
this is inside the backend/ directory. For example, `DictName`
is where the name field is serialized into a structure that
goes onto the disk. It's explicitly length-checked.

What this means is that we could have calls into the pddb crate
with invalid length strings, however, if you check the lib
implementation, all of the APIs also pre-flight the length of
arguments to ensure they fit into the destination string.

So mostly what we're losing is the constraints on the intermediate
IPC representation, but the length is still checked on either side.
2024-09-22 15:44:05 +08:00
bunnie
34e6f46d63 formatting changes that resulted from the regex search
a bunch of lines are shorter or different length now which
triggers a mandatory reformat. this patch cleans that up,
so that going forward the manual rework patches are clearer and
not tied up with formatting patches.
2024-09-22 15:31:14 +08:00
bunnie
f2fbc7fafd regex search/replace instances of xous_ipc::String to String
more regex results
2024-09-22 14:19:32 +08:00
bunnie
311154e231 absorb version bump 2024-06-27 00:26:12 +08:00
bunnie
a360f3ee52 bump xous pins for RawTrng API 2024-06-13 15:49:35 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
9e66c1bee2 commit the version bump 2024-05-07 01:03:05 +08:00
bunnie
d6b33159a5 stage version pin bump 2024-04-01 15:46:26 +08:00
bunnie
7c944fb4db upgrade zeroize to latest API level 2024-02-08 14:02:58 +08:00
bunnie
315d9b96d4 Merge branch 'main' into dalek_to_v4 2024-02-07 22:52:24 +08:00
bunnie
32dc547218 bump PDDB crypto API versions 2024-02-07 22:42:38 +08:00
bunnie
699004e7b0 bump xous pins 2024-02-06 14:49:10 +08:00
bunnie
40423f9448 fix hosted and renode modes 2024-02-01 01:42:18 +08:00
bunnie
0c7be94c22 re-introduce "wait for hardware" hashes for "big hashes" 2024-02-01 00:52:21 +08:00
bunnie
9a5fac408c update pddb to use new sha api
there is one interesting thing that happens with the api
incompatibilities in that importing the KeyInit trait affects
both AES and SHA identically, so this trait now has to be imported
just at the function level instead of crate level because we don't
want it to affect both algorithms so broadly.
2024-01-31 04:11:30 +08:00
bunnie
1e8cd1edbe bump hkdf to work with newer sha api 2024-01-31 04:11:19 +08:00
bunnie
55d88587a9 upgrade all the subordinate Cargo.toml files to match the patch
looks like about 9 crates will be affected by this. Point them
all to the latest version of the API, and specify the
"precursor" feature (which activates our patch)
2024-01-30 01:43:09 +08:00
bunnie
659796916a chore: cleanup typos in docs, comments 2024-01-15 02:16:43 +08:00
bunnie
b8dc0a981c edge cases in cargo-fmt
so...i think in this case, maybe the build.rs wasn't formatted?
it got picked up the second time when i ran the command.

in the case of pddbkey.rs, I think the changes made by rustfmt
were so dramatic it required two passes for it to become clean.
2024-01-15 00:56:24 +08:00
bunnie
e274fa8873 relate perlib to the libs/ directory
perflib was made before we had libs, so put it into its new, proper
home.
2024-01-15 00:52:43 +08:00
bunnie
0267a56989 format Cargo.tomls
because apparently cargo fmt doesn't format Cargo.toml files???
2024-01-15 00:14:39 +08:00
bunnie
9b211d4cb0 work around rustfmt issue 2024-01-14 23:23:05 +08:00
bunnie
679435c5f4 format sevices/pddb
wow the formatter hated this code.

hope i can recognize it later on when it needs work,
nobody else probably wants to touch it. :-/
2024-01-14 22:35:23 +08:00
bunnie
8ec08c9c76 fix rust v1.75.0 warnings that are probably benign
a lot of re-import warnings have cropped up. While I appreciate
their studiousness on this, the problem is that removing some
of these exports in the API crate could mean that future users
who want access to some API features that aren't used in this
configuration are now unaccessible.

I think it's not a huge problem at the moment, just spam-cleaning
the warnings because there are too many to deal with carefully
at the moment.
2024-01-04 19:15:28 +08:00
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
bunnie
2a521b5b86 fix stdseek to match std word ordering 2023-12-10 12:53:50 +08:00
bunnie
0a0ac292c3 modernize opcode debug on PDDB 2023-12-07 18:41:51 +08:00
bunnie
7da070f37c fix #460 - prevent PDDB mount dialog from popping up during updates
check the newly-minted EC ready bit prior to running the PDDB mount
handler.
2023-12-07 01:31:06 +08:00
bunnie
5aff0f2413 cleanup doc comment errors 2023-12-01 22:08:34 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
bunnie
83256257e1 bump xous-rs crate to absorb Send derives on Messages
this is necessary for the smoltcp port
2023-10-03 20:54:14 +08:00
bunnie
478a612c02 commit version bump 2023-09-12 16:25:10 +08:00
Sean Cross
5dfad296ae xous: mark MemoryRange::as_slice and friends as unsafe
Mark `MemoryRange::as_slice()` and `MemoryRange::as_slice_mut()` as
unsafe.

This is due to the fact that not all representable types can be cast to
an arbitrary value. For example, if Process A sends random values to
Process B, then Process B casts the memory to a slice of `bool`, then
any values that are not 0 or 1 are undefined.

Because these functions can leak UB into the program, they are marked as
unsafe.

This patch adds `unsafe {}` blocks to all instances where this function
is called. Additionally, all instances have been checked to verify that
they do not cast to any invalid types -- most use `u8` or `u32`.

Additionally, the long-deprecated `MemoryRange::from_parts()` call was
removed, since that causes UB without being marked as unsafe.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-09-12 10:07:38 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
7da82f8753
Merge pull request #398 from betrusted-io/rust-1.71.0-libstd-warning
Suggested method to preserve intent of `drop` to fix clippy warning
2023-08-08 00:05:51 +08:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
f0b351c2e0 suggested method to preserve intent of drop to fix error
However, I didn't write this library (and I don't have a test
suite for it), so I'm not quite sure if this preserves the
invariants on the fd_mapping() structure. Needs @xobs' review.
2023-07-16 17:58:40 +08:00
bunnie
9932d971c4 clean up the warnings that are deemed safe to clean up
one warning remains, will address this in a future PR.
2023-07-16 17:55:28 +08:00