Commit graph

6279 commits

Author SHA1 Message Date
bunnie
80938fe488 format xous-api-names 2024-01-14 18:51:09 +08:00
bunnie
65aef1c886 format xous-api-log 2024-01-14 18:50:49 +08:00
bunnie
a9803af0c2
Merge pull request #477 from betrusted-io/rustfmt-proposal
RFC: proposed rustfmt settings for the project
2024-01-14 18:48:18 +08:00
bunnie
eb77e76c9f note new standards in the change log 2024-01-11 22:23:03 +08:00
bunnie
676bab899f add trailing whitespace removal to settings
also format the file, because, hey guess what...format on save
is on. :P
2024-01-11 22:22:39 +08:00
bunnie
40b4c89414 add a formatting document
this hopefully helps new users get started with formatting.

didn't want to edit the CONTRIBUTING.md file because it already
has a lot of other stuff in there not specific to formatting.
2024-01-11 22:21:50 +08:00
bunnie
d14e1b2608 another try...
maybe i'm reading the gh automation error message wrong?
2024-01-11 21:56:52 +08:00
bunnie
62a351f813 maybe this is the trick? ugh. 2024-01-11 21:52:36 +08:00
bunnie
86afec0160 fix origin statement
sorry this is all pushing to GH directly, the only way i know
how to test this is to push to the branch :P so y'all get
to see me flail.
2024-01-11 21:51:11 +08:00
bunnie
6405f91fd7 have to fetch main before we can checkout the rustfmt.toml 2024-01-11 21:49:46 +08:00
bunnie
5f0e2a48b0 cleanup missing -P specifier on grep regex
looks like the regex is perl syntax
2024-01-11 21:44:11 +08:00
bunnie
ca5845c2f6 checkout the main rustfmt.toml prior to running CI
this is necessary so that patches can't sneak through by
modifying rustfmt.toml to bypass a CI checke.
2024-01-11 21:24:14 +08:00
bunnie
da60e82584 add a proposed trailing whitespace check 2024-01-11 21:20:41 +08:00
bunnie
99a238107b add a proposed rustfmt check 2024-01-11 21:20:26 +08:00
bunnie
d510a806de cleanup build.yml action
I think we don't need to run the full rust toolchain script,
just `rustup update`?

Also update actions version for checkout and comments.
2024-01-11 21:19:41 +08:00
bunnie
958517a474 Merge branch 'main' into rustfmt-proposal 2024-01-11 21:10:23 +08:00
bunnie
59d65d6334
Update rustfmt.toml
absorb feedback on alphabetical ordering
2024-01-09 14:29:00 +08:00
bunnie
6699b9ec92 update lockfile to reflect removal of sigchat 2024-01-09 14:23:06 +08:00
bunnie
d8542dab71 move sigchat to a new home: https://github.com/betrusted-io/sigchat
This allows sigchat to absorb an AGPL license and be compatible
with all the libraries it needs to work with.

https://github.com/betrusted-io/sigchat
2024-01-09 14:14:07 +08:00
bunnie
4c61d656e4 clarify role of out-of-tree apps 2024-01-09 04:13:28 +08:00
bunnie
891363147a bump release notes 2024-01-09 04:12:34 +08:00
bunnie
2d760ff364 update lockfile dependencies to accommodate sigchat PR 2024-01-09 04:12:22 +08:00
bunnie
3c3435f0dc
Merge pull request #476 from kotval/out_of_tree_app
Modify xtask to permit named BinaryFile
2024-01-09 04:08:23 +08:00
David Kotval
48d0bf4da6 chore: removed unused prototype code 2024-01-08 19:19:51 +00:00
bunnie
f196bcf469
Merge pull request #465 from nworbnhoj/sigchat
Link sigchat to existing Signal account
2024-01-08 17:23:09 +08:00
bunnie
d38d53e0d9 turns out you have to specify a toolchain
i guess we'll just let it fail when we have a breaking rust
toolchain issue? idk.
2024-01-08 16:31:30 +08:00
bunnie
43a1502de8 allow v2 signatures in restoration of backups 2024-01-08 16:21:09 +08:00
bunnie
3a108bb902 see if we can fix github actions by not specifying an explicit toolchain
we want to be building against the latest, at least for now...
2024-01-08 16:02:42 +08:00
bunnie
524c714a42 note requirement to upgrade precursorupdater 2024-01-08 15:54:28 +08:00
bunnie
368db28492 bump precursorupdater version 2024-01-08 15:54:19 +08:00
bunnie
49b3b1f5d0 allow v2 signatures on kernel 2024-01-08 15:50:44 +08:00
bunnie
0692a25323 fix cramium build targets 2024-01-08 02:33:27 +08:00
bunnie
defc4cf3c4 bump release notes 2024-01-08 02:24:13 +08:00
bunnie
0c657cffcd cleanup a hosted mode warning 2024-01-08 02:24:05 +08:00
bunnie
933666a67b add an implementation for new_with_strategy() on sha512trunc256
this is needed to unbreak hosted mode. The strategy in hosted
mode is *always* to use software as there is no hardware hashing
engine.
2024-01-08 02:23:23 +08:00
bunnie
6e65cbda2e
Merge pull request #475 from betrusted-io/prehash
Add prehash signature check and prepare for env-variable hash passing
2024-01-08 01:46:54 +08:00
bunnie
055231cb5a extract loader hash from environment
also fix region alignment bug and version code bug.

