Commit graph

900 commits

Author SHA1 Message Date
bunnie
d45369a19d basis root now iterates itself into an encrypted set of blocks 2021-11-11 18:54:17 +08:00
bunnie
62ef3b9414 refactor trngpool to a shared refcell-protected object. encryption iterator for basis.
- TrngPool is going to be more efficient if I have a single pool that's
shared among all the functions of the PDDB. It's split out into its own
object that is refcell-counted.
- Trying to make the Basis handle encryption and decryption with iterator
traits. Let's see how that works out.
2021-11-11 16:30:45 +08:00
bunnie
79d32e29f6 still grinding through the disk format procedure.
- reworked fast space allocation
- shifted order of events around slightly
- formatting is now using "generic" calls to create
the free space structures instead of bespoke single-use calls

left off at getting the system basis written. need to rework
the data structure to be orthogonal with the page table remap
on a page-by-page basis. have to think about it a bit...
2021-11-10 03:42:54 +08:00
bunnie
a4a2d12d57 refactoring the order of format events; consolidate fscb init op
try to condense ops that we anticipate calling in other places
into helper functions.

add AAD to the fscb.
2021-11-09 04:57:12 +08:00
bunnie
da9fcb24ff initial draft of fastspace collection compiles 2021-11-08 18:41:31 +08:00
bunnie
7858aaad0e free_pool scanning first cut 2021-11-08 05:41:39 +08:00
bunnie
81d9fb3fda more incremental progress 2021-11-07 05:34:07 +08:00
bunnie
7208a86fdb rename aes-xous to aes, and change version number
this allows us to patch AES for external crates, too,
such as aes_gcm_siv
2021-11-07 05:17:34 +08:00
bunnie
fabc84aaf6 working through an initial Flash format routine as a pipecleaner
clean compile checkpoint, not much else.
2021-11-07 03:16:32 +08:00
bunnie
778fa8d271 just journaling intermediate work 2021-11-06 04:22:34 +08:00
bunnie
56e82f37d3 more thoughts on the pddb.
this is definitely a rough-draft implementation and is going to
need a v2 or v3 to plug all the serious holes.
2021-11-05 03:58:58 +08:00
bunnie
629803fe72 basic front-end APIs sketched out 2021-11-03 01:42:25 +08:00
bunnie
337afbbe47 bump loader version number 2021-11-02 03:26:16 +08:00
bunnie
edb43a17a3 some structure on a more refined version of the pddb api.
doesn't compile tho, need to figure out what the status of
Path is on Xous.
2021-11-01 04:30:19 +08:00
bunnie
6f522b0844 tag Rust issue onto a wart in the LLIO API crate for better tracking 2021-11-01 04:18:53 +08:00
bunnie
46f1f60cda commit to journal of bad ideas issue #243: a misguided attempt at a PDDB API. 2021-10-31 22:58:20 +08:00
bunnie
21e320a905 Merge branch 'bunnie-dev' of github.com:betrusted-io/xous-core into bunnie-dev 2021-10-31 03:03:02 +08:00
bunnie
e204d62d08 Merge branch 'bunnie-dev' of github.com:betrusted-io/xous-core into bunnie-dev 2021-10-31 02:59:28 +08:00
bunnie
6360d1c902 tighten up the hard-coded locations for the trng test
these locations look good for a while, now that i see the
structure of data allocation (it's split between top and bottom)
2021-10-31 02:58:43 +08:00
bunnie
059513f228 refactor "net/backend" to "net/protocols" - slightly more descriptive 2021-10-31 02:07:55 +08:00
bunnie
8da2364832 clean out some old debug cruft in the susres crate 2021-10-30 19:15:32 +08:00
bunnie
f6e91d6260 move the trng test bases to make space for more kernel 2021-10-30 03:12:58 +08:00
bunnie
65bad96f52 fix killbounce & formatting
sleep killbounce wouldn't work because we started limiting the
number of connections to the LLIO.

This change makes connections to the LLIO unlimited, but perhaps later
on we should split out the I2C bus into a separate security domain,
so that the LLIO's unlimited connection policy doesn't introduce a
risk into a rogue process being able to overwrite the RTC contents.
2021-10-30 02:14:31 +08:00
bunnie
2962d4ffc3 add a wifi retry to the oqc test 2021-10-29 05:25:40 +08:00
bunnie
060aa4fee2 remove a warning that crept in 2021-10-28 18:50:07 +08:00
bunnie
db454603ee improve resilience to ping flood attack
much better, but still eventually the stack can fall over eventually.
also, the stack doesn't behave well when you try to initiate new
commands in the middle of a flood, because the back-pressure mechanisms
are primarily in-stack at the moment.

I think i have an idea on how to fix that but this will have to be later.
2021-10-28 18:38:02 +08:00
bunnie
81edf6a9c0 fix net ping description and help info 2021-10-28 18:37:48 +08:00
bunnie
72ffee7f13 cleanup of debug chatter, clarify some comments 2021-10-28 05:12:03 +08:00
bunnie
10a333eace parse raw IP addresses when passed to the DNS lookup 2021-10-28 05:11:22 +08:00
bunnie
2c7a35a36c fix various bugs in ping. behaves much more "as expected" now. 2021-10-28 04:30:44 +08:00
bunnie
765519ff32 major refactor of ping implementation
- moved most ping state into the Net crate proper, since the smoltcp
implementation assumes a tightly bound set of objects and lifetimes
in its icmp abstraction

- created various convenience abstractions for handling single and
multiple pings, blocking and non-blocking.

- refactored the "net" command to use the new form

Initial testing indicates there are still some bugs (seems to be
with the way we are handling timestamping and doing pong retirement)
but at least we're not getting tons of async callback errors like
we were before, and we're not shuttling obscene amounts of state
using Arc-Mutex between the input and output of the ping operations.
2021-10-27 04:38:09 +08:00
bunnie
3a4bbdd71a fix permissions. windows likes to make all files executable! world writeable! 2021-10-23 18:37:39 +08:00
bunnie
dc527a3619 Rust 1.56 results in a bigger loader. Presumably because "optimization".
This causes the font maps to shift down. Allocate some "room to grow"
as Rust gets more "optimal".
2021-10-23 18:36:31 +08:00
bunnie
7de925d3f1 add maintenance notes around the fix for https://github.com/rust-lang/rust/issues/90195 2021-10-23 17:50:33 +08:00
bunnie
c245e78255 Merge remote-tracking branch 'origin/main' into bunnie-dev 2021-10-23 17:45:24 +08:00
Sean Cross
adccb61e43 services: llio: work around rkyv bug in rust 1.56
A bug in the type system appeared that prevents using constants in rkyv
arrays. Hardcode the value instead.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-10-23 17:25:41 +08:00
bunnie
ec538025a8 changes to bring us up to date with rust 1.56. still not building. 2021-10-23 17:08:48 +08:00
bunnie
daebf17a5e Merge branch 'bunnie-dev' into main
Probably about time to push some of this net stuff into main, even
though it's got a ways to go. This adds UDP/ICMP/DNS to the net stack,
but the ping probably needs to be refactored a bit to be *much simpler*
and more reliable, and there's some corner cases to chase.
2021-10-22 04:10:33 +08:00
bunnie
f53c57ba3f fix up a number of issues in ping
Now that I understand how smoltcp does ping better I have regrets.
The demo example in smoltcp uses a funky macro that was a bit
misleading. I have gotten rid of that but I probably would have made
different decisions in implementing this had I understood the API better.

Anyways. It works, but has some trouble handling the cases of timeouts
sometimes.
2021-10-22 04:08:43 +08:00
bunnie
f1fe850820 ping was surprisingly hard.
not fully working yet, but the architecture is there and it builds.
smoltcp's ping implementation (or at least its demo code) was not
very amenable to splitting into modules, had to recode most of it.

the ipv6 is still a hack.
2021-10-21 06:28:11 +08:00
bunnie
3d1c216706 make interrupt events a try_send type, so they don't cause deadlock
this will help mitigate interrupt storms, e.g. if someone tries a
ping flood attack.
2021-10-21 00:03:08 +08:00
bunnie
cee4e83746 add a DNS parser. that was fun. :-|
yes, i know there is some fancy way to code this with iterators.
i don't like that way. this ways is easier for me to understand
and verify. It works now.

Sometimes, Rust sucks a bit. It's ok, you can cry.
2021-10-20 20:06:08 +08:00
bunnie
1a77f0afae add formatter for net crate ip address 2021-10-20 14:10:31 +08:00
bunnie
643e9a7d62 dns. needs more work, but it is at least minimally functional. 2021-10-20 05:18:54 +08:00
bunnie
60b0e3df87 handle the expected error from the disconnect call
When disconnecting from a remote server that was destroyed, we
would expect (and get) a ServerNotFound error.
2021-10-19 15:01:36 +08:00
bunnie
2885890ee2 fix typo 2021-10-19 05:06:05 +08:00
bunnie
afeae79d45 add quit opcode to Net 2021-10-19 05:02:00 +08:00
bunnie
ab3e05764e add some status and help message embellishments 2021-10-19 04:43:55 +08:00
bunnie
40771fbba7 flesh out UDP API...as much as we can
Multicast/Broadcast is not supported by smoltcp it seems, so those
calls are just unimplemented. But we are able to clone UdpSocket,
for the sick puppies who like to do that sort of thing.
2021-10-19 04:42:06 +08:00
bunnie
0cbca7fbe1 add UDP send and test routines 2021-10-19 01:41:22 +08:00