Commit graph

10340 commits

Author SHA1 Message Date
bunnie
bd5b482cb0 rework list filtering to use an unsorted vec instead of btreemap
also eliminates references, copying and locking of items in the
sorted btreemap.

turns out that ... sorting is much cheaper than copying or maintaining
references, because copies to heap items require allocs which are
under the hoood several sorts to find the place to stick the alloc
memory, and shared references require locks.
2023-06-06 15:33:55 +08:00
bunnie
fa436c0845 fix bugs so that the implementation is working
as suspected, the shared lock is killer on performance.
2023-06-05 22:50:59 +08:00
bunnie
9bb3ac0db7 first stab at refactoring filter to be faster 2023-06-05 04:57:26 +08:00
bunnie
118716da7b fix another 1.70 error 2023-06-05 01:45:10 +08:00
bunnie
39cd7f8b0a cleanup Rust lint that appeared in 1.70 2023-06-04 19:10:10 +08:00
bunnie
12acdbef5b update release notes 2023-05-29 03:22:25 +08:00
bunnie
015f0fb8b3 sort scans by strength, and retire AP's that we haven't seen in a while 2023-05-29 03:20:04 +08:00
bunnie
0b32ac073b add scan state information to ssid scans
ssid scans can now be in-progress, and they also record
the time elapsed since the last scan was performed.

this allows the network manager to be a bit smarter about when
it decides to kick off a scan.

the ssid scan dialog box is also updated to show
the scan results in progress. This addresses #336.
2023-05-29 02:12:28 +08:00
bunnie
86459b02c5 fix cargo check environment for the latest vscode
seems they refactored the way rust workspaces are handled and
deprecated previous keywords and added some other features that
break cargo check.

This overrides all of that and manually configures cargo
check to be harmonized with the hardware target environment.
2023-05-29 00:40:17 +08:00
bunnie
1b29ea0421 fixes #339
use the same API call used by `status` as in `shellchat`.
this should also fix the status bar reflecting the correct state.

code fixed but not explicitly tested; if I got this wrong
please re-open!
2023-05-28 18:01:46 +08:00
bunnie
a1bf554f89 bump release notes 2023-05-28 18:01:38 +08:00
bunnie
54de42cd52 update lockfile with the new versions 2023-05-28 16:13:35 +08:00
bunnie
fbe3cb2a3d bump package numbers to absorb PR #388 2023-05-28 15:58:11 +08:00
bunnie
a244b204cc
Merge pull request #388 from Foundation-Devices/syscall-virt-to-phys-pid
Add virt_to_phys_pid syscall
2023-05-28 15:52:57 +08:00
eupn
05d7f6a286
Add virt_to_phys_pid syscall
This syscall allows to obtain a physical address from a mapping of a specific process
2023-05-23 19:43:53 +04:00
bunnie
cf51f79d91 bump lockfile 2023-05-23 18:22:02 +08:00
bunnie
a8c1ac4d79 forgot to switch out this patch...dangit 2023-05-23 18:17:44 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
08602773b9 tweak the test case generator for vault 2023-05-23 02:13:33 +08:00
bunnie
99f9278568 cleanup bitrot in testing routines 2023-05-23 00:14:35 +08:00
bunnie
f36250e599 bump release notes 2023-05-22 18:37:34 +08:00
bunnie
6e16ef163f WIP #325
This hopefully resolves #325 but I'm unable to test it because
the U2F demo site I use for testing seems to have been disabled.
2023-05-22 18:36:22 +08:00
bunnie
2aa51736f5 fix #353 and possibly also #333
this adds a configurable autotype delay, and also adds a
left-handed mode option to the `vault` ui.

more testing is needed for #333, I think.
2023-05-22 17:22:17 +08:00
bunnie
3b5a78a908 add configurable keyup/down delay to USB typing methods 2023-05-22 17:21:50 +08:00
bunnie
d3dfe9fdde add option to lock device on autosleep. 2023-05-22 15:44:46 +08:00
bunnie
6f9febccf6 this resolves #383
Adds a menu item (defaults to 0 or off) for autosleep timeout in
minutes.

Once the autosleep timeout is hit, the system tries to suspend.

- It will not try to sleep if the system is plugged in.
- It will reset the timer if the power state changes (plug/unplug).
- It will reset the timer every time a key is pressed.
- The timer is reset on suspend, so it does not try to immedaitely re-sleep on wake.

The autosleep handler is domiciled in the "pump" loop which is
responsible for updating the uptime timestamp in the status bar.
It is pinged at a 1 second interval.

Therefore, the sleep timeout has a +/-1 second variability in it,
and also, a quick plug-unplug event (< 1 second) will likely go
unnoticed.
2023-05-22 02:32:13 +08:00
bunnie
2dc3d19bf1 add autounmount, autosleep handlers in preferences
but autounmount is just a placeholder
2023-05-22 02:31:50 +08:00
bunnie
18f2017bf9 add autoumount, autosleep options to userprefs 2023-05-22 02:31:28 +08:00
bunnie
a979cac843 add is_plugged_in() convenience function for LLIO 2023-05-22 02:30:58 +08:00
bunnie
27592f71a1
Merge pull request #387 from wizzard0/p3519-1-stray-keys
Fix #386: Ignore key codes over 0xf000 on insert
2023-05-21 21:16:44 +08:00
wz
e08f4b89c5 Narrow down the exclude list to Apple PUA characters 2023-05-21 14:00:52 +03:00
wz
723cadaff0 Ignore key codes over 0xf000 on insert 2023-05-21 13:49:06 +03:00
bunnie
fe646f52c1 fix #382
this should fix the issue on #382. The behavior is now:

