Commit graph

10340 commits

Author SHA1 Message Date
Sean Cross
d62ec406d1 kernel: re-disable verbose kernel messages
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
61d862b5c3 kernel: unmap child process pages after setup
Unmap the pages from the child process after we're done setting them up.
This ensures they're not still aliased by our process, despite being
marked as "owned" by the other process.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
9c433a6529 test-spawn: move into services
Move the `test-spawn` program into `services` and document it better.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
2016282aa1 test-spawn: refactor ProcessArgs usage
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
966d0aeb8a kernel: implement CreateProcess for riscv
Implement a functioning CreateProcess syscall on riscv. This call
creates a server in the child process, and connects the server to the
parent. The parent can communicate with the child process using this
server.

The Server ID is passed as four `u32` values to the entrypoint function.
This can be reassembled into something that can then be passed to the
`ReceiveMessage` syscall.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
806a31974a xous: process: specify stack, entrypoint, and base
Specify both the stack range and the process entrypoint, as well as the
load address of the text image.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
6fc7d153b9 spawn: add spawn program
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
b8fdc1506f test-spawn: add program to test spawning
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
0f9fdd45c1 spawn: compiles, but does not work yet
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
e68e52d89c process: finish implementing ProcessStartup as return
We now us `ProcessStartup` as the return type. This builds in tset
mode, hosted mode, and RISC-V mode.

Process Startup is still not implemented for RISC-V mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:53:33 +10:00
Sean Cross
0378fcf7aa test: get test building again -- it still fails
Get test to the point where it builds. There's still an odd timeout
issue we're running into, however.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:53:33 +10:00
Sean Cross
fd9710a81d xous: break ProcessStartup into its own type
This will be used when we launch a new process.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:53:33 +10:00
bunnie
f5558435bb update release notes 2022-06-01 11:53:33 +10:00
bunnie
218c11e839 update Cargo.lock that now no longer has aes 0.7 references 2022-06-01 11:53:33 +10:00
bunnie
95784b6a2e work around https://github.com/RustCrypto/AEADs/issues/410
We're trying to bring the AES version up so we can do CBC
(required for FIDO2) but unfortunately the aes-gcm-siv crate
is locked to an outdated version of AES, and this is blocking
on a type that is missing in the `block-ciphers` crate.

For now, we're using a patched version of aes-gcm-siv from
rozbb's repo, which allows us to move forward, but this needs
to be reverted once a new version of the official crate is patched.
2022-06-01 11:53:33 +10:00
bunnie
b0ee0ce2d0 add ParBlocks type to our AES implementation
see https://github.com/RustCrypto/AEADs/issues/410
2022-06-01 11:53:33 +10:00
bunnie
59ef6be561 bump root-keys cipher version compat to 0.4+ 2022-06-01 11:53:33 +10:00
bunnie
d2b38dfa35 update Lockfile for AES 0.8 compat 2022-06-01 11:53:33 +10:00
bunnie
8c08a9a188 bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-06-01 11:53:33 +10:00
bunnie
5c22e935e5 bring root keys to AES 0.8 compatibility 2022-06-01 11:53:33 +10:00
bunnie
a68d8b3130 bring PDDB to AES 0.8 compatibility 2022-06-01 11:53:33 +10:00
bunnie
b3c958e02c move AES API to version 0.8.2 compatibility
This is in a bid to gain CBC crate compatibility which requires
at least an AES 0.8 API level.

It breaks a lot of stuff, which is fixed in the next commit.
2022-06-01 11:53:33 +10:00
bunnie
10cf0c6688 remove apps from default-members 2022-06-01 11:53:33 +10:00
bunnie
0974a2e14b clean out some unused crates and test structures 2022-06-01 11:53:02 +10:00
bunnie
7819d2c94d Update README.md 2022-06-01 11:53:02 +10:00
bunnie
5c38225c75 Update README.md 2022-06-01 11:53:02 +10:00
bunnie
39571dedc6 update release notes to mark the move of the randcore APIs 2022-06-01 11:53:02 +10:00
bunnie
aeffeba9fa fix warnings that have cropped up 2022-06-01 11:53:02 +10:00
bunnie
466870d054 commit the getrandom fork, which is vendored into the kernel
we have to keep all the targets around, because hosted mode
also uses rand, which won't resolve correctly unless we also
have the host's target available, unfortunately

(trust me, tried to do a version stripped down just for xous...)
2022-06-01 11:53:02 +10:00
bunnie
47b76a3d5b include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-06-01 11:53:02 +10:00
bunnie
ea5276700b check in the getrandom stub for testing in main 2022-06-01 11:51:25 +10:00
bunnie
6e84c08b8e expose is_efuse_secured() API via the PDDB
is_efuse_secured() comes from rootkeys, but we don't want
to expose the full rootkeys API to the world.

PDDB already has an approved capability for accessing rootkeys,
so this single API is passed through via the PDDB object here,
allowing other procesess to query it.
2022-06-01 11:51:25 +10:00
bunnie
d995912a97 fix remaining crypto tests 2022-06-01 04:14:57 +08:00
bunnie
3647c38cb0 fix ecdh tests 2022-06-01 03:41:58 +08:00
bunnie
01a10ee709 fix tests so that they are runnable 2022-06-01 03:11:26 +08:00
bunnie
740c3a8572 Merge branch 'main' into u2f 2022-06-01 00:33:31 +08:00
bunnie
0f755629c0 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-06-01 00:33:09 +08:00
bunnie
5337d34d45 fix warnings in hosted mode 2022-06-01 00:32:49 +08:00
bunnie
2eee81b218 fix another errant mut that wasn't needed in pddb 2022-06-01 00:21:30 +08:00
bunnie
3b1629744c fix warnings that result from the PDDB mutability change 2022-06-01 00:21:22 +08:00
bunnie
a1fc015541 use interior mutability to handle callbacks
this eases a mutability requirement for the PDDB object
2022-06-01 00:21:15 +08:00
bunnie
5a118972e4 adapt the PersistentStore object to use the PDDB 2022-06-01 00:19:04 +08:00
bunnie
21116a1693 fix another errant mut that wasn't needed in pddb 2022-06-01 00:06:55 +08:00
bunnie
9ee306315e fix warnings that result from the PDDB mutability change 2022-05-31 23:55:12 +08:00
bunnie
bf535bd0e1 use interior mutability to handle callbacks
this eases a mutability requirement for the PDDB object
2022-05-31 23:54:16 +08:00
Sean Cross
803667ba28 xous: add a small comment to nameserver
Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 14:51:21 +08:00
bunnie
b20514e87d cleanup hosted mode warnings 2022-05-31 14:48:09 +08:00
bunnie
376d7a713b Merge branch 'main' into u2f 2022-05-31 14:39:08 +08:00
bunnie
98289b1405 fix warnings that have cropped up for transition to 2021 edition 2022-05-31 14:38:41 +08:00
bunnie
52207b641c
Merge pull request #171 from betrusted-io/xous-rs-remove-deps
Remove dependencies from `xous-rs`
2022-05-30 23:27:37 -07:00