Commit graph

10340 commits

Author SHA1 Message Date
Gianguido Sorà
98302dc89c feat(vault): add readme for vaultbackup-rs 2022-08-02 16:12:10 +02:00
Gianguido Sorà
199d5ddeb5 Merge branch 'main' into feat/vault-usb-totp-loading 2022-08-02 15:53:11 +02:00
bunnie
473c95a74c strip out the test flag 2022-08-02 16:49:50 +08:00
bunnie
536d90034c add a manually-triggered test suite for the net crate
requires the feature "nettest" to be present in shellchat.
this commit has it turned on, it'll be stripped out before
we push to main.
2022-08-02 16:46:36 +08:00
bunnie
ca30657370 attempt to integrate the std net test suite.
newsflash: it doesn't work. still handy to have the test code around
as reference.
2022-08-02 16:45:56 +08:00
bunnie
7541d39fd6 add a static variable to contain our IPV4 address
this is used to do address binding checking from library calls,
so we can reject binding to address that are not our actual IP
address.
2022-08-02 16:45:17 +08:00
bunnie
f2193d64b1 filter disallowed bindings for the TcpListener 2022-08-02 16:44:37 +08:00
bunnie
81d5718f05 fix "localhost" resolution by string name 2022-08-02 16:42:35 +08:00
bunnie
3118ebddc9 add error code printout on dictlist failure 2022-08-02 02:52:20 +08:00
bunnie
2b4ce52a10 fix some regressions on empty key listings 2022-08-02 02:52:04 +08:00
bunnie
6b53688249 fix #195
let's see if we can raise the limit on credentials now that
the performance issues have been partially addressed.
2022-08-02 01:45:39 +08:00
bunnie
e32ea1e32f change read buffer api from read_to_end() to read_exact()
read_to_end() "guesses" the total amount of data to read by doing
roughly 5 calls per couple hundred bytes: it starts by guessing
it's 32 bytes long, then another 32, then 64, then 128, and then
a final call to make sure there's nothing more.

The read() call is somewhat expensive in that it involves initializing
and sending page-sized memory chunks, and every time it also
descends the entire basis hierarchy, recomputing the overlay.

Probably, this can be improved with some sort of server-side caching
of read results -- if a file is read, it seems very likely that
the next few bytes will be read and a smarter caching implementation
could smooth over some of the expense.

However, a much easier fix for now is to just change the read
call to read exactly the length of the file being presented. Since
we already have the key handle, we can get the attributes and then
do a single read of the exact amount.

Doing this improves the speed of the UX substantially, about 40%
faster for the same operation (at least).
2022-08-02 01:38:46 +08:00
bunnie
3d992cedf4 fix an import error + reduce log noise on a normal path 2022-08-02 01:38:07 +08:00
bunnie
0d61cbb838 improve debug output 2022-08-02 01:37:45 +08:00
bunnie
13b366345c clean up/optimize the key listing routine
provides some marginal improvement on the vault UX
2022-08-01 23:12:26 +08:00
bunnie
513fe519a7 profiling should not be enabled, somehow that slipped through 2022-08-01 16:12:38 +08:00
bunnie
826aa43f20 Merge branch 'pddb-flamegraph' into main 2022-08-01 15:46:57 +08:00
bunnie
5be62e372d chore: move AES-GCM-SIV off of branch to 0.11.1 official
this patch moves us off the branch we had to hop on for cipher
API compatibility to the one that's officially published by
RustCrypto. This closes #168.
2022-08-01 15:44:16 +08:00
bunnie
7d62ca85b8 some preliminary schwags at making flamegraphs
turns out, they're pretty useless. I mean, for debugging actual
running code. it tells us basically what we know already which is
99.99% of the time is spent waiting on inter-thread messaging
in hosted mode.
2022-08-01 01:32:19 +08:00
bunnie
0166bc3d4a remove some more trash scripts that shouldn't be in the main repo
these are all helper scripts specific to my system that aren't
really useful to anyone.

also made it generally the case that scripts in the root directory
are ignored. "generally useful" tools are put in the `tools` directory.
stuff in the root directory is just notes and bits for me to chew on.
2022-07-29 23:28:02 +08:00
Gianguido Sorà
6fe53e6be9 chore(vault): rustfmt on storage.rs 2022-07-29 15:22:53 +02:00
Gianguido Sorà
af9c71273b improvement(vault): get rid of monomorphization on most storage::Manager
methods

