Commit graph

4953 commits

Author SHA1 Message Date
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
bunnie
f2dcea0834 add a missing sync after key deletion 2023-01-30 22:14:58 +08:00
bunnie
dafec3c2eb chore: fix another typo 2023-01-30 22:14:58 +08:00
bunnie
6fd080097e chore: fix typo :P 2023-01-30 22:14:58 +08:00
Tom Marble
ba2e91fea0 Updates for #287
Allows a variable to be set to the EMPTY string
- by not setting a value `/set myvar`

During initialization now verifies that PDDB is mounted.

Added warnings for PDDB not mounted and WiFi not connected.
- the WiFi check is not yet implemented

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-30 22:14:58 +08:00
Tom Marble
e48507a597 Completes fix for #287
Adds migrations framework
Delays mtxcli initialization until first user input, because we know:
- PDDB is mounted
- Timer is stable
- User actually using mtxcli
Adds send_async_msg scalar_async_msg
- basis for automatically updating chatroom

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-30 22:14:58 +08:00
Tom Marble
feffc2e5be WIP: Fix mtxcli excessive memory usage #287
Adds migrations framework
- Migration for v0.9.11-0120: update the filter

Filter
- narrow filter to only the fields and events for the current room

Introduces "read only" variables (e.g. __version).

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-30 22:14:58 +08:00
Tom Marble
b4566bc22e WIP #287: Adds /heap command to mtxcli
Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-30 22:14:57 +08:00
Patryk Laurent
afd1570bbc type chars rather than bytes 2023-01-30 22:14:57 +08:00
Patryk Laurent
9ad45b6f2c add pddb edit (types pddb write <k> <v>) 2023-01-30 22:14:57 +08:00
Sean Cross
8bde1326ff Cargo: remove packing from main workspace
This should fix an issue in CI builds.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-18 09:12:50 +08:00
Sean Cross
dc4ca79834 services: pddb: use an enum for file types
Rather than hardcoding numbers, use an enum with the constant values.
This will make it easier to reason about what the constants mean.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-18 09:06:16 +08:00
bunnie
d65f16b533 add the verifier and lockfile updates 2023-01-18 01:13:29 +08:00
bunnie
232a4b6c6c bump xous version 2023-01-18 00:02:46 +08:00
bunnie
b275660a71 add an "endcap" to the kernel region
This works around https://github.com/SpinalHDL/VexRiscv/issues/296
2023-01-17 23:07:05 +08:00
bunnie
3417046e7b cleanup memset command a bit more
- we don't need a general memset call -- just a zero page call
- use native rust semantics to embody the call. some alignment checking is
done on the arguments on the way in and out that seem worth it
- the unrolled loop doesn't pay off because we're at the limit of
write bandwidth on the CPU at this point. we would need write-back
caches to gain more performance through unrolling.
2023-01-17 23:05:20 +08:00
bunnie
a2f7c19eac bump release notes 2023-01-17 04:46:51 +08:00
bunnie
7be4a88a9b fix scheduler bug (credit: @xobs)
@xobs found a scheduler bug that would trigger a runnable process
search every time a scalar message returned. This fixes the problem,
causing the quantum to go back to the caller as intended.

Improves performance on the syscall by about 40%.
2023-01-17 02:11:48 +08:00
bunnie
aa48476937 Unroll loop for initializing memory in kernel
This also changes the initialization method from using `u8`
to `u32`.

The loop is unrolled to one iteration per cache line.
2023-01-17 02:10:46 +08:00
bunnie
8b5dfca749 chore: trim some unused comment-code that I forgot to clean before 2023-01-15 14:24:23 +08:00
bunnie
f66e53c54a respond to StartStop command with Done immediately
nothing to sync up on eject, since it's all already in RAM.
2023-01-15 02:39:03 +08:00
bunnie
0155306b85
Merge pull request #295 from gsora/fix/msc-macos
usb-device-xous: don't set device-wide class on mass-storage
2023-01-15 02:05:21 +08:00
Gianguido Sorà
b2494e92fc
usb-device-xous: don't set device-wide class on mass-storage
Setting it to zero (default if not set) makes mass-storage work under
macOS.
2023-01-14 18:53:48 +01:00
bunnie
c0d442f275 refactor reset() routine to be more comprehensive
The original implementation didn't keep around some key data,
so we had to read the old version of the record and update parameters
assuming that the USB descriptors didn't change too much.

Unfortunately with the mass storage option, the description can
change quite a bit, so we have to reconsitute it from scratch.
Basically, we re-do the `alloc()` call in the reset routine,
playing it reverse so that we setup all the higher-number
endpoints before doing ep0 last.

This hopefully fixes a stability issue for usb hid mode when
mass storage is enabled as a build option.
2023-01-15 01:00:53 +08:00
bunnie
af4b394e7d minor edit - make mass storage explicit in match option 2023-01-15 01:00:41 +08:00
bunnie
ee81c70018 refactor multi-view support
- use new SpinalUsbDevice::new() interface instead of cloning
- put the blank "key-up" event on keyboard events after the
core is switched to, instead of at boot.
- add some more appropriate debug statements to help track
view switching in debug logs
2023-01-14 19:10:21 +08:00
bunnie
df1b9d9f8d refactor SpinalUsbDevice new method
Instead of making it once and then cloning it (which is a bit
unclear what's going on), make it so that the shared memory
ranges are allocated in the caller's scope, and then create
the structure "clean".

Also add a static AtomicBool to track interrupt init state,
since that can be only called once.
2023-01-14 19:08:51 +08:00
bunnie
b13671b3bb add some debug output on asserts 2023-01-14 19:08:32 +08:00