*device not plugged in*

1. select "Lock device (reboot)"
2. device reboots
3. device goes to sleep
4. user wakes up the device
5. user is challenged with the unlock PIN

*device is plugged in*

1. select "Lock device (reboot)"
2. device reboots
3. user is challenged with the unlock PIN

I think this should be the "least surprising" outcome given
the description of the menu item.
2023-05-21 18:25:27 +08:00
bunnie
d1af22f861 fix trust level of framebuffer canvas
this is some bit-rot that happened to the `ball` demo because
it's currently the only application that uses the framebuffer
canvas.

the trust level of the framebuffer canvas has to be lower than
that of the modals, otherwise a modals box is not allowed to
draw on top of the framebuffer.

in this case, a patch that was applied when trust levels were
refactored was missed on the framebuffer canvas, which caused
the trust level of the canvas to be higher than that of a modals.

Thus, when a modal attempts to pop up over the ball demo,
one just sees the defacement lines but no actal content.
2023-05-21 18:13:20 +08:00
bunnie
cf06035dcd emit a warning when xous-names blocks on a connect
otherwise we have a silent failure, which is a bit confusing.
2023-05-21 17:20:57 +08:00
bunnie
0065707528 add debug logging inside the shellchat command list
this helps us determine which server in the environment
creation list hangs
2023-05-21 17:20:27 +08:00
bunnie
5f5e3a2ada don't monitor connection count on spinor block during hosted mode
this makes it a little more flexible to do diagnostics/debugging
in hosted mode. It's not secure, but hosted mode is not meant to be
secure.
2023-05-21 17:19:45 +08:00
Jean-Pierre De Jesus DIAZ
662eda0b43
svd2utra: Remove .gitignore
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-05-19 13:08:13 +02:00
bunnie
3aeb360a18 bump release notes 2023-05-17 23:35:08 +08:00
bunnie
6ec99fa7da add multi-line text editing support to TextEntry, and insertion points
TextEntry boxes can now specify "growable" as an option; if this
is set true, then, the fields within are considered to be multi-line
fields that can grow to fill the screen (even pushing lower ui
elements off the screen...); however a text line is limited to
256 characters so generally the overflow issue is hopefully rare-ish.

Left/right arrow keys conjure up an insertion point to allow for
deleting and inserting text in the middle of a field.

The main quirk is that if you enter text that causes a field to grow in
size, the overall dialog box can't grow any larger, so the text simply
overflows into the UI element above the current line, without limit.

Need to check for interactions with other elements that should
not be affected but it passes some simple test cases in `vault`.
2023-05-17 23:27:07 +08:00
bunnie
b3542d2add Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-05-17 04:12:46 +08:00
bunnie
d6a87666ab add bip39 password entry prompt 2023-05-17 04:12:25 +08:00
bunnie
fa05e8b033 bump release notes 2023-05-17 03:56:38 +08:00
bunnie
f93d9de3f1 add BIP-39 entry for passwords in vault
If the "notes" field starts with the characters
"bip39" (case insensitive), then, the password field is
interpreted as a hexadecimal encoding of BIP39 entropy.

To create a BIP-39 entry, leave the password field blank,
and then start the Notes field with the characters 'bip39',
and this will trigger a dialog box that will only allow
valid bip39 entry and check the checksum etc.

To view the BIP-39, after opening up the entry for "edit",
close it, and it will pop up a second dialog box that interprets
the hex data as BIP-39 words.

You could also in theory enter the hex digits yourself into
the password field, if you're masochist.
2023-05-17 03:53:55 +08:00
Sean Cross
c7a6f6c635
Merge pull request #380 from betrusted-io/faster-gdb-memory-access
Faster gdb memory access
2023-05-13 07:26:26 +07:00
Sean Cross
b0ecc26002 kernel: gdb: batch 2- and 4-byte accesses
Instead of always doing bytewise accesses, support 2- and 4-byte access.
Additionally, recognize when multiple 4-byte reads are required.

Note that an additional optimization may be made here in the future to
prevent having to check every address, but this is left for a future
optimization.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-05-11 15:13:03 +08:00
Sean Cross
55d27cbf1b kernel: riscv: use SUM bit for debug visibility
Instead of remapping the page to allow the kernel to access a process'
memory, simply set the SUM bit. This makes it no longer an error for the
kernel to access userspace.

Keep setting the `W` bit when we poke, to allow for updating program
memory with breakpoints.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-05-11 15:11:17 +08:00
Vihaan Jim
87493653df Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-05-10 17:33:58 -04:00
Vihaan Jim
c86ac65743 Initial attempt at using spawn
This still doesn't work because of some weird data corruption that
changes the CID from `6` to a number greater than 32
2023-05-10 17:31:09 -04:00
bunnie
874bb655df add latest release to the restore script 2023-05-07 23:12:41 +08:00