Commit graph

4980 commits

Author SHA1 Message Date
Sean Cross
1f2f08084b xous-api-ticktimer: add calls for freeing objects
Add calls to free Mutexes and Condvars. These will go in a destructor,
and will remove any trace of these mutexes within the ticktimer server.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-30 22:15:00 +08:00
Sean Cross
17195f082f ticktimer: improve condvar handling
Improve condvar so that it is more reliable.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-30 22:15:00 +08:00
Sean Cross
511f77f897 ticktimer: only allow RecalculateSleep from ourselves
Rewrite the RecalculateSleep opcode handler so that it will only be
processed if sent by our own process.

As part of this rewrite, use the new `let else` pattern.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-30 22:15:00 +08:00
Sean Cross
3b7b49b4da ticktimer: use sleep_heap.pop_first()
This function was stabilized in Rust 1.66.0.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-30 22:15:00 +08:00
Sean Cross
c541c1b000 xous-ticktimer: don't panic in an interrupt
If we are unable to send a message in an interrupt, simply ignore it.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-30 22:15:00 +08:00
bunnie
a455f0ae1d add the evicted record and remove a debug line i forgot to trim 2023-01-30 22:15:00 +08:00
bunnie
1a60fe4aad fix bugs in key invalidation/eviction logic
1. track evictions as separate from cleanliness. not clean means
the data is dirty and needs writing back. eviction simply means
the data needs be re-retrieved from disk.

2. actually fill the data when we do a sync -- previously
we only copied the old data into the new page but then forgot
to allocate the data and assign it to the cache (oops)

3. sync the small pools after doing a remove inside the update()
command to make sure we've met invariants for future calls
to cache fills

so many corner cases, i'm going around in circles....
2023-01-30 22:15:00 +08:00
bunnie
5d926294be only invalidate the key entry if it is within the current range of interest
previously, we were invalidating at the first instance of
encountering the key; instead we should only invalidate once
we've processed it in our range of interest.
2023-01-30 22:15:00 +08:00
bunnie
1e9bfc00ba increase threshold for GC on PDDB
for some reason it's being called a bit earlier than i expected.
2023-01-30 22:15:00 +08:00
bunnie
4013ed0098 add api call to increase PDDB debug level at runtime 2023-01-30 22:15:00 +08:00
bunnie
bfca804586 add some code to help find OOM keys 2023-01-30 22:15:00 +08:00
bunnie
6933150f63 add another test case to deltest
simulates a very typical pattern of remove an element
then populate it
2023-01-30 22:15:00 +08:00
bunnie
93477d38ba fix another edge case in key deletion
invalidated keys that were not dirty were not being removed
also added routine to fill keys that are evicted from the cache
during the update routine
2023-01-30 22:15:00 +08:00
bunnie
e8ab911c33 add some consistency check and repair facility to PDDB 2023-01-30 22:14:59 +08:00
bunnie
41fd5c7b55 make backup timestamps windows-compatible 2023-01-30 22:14:59 +08:00
bunnie
1c8eef910d chore: remove warning, and old notes 2023-01-30 22:14:59 +08:00
bunnie
d673cef1b0 cleanup minor UX issue (disappearing title when no items present) 2023-01-30 22:14:59 +08:00
bunnie
57ba858d99 update commit ref of opensk code 2023-01-30 22:14:59 +08:00
bunnie
2a0135c781 add bulk deletion of keys from a single dictionary 2023-01-30 22:14:59 +08:00
bunnie
224c4bccdb use bulk delete to speed up the reset process
this is necessary to pass the test after creating
dozens of credentials; it takes too long to process the
deletion if it's done one at a time
2023-01-30 22:14:59 +08:00
bunnie
be351b0562 improve debug output in storage layer 2023-01-30 22:14:59 +08:00
bunnie
d244466090 add some more time allowance for resets to process from boot 2023-01-30 22:14:59 +08:00
bunnie
ab90b0044e fix bug where old key data was not being zeroized on delete
on valid pages were being updated in a dictionary entry as
it is updated; actually, entries that are invalid should also
be zeroized, otheriwse they "Stick around" as valid entries.
2023-01-30 22:14:59 +08:00
bunnie
9903aacbad add fscb sync and pruning to the delete test bench 2023-01-30 22:14:59 +08:00
bunnie
d56bad0e42 bump release notes 2023-01-30 22:14:59 +08:00
bunnie
d70eeb2453 fix bug in small pool re-packing after delete
the new offset address was being used for copying data, instead
of the old offset, which was causing key data to refer to
an incorrect entry after deletion
2023-01-30 22:14:59 +08:00
bunnie
bce6fb2836 improve debug output on PDDB 2023-01-30 22:14:59 +08:00
bunnie
28f3594de3 make reset timing a bit looser
currently 10 seconds from boot before cred reset can be issued;
automated testing can't always keep up with that. expand to
20 seconds. This is not "standards compliant" but the idea that
you unplug the device and it stays on is also not "standards compliant".
2023-01-30 22:14:59 +08:00
bunnie
091d35a377 fix PIN permissions; add support for autotest reset 2023-01-30 22:14:59 +08:00
bunnie
d5d6b2b86f bump lockfile 2023-01-30 22:14:59 +08:00
bunnie
624705d169 add timeout variant for USB Rx -- note: not tested!
turns out we didn't need this variant for things to work
with the new OpenSK stack.
2023-01-30 22:14:59 +08:00
bunnie
e1cb4898e5 allow vendor commands; get vaultbackup-rs working 2023-01-30 22:14:59 +08:00
bunnie
bc3aac677f fix zero-length key readback error in bulk reads
zero-length keys return a data section of None, instead
of Some(<empty vec>), as the latter representation deserializes
to a null pointer panic.
2023-01-30 22:14:59 +08:00
bunnie
22dd62eeec refine the heuristic for detecting keys 2023-01-30 22:14:59 +08:00
bunnie
9c0c322d1d fix key deletion in fido2 2023-01-30 22:14:58 +08:00
bunnie
22bedae102 add migration from old to new version
confirmed this works for U2F and FIDO2 keys

