Commit graph

519 commits

Author SHA1 Message Date
tunnell
e19ba9973f Use constant-time compare for GAM auth tokens
GAM auth tokens are 128-bit capabilities bound to their owning
process. The previous `==` compare on `[u32; 4]` short-circuits
on the first mismatching element, leaking prefix-length information
through timing.

Switch to `subtle::ConstantTimeEq`, which is already present in
the dep graph via ed25519-dalek and used elsewhere in the crypto
stack.

Signed-off-by: tunnell <tunnell@users.noreply.github.com>
Assisted-by: Claude Code (Opus 4.7)
2026-04-20 08:15:32 -05:00
bunnie
3f869ca389 bump utralib version for publication 2026-01-29 19:12:00 +08:00
bunnie
b2cf705c59 bump ticktimer version to drop susres dependency 2026-01-28 20:53:57 +08:00
bunnie
45632385d5 downgrade susres to a common api
doesn't make sense to push this to crates.io because it's not
common across all platforms, I think.
2026-01-28 00:36:05 +08:00
bunnie
fba011db3a commit version bump so that we may publish our packages 2026-01-08 03:04:19 +08:00
bunnie
d874c3e5c2 commit for version bump 2025-12-16 02:02:37 +08:00
bunnie
9034a08b5e fix TTS target API change 2025-11-30 22:21:31 +08:00
bunnie
381dee01eb fix interfaces in GAM for stateful lists 2025-11-30 21:32:26 +08:00
bunnie
dbb0a75118 bump versions
have to absorb a version change due to xous-semver change

might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
2025-10-06 13:23:18 +08:00
bunnie
1255bf12d9 FLAG DAY: fix all names to harmonize around 'bao1x'
The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.

Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.

This commit fixes all of the odd names and removes some unmaintained
early targets.
2025-09-18 21:25:51 +08:00
bunnie
ecbac27e76 fix rustc-1.89 warnings 2025-08-19 19:45:29 +08:00
bunnie
e2379821e6 republish xous-rs to fix cargo test 2025-05-11 15:36:17 +08:00
bunnie
8a4959056b bump version for xous crate update - commit so we can publish crates 2025-05-11 14:45:24 +08:00
bunnie
7c4a97da97 formatting fixes 2025-02-21 18:02:20 +08:00
bunnie
8cdce12efc refactor gam to point to ux-api for graphics primitives 2025-02-21 17:47:32 +08:00
bunnie
b67e8ac798 update gam to refer to blitstr2 crate 2025-02-17 18:27:36 +08:00
bunnie
45a8eb2227 stage tomls for version bump: try_send added to xous-ipc 2024-12-16 18:50:11 +08:00
bunnie
93b9ec00bf bump version numbers on all the packages so we can absorb num-derive changes 2024-12-02 19:14:11 +08:00
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
a8f2e9da27 fix up a tts bug 2024-09-23 23:02:32 +08:00
bunnie
f494da21cc absorb new xous-ipc version 2024-09-23 22:05:50 +08:00
bunnie
921be1cf8b add bounds checking to a TextView string length
Before xous-ipc's fixed-length string guaranteed this thing
fit into a single page. Now, we can send potentially unbounded
amounts of text between servers.

I don't think it makes sense to send more than a few k of text to
render on the screen at once, given our screen sizes, so I've added
a patch that truncates the text to the previous length that things
would truncate to.

The behavior is the same as before, except that you will
over-allocate memory on the heap in the sending process
as you shove more string data into a TextView than can be rendered.
Previously, the TextView would just truncate the data and discard
the data.

The truncation happens at the point where you try to hand the
record off to another process, so, one could in theory try
to make this recoverable by adding a layer that splits the
textview into more manageable chunks or pages the data, but that
is an exercise for another day.
2024-09-23 17:35:27 +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
7141a02e10 ah yes. This was the kind of xous-ipc abuse I was worried I would have done.
And I did it! and it's now fixed.

I was using xous-ipc String to make a fixed-length string in a
structure that's not strictly an IPC structure.

The solution to this is to just implement a fixed length string
directly.
2024-09-22 18:49:26 +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
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
6eab1c48bb patches to clean up warnings in rust-1.80 2024-08-19 02:24:24 +08:00
bunnie
311154e231 absorb version bump 2024-06-27 00:26:12 +08:00
bunnie
0fd6ad7c0e
Merge branch 'main' into new-rust-warnings 2024-06-14 19:14:02 +08:00
bunnie
0036c46ea1 clean up warnings in the latest rust 2024-06-14 19:10:18 +08:00
bunnie
a8b262af60 change font height based on target for status bar 2024-06-13 22:06:23 +08:00
bunnie
a360f3ee52 bump xous pins for RawTrng API 2024-06-13 15:49:35 +08:00
bunnie
b003b4f88f modernize debug output 2024-05-29 13:48:19 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
01a5d0aba9 create context list for cramium target 2024-05-23 14:42:16 +08:00
bunnie
b1e3e81a6f add patches to GAM for cramium-soc compatibility 2024-05-22 02:24:10 +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
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
370288dffa ...right, wrong hash type. no acceleration option available. 2024-01-31 04:05:03 +08:00
bunnie
ee95bc1306 specify use of sw-only hasher in bip39
the hash is tiny, hw overhead not worth it
2024-01-31 04:04:16 +08:00
bunnie
577646288a fix bip39 api changes 2024-01-31 04:02:57 +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