Commit graph

370 commits

Author SHA1 Message Date
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
5c454d4382 chore: fix typos 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
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
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
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
232a4b6c6c bump xous version 2023-01-18 00:02:46 +08:00
bunnie
41d4837551 bump versions to absorb WDT change 2023-01-06 17:48:12 +08:00
bunnie
de231cae54 explain to users that they will need to create a PIN code for logins
Users are confused when they are prompted to enter a PIN code for
the first time with no preparation. Update the format request message
to prime users for the task.
2023-01-05 16:42:12 +08:00
bunnie
bb5d7b3adf bump versions to absorb hosted mode fix 2023-01-05 14:07:24 +08:00
bunnie
36398810dd bump version numbers to absorb new syscalls 2022-12-30 15:24:36 +08:00
bunnie
f71278b422 fix issue #109 - refactor key fill/scan to not crash after pruning
After a prune, key fill/scan can crash because there is an assumption
that data is always resident in the cache for a small key.

This code handles the case where the small key data was evicted during
a prune, and reads the data back in just for that key on demand.

Furthermore, during a `sync` call, it will pull in the key data
that corresponds to the page containing just the small key, allowing
that page to be re-composed and replaced in memory. caching is used
on the decryption of the small key page so the expensive bit
of the call should only happen once per small key bank.

tested with pddb-ci and manually in hosted mode.

A portion of code was re-written to make it clear that only the
length of allocated data is copied to/from disk and memory, instead
of the reserved space as the previous code would indicate. The reserved
space is guaranteed to be zero because the RAM-based page for composing
the small key block is zero-ized prior to operations; left comments
reminding me of this in the future so I don't accidentally optimize
something out and cause data leakage between small keys because I'm
allowing the reserved areas to contain stale data.
2022-12-29 22:04:55 +08:00
bunnie
e25da3a720 add implemenation of the prune debug call
this allows us to trigger the cache prune manually, instead of
in response to memory backpressure only
2022-12-29 22:04:15 +08:00
bunnie
1e56598b10 chore: fix some typos 2022-12-29 00:53:32 +08:00
bunnie
5370c333da add callback for monitoring basis lock/unlock events 2022-12-29 00:10:42 +08:00
bunnie
ad79ebf8ba chore: more typos. no really, i can stop at any time. 2022-12-13 23:02:09 +08:00
bunnie
b1b6d46d27 chore: more typos
probably should not have tried to spell check this, now i'm wasting
my time.
2022-12-13 22:56:37 +08:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
52955681d5 reflect unmount status after tryunmount
this fixes a problem where backups fail when autobacklight is
enabled, because autobacklight is constantly querying the PDDB
for the length of the autobacklight timeout, even after the
PDDB is unmounted.
2022-12-02 20:10:10 +08:00
bunnie
1d1b3a35b7 commit version bump 2022-11-26 10:00:44 +08:00
bunnie
aa9977cc58 bump all the things because we changed utralib again 2022-11-17 22:13:40 +08:00
bunnie
dabbfd6c35 bump all the things to absorb the SoC change 2022-11-17 19:39:18 +08:00
bunnie
c3ba30d55d expand on errors reported 2022-11-09 14:25:26 +08:00
bunnie
a7162fd03c bump xous-names dependents 2022-11-07 22:19:38 +08:00
bunnie
0646ec23ba track "attempted" mounts in PDDB
this is to allow a UX process to clear the "waiting for boot"
indicator once an attempt has completed.

right now, it responds *after* the mount process is done,
so the "please waiting" text persists even doing a format.

I think that is...appropriate?
2022-11-07 00:21:52 +08:00
bunnie
3ee36f41ee remove UX delays on PDDB path
retain just one of them going into the erase routine, because
it consumes enough CPU that the dialog box takes a bit too long to
pop up.
2022-11-06 18:45:17 +08:00
bunnie
30583bdf07 bump versions with xous change 2022-11-06 03:48:12 +08:00
bunnie
fa90e74a10
Merge pull request #270 from gsora/feat/pddb-init-notification
feat: show boot process notifications for PDDB
2022-11-06 03:40:17 +08:00
bunnie
7eecf2b1ce remove the initial wait from PDDB; move the pop-up modal location
The initial wait message is now rendered by the first app
that owns the screen (currently shellchat).

The location where the pop-up modal is rendered is also now bracketed
directly around the mount call to avoid interference with other
edge cases that may pop up modals.
2022-11-06 03:07:35 +08:00
Gianguido Sorà
d277ae9551 feat: show boot process notifications for PDDB
This commit shows two notifications:
 1. as soon as the device boots, a notification greets the user and
 tells them everything is fine, the device is booting
 2. as soon as the user enters (or doesn't) enter the password, a
 notification tell the user Xous is loading and mounting PDDB

I spent too much time on this but I believe it's a nice UX improvement.
2022-11-04 17:31:27 +01:00
bunnie
5de44a9502 don't fail if keyattribute not found in current basis when no basis specified
This is not actually an error, we just need to try another basis
down the list. This is a copypasta bug that was only caught now. :-/
2022-11-04 17:05:51 +08:00
bunnie
0d9a39a349 print debug information when a key goes missing in bulk read
this helps debug problems down the road
2022-11-04 17:05:32 +08:00
bunnie
d74673ab29 allow main menu to be used if there are no root keys 2022-11-04 03:55:57 +08:00
bunnie
80a1bd3654 resolve issue #267 2022-11-03 23:18:13 +08:00
bunnie
ff2a7f8240 some more debugging to help trace through dict sync issues 2022-11-03 21:06:04 +08:00
bunnie
b04dcc21ef add smalldb flag, which builds a PDDB with a size of 4MiB
do not interchange this on devices with the full sized
PDDB, you may corrupt the database
2022-11-03 21:04:14 +08:00
bunnie
719020b08b don't allow polls to the unmount to turn true until other callbacks have been allowed 2022-11-03 17:23:11 +08:00
bunnie
7af04b7000 a bit more debugging around dictionary creation 2022-11-03 01:38:18 +08:00
bunnie
ba28dd8795 bump to absorb utralib straggler configs 2022-10-28 15:11:17 +08:00
bunnie
6b296c9b48 fix a cargo file that got nuked in the merge 2022-10-28 15:04:56 +08:00
bunnie
e60f7cc855 Merge branch 'i18n/adds-french-localization' into main 2022-10-28 15:00:27 +08:00
bunnie
dfb10ed7f2 bump crate numbers to publish lang-fr change into xous-rs 2022-10-28 14:01:09 +08:00
Tom Marble
006a69105c
Completes the i18n_helper.py tool
Added 'fr' translation
Added *.json to .gitattributes

Signed-off-by: Tom Marble <tmarble@info9.net>
2022-10-27 16:07:05 -05:00
bunnie
d63c452fb6 catch serialization buffer edge case
if the buffer fills up to the point where there isn't enough
space for the 8-bytes of header, a split_at() call will fail before
the routine even gets to decide if the record can fit.

abort the loop if the buffer is that full.
2022-10-27 23:00:10 +08:00
bunnie
c82a79dab9 add performance monitoring in for bulk reads 2022-10-27 16:45:04 +08:00
bunnie
475e464efe bump versions due to svd2utra change 2022-10-27 03:04:22 +08:00
bunnie
bef734553e clarify some comments and clean up debug messages 2022-10-27 02:53:38 +08:00
bunnie
6992b31104 fix the bufserializer approach
this is much more efficient than the alloc serializer
2022-10-27 02:41:46 +08:00