however, the PIN is reset.
2023-01-30 22:14:58 +08:00
bunnie
5c454d4382 chore: fix typos 2023-01-30 22:14:58 +08:00
bunnie
15962925e7 initial integration of fido2.1 now passing some basic tests 2023-01-30 22:14:58 +08:00
bunnie
a00691dab7 first cut at porting in FIDO2.1 features from OpenSK
Code now builds, but, it doesn't fully work. Also,
the vault backup vendor routines have yet to be wedged in.

On the other hand, this edit is much more targeted than
the first one, so hopefully future port-ins of OpenSK
will be much smoother. In particular, OpenSK has a nice
`env` abstraction that has enough power now for us to
stick most of the Xous-specific stuff in there. There's
still a few patches needed to the main code loop, mainly
to accommodate our ability to display more information
than flash an LED.

The storage layer is also migrated to a totally new
dictionary, because the latest version also completely
redoes the storage with some sort of key/value system,
which maps nicely into the PDDB.
2023-01-30 22:14:58 +08:00
bunnie
e8acb62d6d fix missing corner case in cache refill 2023-01-30 22:14:58 +08:00
bunnie
f2825bf06e bump release notes 2023-01-30 22:14:58 +08:00
bunnie
b09ded8144 bump release notes 2023-01-30 22:14:58 +08:00
Tom Marble
275dee1ae1 mtxcli: chat room updates asynchronously
Added more predefined scalar messages
Checks WiFi status
Spawns separate thread for client_sync (reading the network)
Most all log messages are now INFO (to be shown by default)

Closes #300

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-30 22:14:58 +08:00
bunnie
bfe87cadb3 fix search criteria to match case-insensitive listing 2023-01-30 22:14:58 +08:00
bunnie
82a7d0c40f fix some more edge cases in PDDB key deletion 2023-01-30 22:14:58 +08:00
bunnie
8350095d36 fix initialization order so that CI can run 2023-01-30 22:14:58 +08:00
bunnie
2ef7dfd488 add test case for pddb delete keys 2023-01-30 22:14:58 +08:00
bunnie
b9f0f80d26 fix cached state to match disk state in UX for edit/delete in passwords 2023-01-30 22:14:58 +08:00
bunnie
0546f7a38c fix deletion UX in vault 2023-01-30 22:14:58 +08:00
bunnie
408cc69ad9 note that lock device also has a reboot aspect to it in the menu 2023-01-30 22:14:58 +08:00