Commit graph

10340 commits

Author SHA1 Message Date
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
0cdbfdfcc3 format cleanup & copy remove
a bunch of code has to be re-formatted because spacing changed
and we have a strict formatting rule
2024-09-22 15:29:23 +08:00
bunnie
f6f7cbdc98 bunnie-review: fix borrows in modals main loop
note for more review by bunnie down the road to make sure
that I have not changed any behaviors accidentally in fixing
the loss of Copy on a core structure
2024-09-22 15:28:11 +08:00
bunnie
af35f6e118 more cleanup of copy trait 2024-09-22 15:13:46 +08:00
bunnie
dfd7272773 review-needed: modify the alert modal prompt loop
The original loop takes advantage of the copy-trait that is
no longer available. I think the intent of the loop was to
mutate a field within the copy through each iteration so you
can update the prompt to handle field validations that failed
without re-allocating the ManagedPromtWithTextResponse structure.

This has been rewritten to alloc that each iteration to avoid
the borrow error, and instead the `prompt` itself is a string
that's initialized with the initial prompt message and is updated
on each iteration if the form validation fails.

@gsora git seems to say you wrote this code, maybe I could use
your help to review this patch.
2024-09-22 15:10:31 +08:00
bunnie
58527ea38b manual cleanup Copy derive: gam crate
There isn't a simple regex to deal with the loss of Copy when
deprecating xous_ipc, so this has to be a manual pass.

Losing the copy trait means (maybe) some loss of efficiency
in the API because we have to clone some structures instead
of copying them, although, I think actually what might have
been happening under the hood anyways is the copy was implemented
as a clone-under-the-hood for the xous-ipc.

Either way, this happens in the high level management structures
for modals, so it's not the end of the world to incur a clone
on the description of the structures -- we'd have to pay
more attention if this happened e.g. at the pixel shuffling
level, but a few UI strings at human-interaction rates
isn't going to kill us.
2024-09-22 14:50:21 +08:00
bunnie
f8719d781e security-related: implement missing clear_volatile() 2024-09-22 14:49:51 +08:00
bunnie
f1d263359d security-relevant: clear_volatile() API missing on String
xous_ipc::<String> had a clear-volatile() API for zeroizing
sensitive strings.

This is now missing in String, so it has been manually implemented
here by casting the String to a slice-u8 and then iterating
through it using raw pointers and volatile writes with a compiler
barrier to hopefully avoid all of the landmines I know of for
zeroizing a string...

commit is called out separately because this one is one of the
more "dangerous" security-related changes in the API migration.
2024-09-22 14:28:29 +08:00
bunnie
1fd59f0fc9 regex search/replace instances of xous_ipc::String to String 2024-09-22 14:28:16 +08:00
bunnie
b514d31fed regex search/replace instances of xous_ipc::String to String 2024-09-22 14:26:41 +08:00
bunnie
0fbca1cd4d cleanup a typecast ambiguity due to new API
Rust can't tell how to cast some u32_le into u32/usize automatically
due to confusion with the num_derive trait, so we have to explicitly
specify a chain of typecasts to clean up the conflict with the
new rkyv
2024-09-22 14:24:59 +08:00
bunnie
1b0fa6e04b regex search/replace instances of xous_ipc::String to String 2024-09-22 14:24:49 +08:00
bunnie
d2f13d92fe regex xous_ipc::String to String + cleanup idioms
some idioms are improved with String, this cleans up a bit of code
in addition to the search/replace
2024-09-22 14:23:20 +08:00
bunnie
15722a314a regex search/replace instances of xous_ipc::String to String 2024-09-22 14:22:58 +08:00
bunnie
0ef93e3bcd fix rkyv version in planning test 2024-09-22 14:21:32 +08:00
bunnie
c4f67ccb31 regex search/replace instances of xous_ipc::String to String 2024-09-22 14:21:09 +08:00
bunnie
3eb61d3002 regex search/replace instances of xous_ipc::String to String
includes some light touch-up to the API to clean up a consequence
of String not being copy-able anymore
2024-09-22 14:20:24 +08:00
bunnie
849ae5f874 regex search/replace instances of xous_ipc::String to String
codegenerator fixes
2024-09-22 14:19:46 +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
1d9316f9cd regex search/replace instances of xous_ipc::String to String
core xous services cluster
2024-09-22 14:18:49 +08:00
bunnie
916c98fd5c regex search/replace instances of xous_ipc::String to String
split into multiple commits for easier committing
2024-09-22 14:18:19 +08:00
bunnie
52ffd88b40 regex search/replace instances of xous_ipc::String to String
split into multiple commits for easier committing
2024-09-22 14:17:03 +08:00
bunnie
6d7a8fdc09 regex search/replace instances of xous_ipc::String to String
split into multiple commits for easier committing
2024-09-22 14:16:36 +08:00
bunnie
a1bf70b9ed regex search/replace instances of xous_ipc::String to String
split into a couple commits for ease of committing
2024-09-22 14:14:55 +08:00
bunnie
6470e1c6f2 xous-ipc changes that trigger the next series of search/replace commits 2024-09-22 14:14:29 +08:00
bunnie
423bfe93ea clean up a warning in loader crate
minor cleanup because the warning is distracting from chasing
down all the other warnings
2024-09-22 11:34:59 +08:00
bunnie
6d954d6303 remove xous-ipc string
this triggers a whole lotta changes....
2024-09-22 11:34:24 +08:00
bunnie
a506e7c5b6 bump rkyv in planning 2024-09-22 10:49:15 +08:00
bunnie
3dd4e2a2c3 a pass at modifying string.
Turns out, this is the wrong approach. It's still useful code
because it's a direct method for passing strings that doesn't
rely on rkyv (so it could potentially be more efficient for
very efficiency-oriented applications).

