bunnie
2e10c181b5
Merge branch 'main' of github.com:betrusted-io/xous-core into main
2023-01-31 01:35:47 +08:00
bunnie
c48f88ab93
Merge pull request #302 from gsora/feat/apps-block-device
...
feat: user-space USB block devices
2023-01-31 01:34:08 +08:00
bunnie
5113c8e18d
refactor xous-api-names to properly block ( fix #303 )
...
This refactors the lib function to use the existing
`std` call for blocking if at first a regular connection
attempt does not succeed.
2023-01-31 01:31:42 +08:00
bunnie
c87ed72736
chore: fix typos
2023-01-31 01:31:15 +08:00
bunnie
2191503f0c
fix #304
...
this adds a "kicker" thread that gets updated with a target time
to kick the UX by the FIDO2 USB handler. When the target time is
met, an "update" command is issued to the UX.
This hopefully creates an efficient mechanism for triggering a
UX redraw that also has an acceptable delay.
2023-01-30 23:14:16 +08:00
bunnie
ea31e50de7
fix typo on feature flag
2023-01-30 23:14:06 +08:00
bunnie
8e440609c2
add an extra test for checking if time server blocks on PDDB mount
...
gated with a feature so it doesn't bloat the shipping code base
2023-01-30 19:01:13 +08:00
bunnie
797bb0adc6
fix https://github.com/google/OpenSK/issues/584
...
I suspect this fix is actually the correct solution to the problem,
but refer to the issue above for tracking.
2023-01-30 18:34:43 +08:00
bunnie
b4ce65cb8e
possible fix for https://github.com/google/OpenSK/issues/586
...
This may not be the correct fix, but it causes the test bench to pass.
This will be revisted once I hear back from the OpenSK maintainers.
I strongly supect the issue is actually a bug in how permissions are cleared
after a user presence test, and not that the checks themselves are
incorrect.
2023-01-30 18:33:33 +08:00
bunnie
e64351569f
update ctap timeouts in the main loop
...
This is necessary because there are some timed permissions that
must expire over time that are not asynchronous like the
user presence tests.
2023-01-30 18:32:26 +08:00
bunnie
7cd2512e95
turn down some debug spew
2023-01-30 18:32:06 +08:00
bunnie
b1362c0ca4
chore: add a comment
2023-01-30 18:31:53 +08:00
bunnie
c237ff7b46
fix https://github.com/google/OpenSK/issues/582
...
See the above issue for more details
2023-01-30 18:31:12 +08:00
bunnie
2b6e0d2b89
fix return code bug on bulk deletion
2023-01-29 17:32:41 +08:00
bunnie
004599543a
add the evicted record and remove a debug line i forgot to trim
2023-01-29 04:26:08 +08:00
bunnie
e500588360
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-29 04:21:31 +08:00
bunnie
99a88ff25a
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-29 04:19:24 +08:00
bunnie
70c41ef244
increase threshold for GC on PDDB
...
for some reason it's being called a bit earlier than i expected.
2023-01-29 04:17:57 +08:00
bunnie
df2dda32be
add api call to increase PDDB debug level at runtime
2023-01-29 04:17:42 +08:00
bunnie
d77552899b
add some code to help find OOM keys
2023-01-29 04:16:56 +08:00
bunnie
27131f6e9a
add another test case to deltest
...
simulates a very typical pattern of remove an element
then populate it
2023-01-29 04:15:34 +08:00
bunnie
145e0469bc
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-28 19:08:01 +08:00
bunnie
7cb98699aa
add some consistency check and repair facility to PDDB
2023-01-27 15:26:46 +08:00
bunnie
a3086357bd
make backup timestamps windows-compatible
2023-01-27 14:19:41 +08:00
Gianguido Sorà
73a4f7898f
apps/hello: bring back order
2023-01-26 19:34:58 +01:00
Gianguido Sorà
916c22896a
apps/transientdisk: app to demonstrate userspace usb mass storage api
...
Exposes a 1.44mb usb drive, that survives until you either shutdown
the device, or change app.
2023-01-26 19:31:40 +01:00
Gianguido Sorà
2ff7d0a1fb
usb-device-xous: ignore block-device related messages in hosted mode
2023-01-26 19:29:53 +01:00
Gianguido Sorà
12a7271732
usb-device-xous: implement way to reset current block device app
2023-01-26 19:29:20 +01:00
Gianguido Sorà
9e5cc25a50
usb-device-xous: remove in-crate block device demo implementation
...
Now in apps/transientdisk
2023-01-26 19:28:43 +01:00
bunnie
25cc571228
chore: remove warning, and old notes
2023-01-27 02:23:53 +08:00
bunnie
9ea5182103
cleanup minor UX issue (disappearing title when no items present)
2023-01-27 02:23:34 +08:00
bunnie
20a2388b5d
update commit ref of opensk code
2023-01-27 01:47:48 +08:00
bunnie
9c5efebf38
add bulk deletion of keys from a single dictionary
2023-01-27 01:43:24 +08:00
bunnie
99995f963d
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-27 01:42:50 +08:00
Gianguido Sorà
76bfa0b37a
usb-block-device: fix compilation warnings
2023-01-26 18:27:53 +01:00
bunnie
50458e837b
improve debug output in storage layer
2023-01-26 23:34:08 +08:00
bunnie
dee4bac956
add some more time allowance for resets to process from boot
2023-01-26 23:33:38 +08:00
bunnie
c3ab5ca126
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-26 23:32:22 +08:00
bunnie
6b93cfd567
add fscb sync and pruning to the delete test bench
2023-01-26 23:31:43 +08:00
bunnie
a8a220ff99
bump release notes
2023-01-26 23:31:25 +08:00
bunnie
f6a8d678cc
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-26 22:05:03 +08:00
bunnie
31d958d41e
improve debug output on PDDB
2023-01-26 18:01:28 +08:00
bunnie
c21f1069bc
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-26 17:59:52 +08:00
bunnie
705427b2c4
Merge branch 'fido21' into main
2023-01-26 04:43:27 +08:00
bunnie
f1f486e9fb
fix PIN permissions; add support for autotest reset
2023-01-26 04:42:40 +08:00
bunnie
29b92b7ba4
bump lockfile
2023-01-26 02:42:45 +08:00
bunnie
9e86b6d3fd
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-26 02:42:17 +08:00
bunnie
10a64da826
allow vendor commands; get vaultbackup-rs working
2023-01-26 02:38:03 +08:00
bunnie
78866199ea
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-25 23:17:30 +08:00
bunnie
fd4e402d98
refine the heuristic for detecting keys
2023-01-25 22:41:03 +08:00