Less kernel bloat!
2022-07-29 15:18:49 +02:00
Gianguido Sorà
21d77cc92a Merge branch 'main' into feat/vault-usb-totp-loading 2022-07-29 13:17:12 +02:00
bunnie
ff85e1fc19 add some .gitigore entries that help make my life a little easier
if anyone objects to these feel free to revert them, but it's
nice to have some helper scripts local to my machine in the root
dir that don't always show up in my status.
2022-07-29 15:58:02 +08:00
bunnie
43bb1c6032 missed one README item 2022-07-29 15:25:21 +08:00
bunnie
2e746e7ca3 update release notes 2022-07-29 15:23:58 +08:00
bunnie
e469736278 stagger the flush timing a little bit
noticed it's hitting exactly when NTP updates because it also
happens on a 24-hour schedule, staggering a bit to try and keep
everything from hitting exactly at the same time once a day.
2022-07-29 15:00:44 +08:00
nworbnhoj
9b7c63c719 Box miniz_oxide InflateState 2022-07-29 06:13:20 +10:00
bunnie
2c815375a1 add sync to write function in pddb commands 2022-07-29 00:25:01 +08:00
bunnie
3a5e385b9a add arg to specify file (optionally) in backup 2022-07-29 00:24:40 +08:00
bunnie
46c53d9612 add telemetry for better PDDB CI 2022-07-28 18:46:56 +08:00
nworbnhoj
27ac3d9dc1 fix image modal center 2022-07-28 18:57:23 +10:00
bunnie
3a4f5d07e8 refer to Xous Book in PDDB readme 2022-07-28 16:00:30 +08:00
nworbnhoj
7af94e674d fix Bitmap::from_png rotate 2022-07-28 07:53:52 +10:00
nworbnhoj
f9ee19e526 fix merge blunder
caused by flakey Internet connection
2022-07-28 07:36:01 +10:00
bunnie
ac1f746566 add fscb/spaceupdate journal flushing & periodic flush
- fix journal number bug in basis root record
- fix conflict PTE resolution to also consider basis root record,
which has a different encryption form.
2022-07-28 04:54:35 +08:00
bunnie
deecd3651d sync PDDB before churning or flushing 2022-07-28 04:47:32 +08:00
bunnie
a68eb7cc73 add missing files for backalyzer; add PTE conflict resolution 2022-07-28 04:47:02 +08:00
bunnie
318f95d347 fix problem with over-zealous validator fields
actually, we just need to check for : on the basis names, not
everything else!
2022-07-28 04:46:07 +08:00
nworbnhoj
1923a9ccf4 Merge branch 'iter' of github.com:nworbnhoj/xous-core into iter 2022-07-28 06:26:16 +10:00
nworbnhoj
f95a49dfdc rename DecodePng INFLATED_BUFFER_LENGTH 2022-07-28 06:16:48 +10:00
nworbnhoj
7626be7043 rustfmt Bitmap 2022-07-28 06:07:35 +10:00
nworbnhoj
afef00a028 breakout mod Img RGB raster 2022-07-28 06:06:16 +10:00
nworbnhoj
98586ffc6c breakout mod GreyScale adaptor iterator 2022-07-28 05:58:31 +10:00
nworbnhoj
2d0ddc3450 breakout mod Shrink adaptor iterator 2022-07-28 05:53:16 +10:00
nworbnhoj
64f6ddeade breakout mod Dither adaptor iterator 2022-07-28 05:51:07 +10:00
nworbnhoj
938788d72f breakout mod Dither adaptor iterator 2022-07-28 05:45:34 +10:00
nworbnhoj
d82fba71c5 remove redundant comments 2022-07-28 05:31:39 +10:00
nworbnhoj
dadaae2884 mark color_types palette as unsupported in Bitmap::from_png 2022-07-28 05:25:05 +10:00
nworbnhoj
118f0c0346 extend color_types & bit_depths in GreyScale adaptor iterator 2022-07-28 05:21:20 +10:00