tested, now works.
2024-01-08 01:44:17 +08:00
bunnie
b87dde9208 add new signature version code to api 2024-01-08 01:44:01 +08:00
bunnie
3da1ed181e set hash default value to 0x30 ("0")
this makes it much easier to detect if a loader failed to set
a hash in other routines.
2024-01-08 00:21:06 +08:00
bunnie
7b8a598020 wire up the hash computation to the hash consumption 2024-01-08 00:17:54 +08:00
bunnie
7719dbcb69 write hash into the environment variable
Convert the fs_prehash into a hex ascii string, suitable for environment variables
The initial loader environment is hard-coded, so we use a hard-coded offset for the string
destination. It was a deliberate decision to not include a generic environment variable
handler in the loader because we want to keep the loader compact and with a small attack
surface; a generic environment handling routine would add significant size without much
benefit.

Note that the main purpose for environment variables is for test & debug tooling, where
single programs are run in hosted or emulated environments with arguments passed for fast
debugging. The sole purpose for the environment variable in the loader's context is to
this computed hash onto the userspace environments.
2024-01-08 00:16:48 +08:00
bunnie
8f3229c9ea convert secboot to have an argument for returning the hash
also compute the hash and return the value as part of this patch
2024-01-08 00:16:20 +08:00
bunnie
2f47a9d4f2 more rework of pre-hash argument
While ideally we'd be as light-fingered as possible on the cryptographic
APIs, unfortunately the reality is we have exactly one hardware
hash engine and we can't just leave the context laying around.

Given that the verification routine would consume the hash, that
would make it unavailable for use later on to pass to the system.
So, this patch set causes the pre-hash algorithm to take a simple
slice-u8 instead of a whole hash context.

The downside of this is it erases the type information about
needing a 64-bit hash to go into the context. This is partially
mitigated with an assert that gives us a run-time check of this
property.
2024-01-08 00:13:35 +08:00
bunnie
4b002c34f5 Merge branch 'main' into prehash 2024-01-07 23:42:22 +08:00
bunnie
0750644e45
Merge pull request #479 from betrusted-io/process-arguments
Support process arguments
2024-01-07 23:39:45 +08:00
Sean Cross
60f2a17649 kernel: support receiving process arguments
Support passing process arguments in register 2 as part of arguments to
a process.

This requires updating the `InitialProcess` struct that is received from
the loader, and so requires modeifications to be made in tandem.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-07 23:02:58 +08:00
Sean Cross
d8c6881554 loader: pass environment to processes via stack
Load environment variables to processes by placing the value onto the
stack. This will support additional data in the future such as command
line arguments.

Note this is a breaking change and requires a kernel modification.

Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-07 22:36:34 +08:00
bunnie
fafee5bc72
If PR is accepted, we'd make formatOnSave true by default 2024-01-07 17:38:51 +08:00
bunnie
45edea44b3
Remove the exclusions
If we harmonize on `rustfmt` for the repo, all exclusions would be removed.
2024-01-07 17:37:30 +08:00
bunnie
d9b26b1f95 RFC: proposed rustfmt settings for the project 2024-01-07 16:59:33 +08:00