But I think in the end, after writing this and seeing the errors
that come from it, I think we should just abandon String<N> altogether
because it doesn't get us anything.
2024-09-18 14:19:41 +08:00
bunnie
e004ce2651 mods to lib 2024-09-18 14:19:32 +08:00
bunnie
11e112d06d dependency updates 2024-09-18 14:18:49 +08:00
bunnie
0be556a5d4 take at porting buffer to rkyv-0.8 2024-09-18 14:18:35 +08:00
bunnie
56e5d53992 update to rkyv 0.8.7 2024-09-18 12:35:37 +08:00
bunnie
fd0eaaade6
Merge pull request #573 from betrusted-io/rkyv-0.8
Rkyv 0.8 - planning
2024-09-18 01:00:55 +08:00
bunnie
3120b5d13c clean up API even further 2024-09-18 00:50:21 +08:00
bunnie
c259d5566d cleanup API
make Identity the serializer, so we don't have to pass it around
everywhere.
2024-09-18 00:47:32 +08:00
bunnie
4236ba4511 add more detailed test cases to flesh out the API 2024-09-18 00:01:28 +08:00
bunnie
abb245543c create a planning directory, and add the rkyv test
The purpose of the planning directory is a place where we can stash
code for reference in various github issues and project plans without
having to integrate it into the code base. This is for large changes
to the code base that require extensive planning and discussion prior
to integration.
2024-09-17 18:29:24 +08:00
bunnie
19de3e0402
Merge pull request #572 from betrusted-io/fix-renode-aes
renode: vexriscv: fix CPU on newer Renode versions
2024-08-20 10:00:31 +08:00
bunnie
c49acbc0f6
Update RELEASE-v0.9.md
also note the breaking change here so when we tag a release we'll remember to note it.
2024-08-20 09:59:05 +08:00
bunnie
b1776ded9c
Note minimum Renode version requirement
#520 introduces a breaking change to track the latest renode
2024-08-20 09:53:33 +08:00
Sean Cross
17790e0751 renode: vexriscv: fix CPU on newer Renode versions
Newer versions of Renode rename PrivilegeArchitecture to
PrivilegedArchitecture. They appear to have tried to work around this by
annotating it with `[NameAlias("privilegeArchitecture")]`, however that
doesn't change the fact that the actual type itself changed as well.

This incompatible change will cause breakage on older versions of
Renode.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-08-20 09:05:10 +08:00
bunnie
720213cc67
Merge pull request #571 from gsora/gsora/fix-build-rust-1.80
xtask: fix build on Rust v1.80
2024-08-20 00:38:29 +08:00
Gianguido Sorà
92d31b8366
xtask: fix build on Rust v1.80
Zip depends on time, which had some issues compiling on Rust v1.80: https://github.com/time-rs/time/issues/681

Update it to 2.1.6 in order to fix the issue.

Did not notice any apparent regression due to this update as of now.
2024-08-19 18:12:37 +02:00
bunnie
5b0e7fa922
Merge pull request #569 from betrusted-io/more-warnings
fix a doc warning that slipped through the cracks
2024-08-19 03:11:52 +08:00
bunnie
61e77ac6e4 fix a doc warning that slipped through the cracks 2024-08-19 03:07:09 +08:00
bunnie
8eb479facb
Merge pull request #568 from betrusted-io/cramsoc-warnings
fix rust-1.80 warnings for cram-soc config
2024-08-19 02:58:59 +08:00
bunnie
3cdf01d5e9 fix rust-1.80 warnings for cram-soc config 2024-08-19 02:57:12 +08:00
bunnie
1ae0ef4861
Merge pull request #567 from betrusted-io/vault-fixes
rust 1.80 fixes for vault
2024-08-19 02:41:11 +08:00
bunnie
c8d45479eb rust 1.80 fixes for vault 2024-08-19 02:39:21 +08:00